On Fri, 2013-09-27 at 15:01 +0000, Phil Longstaff wrote:
> I was thinking about this one last night, and it's trickier than I first 
> thought.
> 
> L = lock, T = trylock
> Thread1: L1 L2
> Thread2: L2 T1
> 
> Not a deadlock because the trylock will just fail.  However, suppose we have:
> 
> Thread1: L1 L2
> Thread2: L2 T1
> 
> And then later:
> 
> Thread 3: L1 L2
> 
> When helgrind handles L2, it would already find the graph edge L1 -> L2 so 
> wouldn't it just return 
> since that is the "correct order"?  David sent me some past e-mail and I saw 
> some comments about 
> putting lock vs trylock into the graph.  Seems to me that when processing T2, 
> helgrind would not 
> report a problem, but would add the T2 -> L1 link, and would also need to 
> ensure that if L1 -> L2 
> happens in the future, it is reported.

Did not see much of the attached mails or discussions,
so I guess the reference to the discussions on valusers is:
http://thread.gmane.org/gmane.comp.debugging.valgrind/12616

Philippe




------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to