diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-12 07:52:15 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-12 07:52:15 +0000 |
commit | 4892de53b20c7a2492acf1082bbc79ac67a17ef4 (patch) | |
tree | 5760fed5f9e50ee90f8b5a5eeaf2cff3e8f4abcf /libgomp/config/linux | |
parent | cc45cebf76db271650ea2379976c4f8de7bd1ab5 (diff) | |
download | gcc-4892de53b20c7a2492acf1082bbc79ac67a17ef4.tar.gz |
PR libgomp/58691
* config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
to check variable.
(gomp_init_num_threads): Move i variable declaration into
#ifdef CPU_ALLOC_SIZE block.
* config/linux/affinity.c (gomp_affinity_init_level): Test
gomp_places_list_len == 0 rather than gomp_places_list == 0
when checking for topology reading error.
* team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
* env.c (parse_affinity): Add ignore argument, if true, don't populate
gomp_places_list, only parse env var and always return false.
(parse_places_var): Likewise. Don't check gomp_global_icv.bind_var.
(initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
and either of these variables were parsed correctly into a places
list.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203479 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/config/linux')
-rw-r--r-- | libgomp/config/linux/affinity.c | 2 | ||||
-rw-r--r-- | libgomp/config/linux/proc.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libgomp/config/linux/affinity.c b/libgomp/config/linux/affinity.c index 789cdce077d..bc5c9fcb656 100644 --- a/libgomp/config/linux/affinity.c +++ b/libgomp/config/linux/affinity.c @@ -309,7 +309,7 @@ gomp_affinity_init_level (int level, unsigned long count, bool quiet) fclose (f); } } - if (gomp_places_list == 0) + if (gomp_places_list_len == 0) { if (!quiet) gomp_error ("Error reading %s topology", diff --git a/libgomp/config/linux/proc.c b/libgomp/config/linux/proc.c index d4ae116e239..76616dd37a0 100644 --- a/libgomp/config/linux/proc.c +++ b/libgomp/config/linux/proc.c @@ -59,7 +59,7 @@ gomp_cpuset_popcount (unsigned long cpusetsize, cpu_set_t *cpusetp) size_t i; unsigned long ret = 0; extern int check[sizeof (cpusetp->__bits[0]) == sizeof (unsigned long int) - ? 1 : -1]; + ? 1 : -1] __attribute__((unused)); for (i = 0; i < cpusetsize / sizeof (cpusetp->__bits[0]); i++) { @@ -94,7 +94,6 @@ gomp_init_num_threads (void) gomp_cpusetp); if (ret == 0) { - unsigned long i; /* Count only the CPUs this process can use. */ gomp_global_icv.nthreads_var = gomp_cpuset_popcount (gomp_cpuset_size, gomp_cpusetp); @@ -102,6 +101,7 @@ gomp_init_num_threads (void) break; gomp_get_cpuset_size = gomp_cpuset_size; #ifdef CPU_ALLOC_SIZE + unsigned long i; for (i = gomp_cpuset_size * 8; i; i--) if (CPU_ISSET_S (i - 1, gomp_cpuset_size, gomp_cpusetp)) break; |