lkml.org 
[lkml]   [2007]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kill DECLARE_MUTEX_LOCKED
Hi,

On 7/20/07, Christoph Hellwig <hch@lst.de> wrote:
> On Fri, Jul 20, 2007 at 10:58:34AM +0530, Satyam Sharma wrote:
> > That comment in libusual is quite nonsensical, IMHO. Note that
> > usu_init_notify is declared as DECLARE_MUTEX_LOCKED and yet the
> > author wants us to believe (later, when he's doing that dummy
>
> Given that no one should use libusual and we should kill it and the
> abomination called ub I don't really care about fixing this up.

I was actually referring to _this_ "comment":

/* A completion does not work here because it's counted. */

at libusual.c:181, and not yours :-)

It's a bogus comment, because the logic in there (usu_init_notify
set to 0 i.e. locked at build time, unlocked to 1 by usb_usual_init()
after usb_register() and the the dummy "down(); up();" by the
probe threads would mean that the semaphore will *never* ever
have a value other than {0, 1}. So contrary to what the author
thought, it's not a counted semaphore.

Satyam
-
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: 2007-07-20 10:21    [W:0.044 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site