lkml.org 
[lkml]   [2008]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Rename DECLARE_MUTEX to DEFINE_SEMAPHORE
On Sun, Oct 26, 2008 at 12:41:18PM -0400, Christoph Hellwig wrote:
> On Sun, Oct 26, 2008 at 01:06:14PM +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.
>
> NACK. It describes reasonably well what it does. Of course that's a
> little confusing as we now have a specialized primitive to just do that.
>
> If the name annoys you enough so that you want to get rid of it help
> converting the remaining instances to struct mutex and DEFINE_MUTEX().

Changing the name of DECLARE_MUTEX (to something which tells us what it really
does) will increase visibility of semaphore uses, don't you think?
And more visibility means more patches removing its uses.

Marcin


\
 
 \ /
  Last update: 2008-10-29 22:19    [W:0.076 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site