Messages in this thread | | | Date | Sun, 3 Aug 2008 22:53:59 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [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
| |