lkml.org 
[lkml]   [2005]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/19] MUTEX: Introduce simple mutex implementation
From
Date
On Thu, 2005-12-15 at 11:21 -0800, Andrew Morton wrote:
> Linus Torvalds <torvalds@osdl.org> wrote:
> >
> > On Thu, 15 Dec 2005, David Howells wrote:
> > >
> > > FROM TO
> > > ============================== =========================
> > > DECLARE_MUTEX DECLARE_SEM_MUTEX
> > > DECLARE_MUTEX_LOCKED DECLARE_SEM_MUTEX_LOCKED
> > > Proper counting semaphore DECLARE_SEM
> >
> > That sounds fine.
>
> They should be renamed to DEFINE_* while we're there. A "declaration" is
> "this thing is defined somewhere else". A "definition" is "this thing is
> defined here".

Why have the "MUTEX" part in there? Shouldn't that just be DECLARE_SEM
(oops, I mean DEFINE_SEM). Especially that MUTEX_LOCKED! What is that?
How does a MUTEX start off as locked. It can't, since a mutex must
always have an owner (which, by the way, helped us in the -rt patch to
find our "compat_semaphores"). So who's the owner of a
DEFINE_SEM_MUTEX_LOCKED?

-- Steve


-
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-15 21:32    [W:0.612 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site