spinlocks

From: Ashutosh S. Rajekar (asr@giaspna.vsnl.net.in)
Date: Tue Feb 08 2000 - 12:30:51 EST


Hello,

Are there any pitfalls in using critical code locked through spinlocks,
inside a pair of lock_kernel()/unlock_kernel() calls on an SPM machine ?
I'm not familiar with SMP machines, hence the question.

Say we have the following code: is it safe, or should I use the classical
save_flags(), cli(), restore_flags() stuff ?

/* --------- */

lock_kernel();

spin_lock_irqsave(&lock, flags);

/* critical section ... */

spin_unlock_irqrestore(&lock, flags);

unlock_kernel();

/* --------- */

Please Cc your replies to my email address.

Thanks in advance,
-----------------------------------------------
Ashutosh S. Rajekar
PICT, University of Pune, INDIA.
WWW: http://i.am/asr Email: asr@i.am
-----------------------------------------------

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



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:12 EST