Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2008 14:40:03 GMT
From:      Ed Maste <emaste@freebsd.org>
To:        freebsd-threads@FreeBSD.org
Subject:   Re: threads/128180: pthread_cond_broadcast(3) lost wakeup
Message-ID:  <200811041440.mA4Ee31J084489@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR threads/128180; it has been noted by GNATS.

From: Ed Maste <emaste@freebsd.org>
To: bug-followup@FreeBSD.org, kurt@intricatesoftware.com
Cc:  
Subject: Re: threads/128180: pthread_cond_broadcast(3) lost wakeup
Date: Tue, 4 Nov 2008 09:09:38 -0500

 > The test program doesn't look correct to me. It seems possible
 > for only a few of the threads (as little as 2) to do all the
 > work. Thread 1 can start doing work, then wait for a broadcast.
 > Thread 2 can start doing his work, then broadcast waking thread 1.
 
 It looks to me like the "tickets" and "finished" globals should make
 the test program operate correctly.  If the scenario you describe
 happens, thread 1 will just enter pthread_cond_wait again and wait
 for the broadcast from the primordial thread.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811041440.mA4Ee31J084489>