[patch][commit] Single Mutex for sidutil::blocking_component

Dave Brolley brolley@redhat.com
Mon Feb 19 16:52:00 GMT 2007


Hi,

I've committed the attached patch which simplifies the implementation of 
sidutil::blocking_component. The use of two mutex/condition variable 
pairs for synchronizing the parent and child threads was unnecessary 
and, if you look at the existing code, you will see that they were 
always locked/unlocked/blocked in unison. The implementation now uses a 
single mutex/condition variable pair.

The patch also adds checking that a return from pthread_cond_wait was 
not spontaneous and makes the control_status member volatile for this 
purpose.

Tested extensively using the MeP port which is the only committed port 
using this class.

Dave
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sid.blocking_component.ChangeLOg
URL: <http://sourceware.org/pipermail/sid/attachments/20070219/7f664c89/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sid.blocking_component.patch.txt
URL: <http://sourceware.org/pipermail/sid/attachments/20070219/7f664c89/attachment.txt>


More information about the Sid mailing list