Re: semaphore query.

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

 



On 12/27/06, hemen.kapadia@xxxxxxx <hemen.kapadia@xxxxxxx> wrote:
Will the up() method of the semaphore execute a waiting process in the
semaphore queue each time it is executed (assuming that there are waiting
processes in the queue) or only when the new value of the semaphore is
greater than or equal to 0 ?

think about how semaphores are designed ... every up() should wake up a process

if you look at the implementation you see:
up() calls __up_wakeup()
__up_wakeup() calls __up()
__up() calls wake_up()
-mike

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