Re: nptl 0.30

Ulrich Drepper <[email protected]>
Newsgroups gmane.comp.lib.phil
Organization Red Hat, Inc.
Message-ID <[email protected]>
-----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-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.