problems with pthread_cond_broadcast
Thorsten Kukuk
kukuk at suse.de
Thu Apr 15 07:48:42 UTC 2004
On Thu, Apr 15, Scott Lamb wrote:
> I think there is a problem in your test case. And I _sort_of_ see it.
> Imagine this sequence of events:
>
> Thread 1 Thread 2
> ----------------------------------------
> rw_lock_write: rw_lock_write:
> mutex_lock
> n_readers = -1
> mutex_unlock
> mutex_lock
> n_readers != 0
> rw_unlock_write:
> mutex_lock
At this place, two threads would have mutex_lock. That should
not happen and I don't see how it can happen.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk at suse.de
SuSE Linux AG Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
More information about the Phil-list
mailing list