lkml.org 
[lkml]   [2008]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Introduce down_try() so we can move away from down_trylock()
On Fri, 1 Aug 2008 10:26:33 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:

> > I planned on removing the much-disliked down_trylock() (with its
> > backwards return codes) in 2.6.27, but it's creating something of a
> > logjam with other patches in -mm and linux-next.
> >
> > Andrew suggested introducing "down_try" as a wrapper now, to make
> > the transition easier.
>
> The transition to WHAT? To crap?
>

The naming is pretty sad, but the inconsistent return value from
down_trylock() drives me batshit. It means that every time I ever look
at any sort of trylock call I need to go back to the definition site to
work out if it's the one which returns true or if it's the one which
returns false.

It would be good to get that fixed. And if we _do_ want to fix it, I
don't see any alternative to creating a new function.



\
 
 \ /
  Last update: 2008-08-01 19:43    [W:0.099 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site