|
From: Konstantin S. <kon...@gm...> - 2008-03-13 15:23:53
|
On Thu, Mar 13, 2008 at 6:11 PM, Julian Seward <js...@ac...> wrote: > On Thursday 13 March 2008 15:30, Konstantin Serebryany wrote: > > I have various situations similar to this one (at least, similar to > > the minimized test). > > I fix it by annotating the source code by Helgrind's client requests. > > CONDVAR_SIGNAL and CONVAR_WAIT. > > These client request are available only in HGDEV branch so far. > > But what is the underlying reason? I suspect it is that there is > a dependency on the numerical value of a_stopped; and that dependency > between the two threads is not visible to H, since it only sees > dependencies created by mutex locks/unlocks and pthread cond/signal > events (etc). > > Is that right? > > Also, do ANNOTATE_CONDVAR_WAIT/SIGNAL artifically notify H of this > dependency? Yes, I think this is the correct explanation. In fact ANNOTATE_CONDVAR_WAIT/SIGNAL client request are just those that are used in interceptors for pthread_cond_wait/signal ` --kcc |