David Howells <[EMAIL PROTECTED]> said:

[...]

> Anyway, I though I could get away with it, but on reflection, perhaps
> not... If two threads of the same process try and issue ReleaseMutex()
> simultaneously on one mutex, then theoretically, one should succeed and the
> other fail, but given the above code, you are right... there would be a
> race.

Lost me there. If after releasing the mutex it is free, the release was
sucessful AFAIAC. If two threads try to do it at the same time, so what?
Releasing an already free mutex is broken, OK. But two threads owning the
mutex at the same time is much worse...
-- 
Dr. Horst H. von Brand                       mailto:[EMAIL PROTECTED]
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to