Re: [PATCH] kill DECLARE_MUTEX_LOCKED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 7/20/07, Christoph Hellwig <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux