This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use atomics in libgomp mutex


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]