Re: read-write spinlocks ??

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

 



Gaurav Dhiman wrote:
On 4/28/05, Manish Regmi <regmi.manish@xxxxxxxxx> wrote:

On 4/28/05, Gaurav Dhiman <gaurav4lkg@xxxxxxxxx> wrote:

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.

hi, Lock is an opcode prefix used for atomicity in i386 . so, that memory is only used by one processor at a time.

AFAIK, it asserts LOCK# which locks the bus.


Thanks .... how we mention till what instruction the lock will be
there. Is there any unlock prefix also to specifically unlock it, or
it unlocks after executing the next one or two instructions.


lock is only good for one instruction.


regards
Manish Regmi

--
---------------------------------------------------------
"Owning a hammer doesn't make one an architect"



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




--
   kr

--
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