Messages in this thread | | | Date | Thu, 21 Oct 2004 12:42:22 +0200 | From | Ingo Molnar <> | Subject | Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8 |
| |
* Thomas Gleixner <tglx@linutronix.de> wrote:
> > > This is used to wait for command completion and therefor we have the > > > completion API. It was used this way because the ancestor of completion > > > (sleep_on) was racy ! > > > > I didn't look at the USB code, I'm just saying that it's perfectly valid > > use of a semaphore the pattern you describe (process A holding it, > > process B releasing it). > > Yeah, for a semaphore it is, but not for a mutex.
but mutexes dont exist in upstream Linux as a separate entity. (they exist in my tree but that's another ballgame.)
> IMHO, this is not clearly seperated and therefor produces a lot of > confusion.
if used to complete some work then semaphores are indeed a tad unclean and slightly slower than completions - but they are fully correct kernel code. And there are much worse offenders of cleanliness around.
Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |