Port-pdp10 archive

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

Re: Interrupt handlers and mutex

On Dec 31, 2009, at 11:52 AM, Frank Zerangue wrote:

> Help request -- Mutex(9) indicates that mutex replaces the spl(9) system.
> (1) When writing an interrupt handler, should the handler acquire a spin 
> mutex before modifying some IO that may be accessed also by a LWP?

Yes.  and the mutex should be initialized to use IPL_VM.

> (2) What happens when the interrupt handler cannot acquire the mutex? Will 
> the LWP that holds it ever be able to run again?

That can't happen.  The cpu will spin until the mutex is acquired.

> (3) Will a LWP that holds a spin mutex be pre-empted by the scheduler?


Home | Main Index | Thread Index | Old Index