Messages in this thread | | | Date | Mon, 14 Apr 2008 11:50:02 -0600 | From | Matthew Wilcox <> | Subject | Re: [PATCH] Replace completions with semaphores |
| |
On Mon, Apr 14, 2008 at 09:56:38AM -0700, Arjan van de Ven wrote: > On Mon, 14 Apr 2008 18:32:28 +0200 > Peter Zijlstra <peterz@infradead.org> wrote: > > Yeah, I would open code it. But this is indeed a sane usage of the > > counting semaphore because there is no priority inversion. > > Maybe we need a "counter" primitive instead? > From a conceptual point of view that even makes sense > > (the implementation can be pretty much the current semaphore one of course)
I'm only too happy to rename semaphore.c to atomic_counter.c and do appropriate renames. Or maybe 'kcounter' would be more in vogue for a name ;-) I'd like a name that implies sleeping, but I'm not able to think of one right now.
Then semaphores and completions each become wrappers around counters and everybody's happy. Right?
-- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."
| |