From: Jakub Jelinek Date: Tue, 7 Dec 2010 18:59:03 +0000 (+0100) Subject: backport: re PR libgomp/45240 (parallel.c: GOMP_parallel_end locks a mutex but fails... X-Git-Tag: releases/gcc-4.4.6~232 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=120684090545210eba643a275527fa2191af824c;p=thirdparty%2Fgcc.git backport: re PR libgomp/45240 (parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete) Backport from mainline 2010-12-02 Jakub Jelinek PR libgomp/45240 * parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock at the end if sync builtins aren't supported. From-SVN: r167560 --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index ce115dafbdfc..fbe141a4dd40 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,12 @@ +2010-12-07 Jakub Jelinek + + Backport from mainline + 2010-12-02 Jakub Jelinek + + 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 Backport from mainline: diff --git a/libgomp/parallel.c b/libgomp/parallel.c index d83d1698fd5d..c0966df9f9a5 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 . 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 } }