spinlocks

Ashutosh S. Rajekar (asr@giaspna.vsnl.net.in)
Tue, 8 Feb 2000 12:30:51 -0500 (GMT)


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/