Re: Struct completion vs. semaphore

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

 



On Fri, Jun 21, 2002 at 05:11:26PM +0300, Momchil Velikov wrote:

> >>>>> "Alan" == Alan Stern <stern@rowland.org> writes:
> Alan> But you didn't answer my first question.  What are the essential
> Alan> differences between a struct completion and a semaphore?
> 
> Hell if I can find any difference. Except that semaphores (in Linux
> (the kernel)) have machine dependent implementations and are likely to
> be much faster.

iirc, semaphores cannot be safely stored on the stack, hence the change
from up_and_exit() to complete_and_exit(). I could be completely wrong
though ...

regards
john


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

-- 
"If a thing is not diminished by being shared, it is not rightly owned if
 it is only owned & not shared."
	- St. Augustine
--
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