]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR libgomp/45240 (parallel.c: GOMP_parallel_end locks a mutex but fails...
authorJakub Jelinek <jakub@redhat.com>
Tue, 7 Dec 2010 15:26:37 +0000 (16:26 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 7 Dec 2010 15:26:37 +0000 (16:26 +0100)
Backport from mainline
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.

From-SVN: r167547

libgomp/ChangeLog
libgomp/parallel.c

index 17876136c2b3650eccfa4763b885b61171a8252e..861d6e008f25b0f34c0bb0f7c6033ce81e8f4f89 100644 (file)
@@ -1,3 +1,12 @@
+2010-12-07  Jakub Jelinek  <jakub@redhat.com>
+
+       Backport from mainline
+       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-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        Backport from mainline:
index d83d1698fd5d0d203aa8fb6ff61b3433809ce122..c0966df9f9a54ac7ab5a22c105e9e167de861753 100644 (file)
@@ -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
        }
     }