summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2006-12-04 16:35:19 -0500
committerDaniel Franke <dfranke@gcc.gnu.org>2006-12-04 16:35:19 -0500
commit62bd621610fefe92b6a8673c970623d071193786 (patch)
treea576cf7600f4ebf66dd50fcb47380a407ea7343b /libgomp
parentfe264e58e1b00a5ee3cb2bffd8feb8e2b8300fc2 (diff)
downloadgcc-62bd621610fefe92b6a8673c970623d071193786.tar.gz
re PR libgomp/29949 (implement argument checking for user accessable runtime routines)
PR libgomp/29949 * env.c (omp_set_num_threads): Set illegal thread count to 1. From-SVN: r119511
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/env.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index e704b2356f1..92b5600239a 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-04 Daniel Franke <franke.daniel@gmail.com>
+
+ PR libgomp/29949
+ * env.c (omp_set_num_threads): Set illegal thread count to 1.
+
2006-12-04 Eric Botcazou <ebotcazou@libertysurf.fr>
* configure: Regenerate.
diff --git a/libgomp/env.c b/libgomp/env.c
index af7e0c5c813..f07b31b914b 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -225,7 +225,7 @@ initialize_env (void)
void
omp_set_num_threads (int n)
{
- gomp_nthreads_var = n;
+ gomp_nthreads_var = (n > 0 ? n : 1);
}
void