>
> Another way is with O(log N) new segments. No need for segments
> that do not belong to any thread, and you can implement it using
> the existing Segment representation easily....
Emm, not sure about this.
What I did is not just to implement barrier, but to implement any graph
structure where one segment may have arbitrary number of segments that
happen-before it.
A more general example is when we have N1 threads signaling on one CV and N2
threads waiting on this CV.
I heard that this technique or something like it is explained in
> Arndt Muehlenfeld's thesis, although I did not read it.
I did exactly what described there. See
http://code.google.com/p/data-race-test/wiki/BarrierSupport.
>
>
> It is inefficient (in space) compared to having a single fake segment.
For barrier with N threads I create N fake segments. So it's 2x less
memory-efficient than in current helgrind.
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers