lkml.org 
[lkml]   [2008]   [Aug]   [4]   [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 Mon, 4 Aug 2008, Rusty Russell wrote:
>
> Someone sent me a patch documenting the illogic of down_trylock(). I decided
> to try to fix it rather than just bitch and moan.

I do agree that it is illogical. I just think your solution is worse than
the problem - turning one illogical function into a redundant one seems
the worse problem.

We could just fix the return value, since it's not used very much, but
we'd obviously never know what out-of-tree users there might be, so that's
not really a good solution either. But that's obviously why we'd then have
to rename it to something else, so whichever way we turn, we'd just be
screwed.

I'm much happier telling people to "just don't use semaphores any more".
The _legacy_ users get down_trylock() right.

Linus


\
 
 \ /
  Last update: 2008-08-04 07:57    [W:0.042 / U:2.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site