|
From: Panagiotis F. <paf...@gm...> - 2011-05-15 18:54:57
|
Thank you for your response. Not sure what you mean however. If Thread1 did a read(global_array[0]) and Thread2 did a write(global_array[1]), then there is still no race. Or you mean that in that case helgrind would mistakenly report it as a race? Thank you, Panagiotis On Sun, May 15, 2011 at 1:59 PM, John Reiser <jr...@bi...> wrote: > > 1) Suppose that there is a global array named 'global_array'. Image the > scenario where Thread1 does *global_array[0]*=value1 and Thread2 does > *global_array[1]*=value2 without any protection. Clearly, that scenario does > not cause any inconsistency problems. Is it possible that helgrind reports > that > > scenario as a "Possible race"? > > There cannot be a race unless there is at least one fetch from memory > which could follow a store to memory. The example contains no fetches, > therefore there cannot be a race. It is a bug if helgrind complains. > > -- > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |