diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-01 06:24:29 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-01 06:24:29 +0000 |
commit | f24329deac63d825805147fd7c084816af66c318 (patch) | |
tree | 3c6094673888e95f2c66b8a07e514ddf36be3d53 /libgomp/critical.c | |
parent | 7c57630f83df248e0ed7fb5c8447c0be30852296 (diff) | |
download | gcc-f24329deac63d825805147fd7c084816af66c318.tar.gz |
2011-12-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 181872 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@181873 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/critical.c')
-rw-r--r-- | libgomp/critical.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgomp/critical.c b/libgomp/critical.c index daf1ffc2137..414c4221626 100644 --- a/libgomp/critical.c +++ b/libgomp/critical.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2009, 2011 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU OpenMP Library (libgomp). @@ -33,6 +33,8 @@ static gomp_mutex_t default_lock; void GOMP_critical_start (void) { + /* There is an implicit flush on entry to a critical region. */ + __atomic_thread_fence (MEMMODEL_RELEASE); gomp_mutex_lock (&default_lock); } |