OSDN Git Service

PR libgomp/45240
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Dec 2010 14:30:37 +0000 (14:30 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Dec 2010 14:30:37 +0000 (14:30 +0000)
* parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
at the end if sync builtins aren't supported.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167370 138bc75d-0d04-0410-961f-82ee72b054a4

libgomp/ChangeLog
libgomp/parallel.c

index 0318e38..7064d66 100644 (file)
@@ -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.
 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
index d83d169..c0966df 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).
    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;
 #else
          gomp_mutex_lock (&gomp_remaining_threads_lock);
          gomp_remaining_threads_count -= team->nthreads - 1;
+         gomp_mutex_unlock (&gomp_remaining_threads_lock);
 #endif
        }
     }
 #endif
        }
     }