hi , spin_lock() is ofcourse atomic in SMP , in fact spin_lock() is only used for multi processor system ( because of possible deadlock in uniprocessor , the function does not so anything on uniprocessor). spin_lock() gaurenties atomicity of it's lock operation by using hardware support provided by the processor for atomic operation , for example ix86 have 'lock ' prefix , to lock the bus so that no other processor is allowed to use the bus before the operation completes . even if the hardware support is not available we have very good software only techniques to gaurentee the atomicity , search for DEKKER algo , BAKERY algo . Rgds, Pankaj Chauhan --- P Ganesh-A18494 <ganeshp@motorola.com> wrote: > Hi , > > Is the spin_lock() guarenteed to be atomic on SMP > systems. i.e. if spin_lock() is called at the same > time from both the processors will it lead to a race > condition. > > Thanks, > Ganesh > > > > > -- > Kernelnewbies: Help each other learn about the Linux > kernel. > Archive: > http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > ________________________________________________________________________ Yahoo! India Mobile: Download the latest polyphonic ringtones. Go to http://in.mobile.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/