Messages in this thread | | | Date | Sun, 26 Oct 2008 15:11:33 +0100 | From | "Leon Woestenberg" <> | Subject | Re: [PATCH] Rename DECLARE_MUTEX to DEFINE_SEMAPHORE |
| |
Hello,
On Sun, Oct 26, 2008 at 2:39 PM, Peter Zijlstra <peterz@infradead.org> wrote: > On Sun, 2008-10-26 at 13:06 +0100, Marcin Slusarz wrote: >> DECLARE_MUTEX is doubly misleading name (it actually _defines_ struct >> _semaphore_ initialized to 1) and it can be confused with DEFINE_MUTEX >> (which defines real struct mutex). Rename it. > > I'd prefer DEFINE_BINARY_SEM or somesuch > But it is not a binary semaphore, or is it?
Also, at least under 2.6.24,
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
thus the DECLARE is wrong there as well?
Regards, -- Leon
| |