[Ksummit-2008-discuss] topic proposal

Daniel Walker dwalker at mvista.com
Wed Aug 27 12:05:49 PDT 2008


On Wed, 2008-08-27 at 12:31 -0600, Matthew Wilcox wrote:
> On Wed, Aug 27, 2008 at 09:14:22AM -0700, Daniel Walker wrote:
> > > In name only.  Completions are identical to the new generic semaphore
> > > code, just implemented slightly less efficiently.
> > 
> > completions are like semaphores that start out locked initially, so it's
> > different in that way.. It's more strict than a semaphore.
> 
> How is it more strict?  Hint: you can complete() a completion more than
> once, and the subsequent callers of wait_for_completion() won't actually
> wait.

I do agree that completions are a subset of semaphores. Without changes,
you could use a completion as a mutex, a regular semaphore, or a
counting semaphore but it would be a noticeable hack to do so..

Completions are more strict since they have a specific use case, which
is specifically signaling an event. So it's more strict than say a
semaphore which has numerous use cases.

Daniel



More information about the Ksummit-2008-discuss mailing list