On Mon, Nov 28, 2011 at 09:15:02AM +0100, Jakub Jelinek wrote: > On Mon, Nov 28, 2011 at 10:37:09AM +1030, Alan Modra wrote: > > 14 A flush region without a list is implied at the following locations: > > 15 • During a barrier region. > > 16 • At entry to and exit from parallel, critical, and ordered regions. > > [snip]
> If it is just GOMP_critical_start, couldn't it use an extra barrier > before resp. after it calls mutex_lock? I believe gomp_ordered_sync needs a barrier, and I'm unsure about GOMP_parallel_start but I think one is needed there too. Yes, putting the barriers where they are actually needed is the best solution, but I'm far from an OpenMP expert so am unsure whether these are the only places requiring a barrier. -- Alan Modra Australia Development Lab, IBM