Re: problems with pthread_cond_broadcast
Dinakar Guniguntala <[email protected]> Thu, 15 Apr 2004 13:40:59 +0530
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <OF5B28D1F9.A843CD79-ON65256E77.002C6F4D-65256E77.002CA710@in.ibm.com> |
I believe this problem has been resolved with Update 2 level of NPTL.
(or the current cvs)
Though I really didn't dig deep to see what the problem was
Thorsten Kukuk
<[email protected]> To: [email protected]
Sent by: cc:
phil-list-bounces Subject: problems with pthread_cond_broadcast
@redhat.com
04/15/2004 11:20
AM
Hi,
I have a problem with pthread_cond_wait/pthread_cond_broadcast
waiting sometimes forever on a fast SMP machine. Attached is a
simple test case.
If I use the order
pthread_mutex_unlock (&lock);
pthread_cond_broadcast (&pcond);
with NPTL, the program will hang after a short time running with
current glibc + NPTL + kernel 2.6.x on all architectures I tested.
If I revert the order to
pthread_cond_broadcast (&pcond);
pthread_mutex_unlock (&lock);
it works fine.
Is this a problem of the test case (since pthread_cond_broadcast and
pthread_cond_wait will access pcond at the same time in different
threads) or is this a glibc/NPTL/kernel problem?
Thanks for any hint,
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ [email protected]
SuSE Linux AG Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
--
Phil-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/phil-list
#### breaknptl.c has been removed from this note on April 15 2004 by
Dinakar Guniguntala