Re: Question about rtc_lock

From: Thomas Hood (jdthood@mail.com)
Date: Sat Oct 06 2001 - 09:40:54 EST


On Sat, 2001-10-06 at 09:13, Alan Cox wrote:
> > No, but what if the rtc interrupts while the lock is held in this
> > bit of code?
>
> Thats fine. It wont take the lock

But the first line of irq_interrupt() is:
   spin_lock (&rtc_lock);

If one has a multi-processor machine, and CPUx is going through
the bootflag code, which takes the rtc_lock, and that CPU is
interrupted and enters rtc_interrupt(), which tries to take the
rtc_lock, won't it deadlock?

If not, then I'm missing some clue about how these spinlocks work.

Thomas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:41 EST