tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel condvars: how to use?



On 12/08/17 03:26, Mouse wrote:

[Brian Buhrow]
1.  [...].  Mutexes that use spin locks can't be used in interrupt
context.
Sure you don't have that backwards?  I _think_ mutex(9) says that spin
mutexes are the only ones that _can_ be used from an interrupt.

Brain did get it backwards. To quote mutex(9)...

           IPL_VM, IPL_SCHED, IPL_HIGH

                 A spin mutex will be returned.  Spin mutexes provide mutual
                 exclusion between LWPs, and between LWPs and interrupt
handlers.

Nick



Home | Main Index | Thread Index | Old Index