Re: interrupt handler

From: Kerenyi Gabor (
Date: Thu Aug 22 2002 - 23:58:01 EST

8/23/2002 8:58:20 PM, "sanket rathi" <> wrote:

>Can i use spin lock in the interrupt handler for a singlre processor machine. because books says u can not use locks
>but spin lock is some thing diffrent

Yes you can. Spinlocks will be compiled in if you choose SMP even on single processor machine.
But look at the documentation in the kernel source.
I think "lock" in your message is a semaphore in real life.

Spinlocks never sleep - they don't perform task switch and you can use them anywhere, while semaphores
can sleep and you can use them only in user context (not in interrupt or bottom half)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:27 EST