Re: Clear interrupts on a SMP machine?

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Wed Oct 18 2000 - 09:31:18 EST


> spin_lock_irqsave(&local_lock, flags);
> Muck_With_The_RTC_Chip();
> spin_unlock_irqrestore(&local_lock, flags);
>
> This protects only the local procedure. In the meantime, somebody
> else, using another CPU is mucking with the same RTC Chip. The

You need to put the spinlock in for every other use of the chip

> the data register. The "somebody else" is a realtime-clock ISR.

Thata fine. You can compute worst case accesses for your Muck_with_..

Alan

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



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:13 EST