lkml.org 
[lkml]   [2005]   [Dec]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 17 Dec 2005 18:55:13 +1100
FromNick Piggin <>
SubjectRe: [PATCH 1/12]: MUTEX: Implement mutexes
Steven Rostedt wrote:
> On Fri, 2005-12-16 at 23:13 +0000, David Howells wrote:

>>This patch set does the following:
>>
>> (1) Renames DECLARE_MUTEX and DECLARE_MUTEX_LOCKED to be DECLARE_SEM_MUTEX and
>>     DECLARE_SEM_MUTEX_LOCKED for counting semaphores.
>>
> 
> 
> Could we really get rid of that "MUTEX" part.  A counting semaphore is
> _not_ a mutex, although a mutex _is_ a counting semaphore.  As is a Jack
> Russell is a dog, but a dog is not a Jack Russell.
> 

Really?

A Jack Russell is a dog because anything you say about a dog can
also be said about a Jack Russell.

A counting semaphore is a mutex for the same reason (and observe
that 99% of users use the semaphore as a mutex). A mutex definitely
is not a counting semaphore. David's implementation of mutexes
don't count at all.

If you want to use a semaphore as a mutex, DECLARE_SEM_MUTEX isn't
a terrible name.

-- 
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com 

-
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/

\
 
 \ /
  Last update: 2005-12-17 08:58    [from the cache]
©2003-2008