diff options
author | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-15 21:41:26 +0000 |
---|---|---|
committer | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-15 21:41:26 +0000 |
commit | 04752a80fdb1cb2e38757ebaec356af67045d1eb (patch) | |
tree | f5f02a9f51b47060fb565bb67ec28d225f78e0f9 | |
parent | fb63575c3b199ef16880faf1af93478553f33adf (diff) | |
download | gcc-04752a80fdb1cb2e38757ebaec356af67045d1eb.tar.gz |
* env.c (initialize_env): Always initialize gomp_remaining_threads_lock
mutex when HAVE_SYNC_BUILTINS isn't defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136827 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/env.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index d0669244d91..f29f92254c8 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2008-06-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * env.c (initialize_env): Always initialize gomp_remaining_threads_lock + mutex when HAVE_SYNC_BUILTINS isn't defined. + 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * libgomp.texi (omp_test_lock): Fix typo. diff --git a/libgomp/env.c b/libgomp/env.c index 50872c277fe..b1349c8e69a 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -487,12 +487,10 @@ initialize_env (void) parse_unsigned_long ("OMP_MAX_ACTIVE_LEVELS", &gomp_max_active_levels_var); parse_unsigned_long ("OMP_THREAD_LIMIT", &gomp_thread_limit_var); if (gomp_thread_limit_var != ULONG_MAX) - { - gomp_remaining_threads_count = gomp_thread_limit_var - 1; + gomp_remaining_threads_count = gomp_thread_limit_var - 1; #ifndef HAVE_SYNC_BUILTINS - gomp_mutex_init (&gomp_remaining_threads_lock); + gomp_mutex_init (&gomp_remaining_threads_lock); #endif - } gomp_init_num_threads (); gomp_available_cpus = gomp_global_icv.nthreads_var; if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_global_icv.nthreads_var)) |