Re: read-write spinlocks ??

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

 



Hello,

Gaurav Dhiman wrote:

I think if we allows the writer to be in critical section, no one else
(not even readers) should be allowed there in critical section,
because writer may effect what the reader are reading and a situation
like above (if I am correct) can lead to crashes.

What the document says is : at a given time, you can have many readers in the critical section OR one writer in the critical section. So you're right, read/write locks can be taken by many readers at the same time OR by only ONE writer at a time if there aren't any readers.


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