diff options
author | vondele <vondele@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-24 11:01:25 +0000 |
---|---|---|
committer | vondele <vondele@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-24 11:01:25 +0000 |
commit | 150899aa2d0f6596b085bb9c516841d790c8afd6 (patch) | |
tree | 9ce340525056994200979fde5121c358e4f37981 /libgomp/iter.c | |
parent | ef14bb5d3a380815bf52cd1560f1a1f40878b975 (diff) | |
download | gcc-150899aa2d0f6596b085bb9c516841d790c8afd6.tar.gz |
PR libgomp/66761
PR libgomp/67303
* iter.c (gomp_iter_dynamic_next): Employ an atomic load.
(gomp_iter_guided_next): Idem.
* iter_ull.c (gomp_iter_ull_dynamic_next): Idem.
(gomp_iter_ull_guided_next): Idem.
* config/linux/wait.h (do_spin): Idem.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227119 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/iter.c')
-rw-r--r-- | libgomp/iter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgomp/iter.c b/libgomp/iter.c index 0ceb41d909e..1def8bde066 100644 --- a/libgomp/iter.c +++ b/libgomp/iter.c @@ -218,7 +218,7 @@ gomp_iter_dynamic_next (long *pstart, long *pend) } } - start = ws->next; + start = __atomic_load_n (&ws->next, MEMMODEL_RELAXED); while (1) { long left = end - start; @@ -301,7 +301,7 @@ gomp_iter_guided_next (long *pstart, long *pend) long start, end, nend, incr; unsigned long chunk_size; - start = ws->next; + start = __atomic_load_n (&ws->next, MEMMODEL_RELAXED); end = ws->end; incr = ws->incr; chunk_size = ws->chunk_size; |