aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-12-02 15:30:37 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2010-12-02 15:30:37 +0100
commitb7516041a1e540b8db3c76ef4df192404d5daafd (patch)
treed6c1e70ff5cd0df4588c7a0452b86b142be9c0cd /libgomp
parent266afdd60e1f7c6429fd7a6902b4b3360f55a90a (diff)
downloadgcc-b7516041a1e540b8db3c76ef4df192404d5daafd.zip
gcc-b7516041a1e540b8db3c76ef4df192404d5daafd.tar.gz
gcc-b7516041a1e540b8db3c76ef4df192404d5daafd.tar.bz2
re PR libgomp/45240 (parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete)
PR libgomp/45240 * parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock at the end if sync builtins aren't supported. From-SVN: r167370
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog6
-rw-r--r--libgomp/parallel.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 0318e38..7064d66 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/45240
+ * parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
+ at the end if sync builtins aren't supported.
+
2010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
diff --git a/libgomp/parallel.c b/libgomp/parallel.c
index d83d169..c0966df 100644
--- a/libgomp/parallel.c
+++ b/libgomp/parallel.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU OpenMP Library (libgomp).
@@ -123,6 +123,7 @@ GOMP_parallel_end (void)
#else
gomp_mutex_lock (&gomp_remaining_threads_lock);
gomp_remaining_threads_count -= team->nthreads - 1;
+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
#endif
}
}