On 4/28/05, Thomas Petazzoni <thomas.petazzoni@xxxxxxxx> wrote: > Hello, > > Gaurav Dhiman wrote: > > > __read_lock_failed: > > lock ; incl (%eax) > > 1: cmpl $1,(%eax) > > js 1b > > > > lock ; decl (%eax) > > js __read_lock_failed please let me know how these two statements are made atomic across the CPU, i think these two need to be atomic across the CPU for actually locking the rw lock for reading. What does "lock ;" specifices here. > > ret > > What you're missing is that (%eax) is not the _contents_ of the eax > register, but what is in memory at the address stored in eax. > > %eax => contents of eax > (%eax) => contents of memory at address contained in %eax ok thanks, yes I was taking it wrong. What are your comments on the suggestion I made in my last mail. Please comments, wud the condition >= 2 be better than condition >= 1 Regards, -gd > Sincerly, > > Thomas > -- > Thomas Petazzoni > thomas.petazzoni@xxxxxxxx > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/