lkml.org 
[lkml]   [2000]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectspinlocks
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:1.704 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site