Re: read-write spinlocks ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Gaurav Dhiman wrote:

__read_lock_failed:
        lock ; incl     (%eax)
1:      cmpl    $1,(%eax)
        js      1b

        lock ; decl     (%eax)
        js      __read_lock_failed
        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

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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux