[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: spinlock
Hello Jan.
Dne petek 28. februar 2003 11:41 je Jan Hudec napisal(a):
> On Fri, Feb 28, 2003 at 12:29:54AM +0100, Rok Papež wrote:
> YES, IT DOES. Except _irqsave/_irqrestore variants (they reduce to
> cli/sti). And for 2.4, that is. With preempt patched (IIRC they are
> included in late 2.5) they become magic.
:-). I had _irqsave/_irqrestore in mind.
> > I use them on UP as mutexes.. heavily. You use spinlock if structures you
> > are protecting are being accessed from interrupt/timer/softirq context.
>
> Only _irqsave/_irqrestore variants! Unsing the normal variant to lock
> against interrupt is a bug under penalty of complete machine freeze.
Yes.
--
best regards,
Rok Papež.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/