Re: init_completion, down(mutex) related question

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

 



On Fri, Jul 02, 2004 at 10:43:30 +0530, mohanlal jangir wrote:
> down and up primitives are used to acquire and release a semaphore, mutex or
> any synchronization primitive. init_completion will initialize wait queue

Do you need to be reminded, that C is not polymorphic?
Also, mutex IS A (special case of) semaphore.

> and one flag, so that the wait queue can be used later (in
> wait_for_completion). wait_for_completion puts the task into the wait queue
> and invokes if the flag is set.
> This all you need to do if some part of code is being accessed in more than
> one context. It could be kernel context and interrupt context, or your code
> might be running in multi processor machine.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[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