From 150899aa2d0f6596b085bb9c516841d790c8afd6 Mon Sep 17 00:00:00 2001 From: vondele Date: Mon, 24 Aug 2015 11:01:25 +0000 Subject: 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 --- libgomp/iter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libgomp/iter.c') 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; -- cgit v1.2.1