env.c (initialize_env): Always initialize gomp_remaining_threads_lock mutex when...
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Sun, 15 Jun 2008 21:41:26 +0000 (21:41 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 15 Jun 2008 21:41:26 +0000 (21:41 +0000)
* env.c (initialize_env): Always initialize gomp_remaining_threads_lock
mutex when HAVE_SYNC_BUILTINS isn't defined.

From-SVN: r136827

libgomp/ChangeLog
libgomp/env.c

index d0669244d9131ccfb97d8e5921f62bd307806428..f29f92254c87564cc5dec661d1f0583ee77b4fe7 100644 (file)
@@ -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.
index 50872c277fe63fbbb85eaa27c7724c3cf550fe36..b1349c8e69af3cfb6b400366eb45e4c0d590df4c 100644 (file)
@@ -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))