[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201012291247.27663.arnd@arndb.de>
Date: Wed, 29 Dec 2010 12:47:27 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Daniel Walker <dwalker@...eaurora.org>
Cc: Hillf Danton <dhillf@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v0] add nano semaphore in kernel
On Tuesday 28 December 2010 16:51:30 Daniel Walker wrote:
> We for sure don't want new semaphores, or new semaphore usage in the
> kernel ..
Yes. I once even tried unifying the semaphore and rwsem implementation,
but gave up on that for a number of reasons.
> It should also be noted that the rtmutex (kernel/rtmutex.c) already has
> this capability. Although I don't think you can use an rtmutex from
> inside the kernel.
I wasn't aware we had already grown another one ;-)
AFAICT, you can only use it inside of the kernel, but it's very
specific and I wouldn't recommend using it unless a regular mutex
cannot be used for some reason. The only user besides the futex
code seems to be the i2c layer at this moment.
> If you really want this you should look into the rtmutex, and the
> regular mutex API's .
If Hillf relies on counting semaphores, that won't work, but very
few such users exist in code outside of textbooks.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists