down_read and uninterruptible sleep

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

 



hi all, 

I have one doubt related to down_read semaphore
function. what i read from linux device drivers-3 book
is 

"A newly initialized rwsem is available for the next
task(reader or writer) that comes
along. The interface for code needing read-only access
is:
        -- void down_read(struct rw_semaphore *sem);
        -- int down_read_trylock(struct rw_semaphore
*sem);
        -- void up_read(struct rw_semaphore *sem);
A call to down_read provides read-only access to the
protected resources, possibly concurrently with other
readers. Note that down_read may put the calling
process into an uninterruptible sleep."

The last statement says that down_read may put the
calling pocess into an uninterruptible sleep. how and
in which conditions it might happen as we are just
reading the shared resource only.

plz help me in clearing this doubt.

Thanks in advance.

Deepak Joshi





	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

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