[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: nptl 0.30
- From: Ulrich Drepper <drepper redhat com>
- To: NPTlibrarymailinglist <phil-list redhat com>
- Subject: Re: nptl 0.30
- Date: Tue, 18 Mar 2003 10:49:41 -0800
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Terekhov wrote:
>>Just invert those lines to :
>>
>>lll_mutex_unlock (cbuffer->cond->__data.__lock); /* much better to call
>>futex_wake() with the mutex unlocked */
>>lll_futex_wake (futex, INT_MAX);
>
>
> I think that it's sufficient to wake just one single thread
> here (in cleanup() for async.cancel region "wrapping" futex
> wait(); I guess).
No, it's not sufficient. There might be a thread which cannot be woken
because it arrived after the cond_signal o broadcast which might be woken.
Again, this is cancellation we are talking about. It is not a regular
programming tool, it's far too costly. It's used in exception
situations only.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+d2pF2ijCOnn/RHQRAvZtAKCnBR6voQqOH4FjtCFM1Vzzr5EAswCgt8kr
evTsSQYM071p3eJUb/dq1qs=
=5Oks
-----END PGP SIGNATURE-----
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]