uart vs sio differences ?

Marcel Moolenaar xcllnt at mac.com
Tue Dec 9 20:44:42 UTC 2008


On Dec 9, 2008, at 12:33 PM, Scott Long wrote:

>
> Yup, my mistake.  However, I think that the semaphore spinwait in  
> uart_sched_softih() is the source of the problems here.

It's not a semaphore spinwait. It's just an atomic operation:
1. read old,
2. calculate new from old,
3. atomic_cmpset(old, new)
4. goto 1 if 3 fails.

The loop iterates only if ttypend got changed between 1 and 3.
There's no spinwaiting and no semaphore-like behaviour.

FYI,

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-current mailing list