+2015-08-24 Joost VandeVondele <vondele@gnu.gcc.org>
+
+ 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.
+
2015-08-10 Thomas Schwinge <thomas@codesourcery.com>
* libgomp-plugin.h (enum offload_target_type): Remove
{
unsigned long long i, count = gomp_spin_count_var;
- if (__builtin_expect (gomp_managed_threads > gomp_available_cpus, 0))
+ if (__builtin_expect (__atomic_load_n (&gomp_managed_threads,
+ MEMMODEL_RELAXED)
+ > gomp_available_cpus, 0))
count = gomp_throttled_spin_count_var;
for (i = 0; i < count; i++)
if (__builtin_expect (__atomic_load_n (addr, MEMMODEL_RELAXED) != val, 0))
}
}
- start = ws->next;
+ start = __atomic_load_n (&ws->next, MEMMODEL_RELAXED);
while (1)
{
long left = end - start;
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;
}
}
- start = ws->next_ull;
+ start = __atomic_load_n (&ws->next_ull, MEMMODEL_RELAXED);
while (1)
{
gomp_ull left = end - start;
gomp_ull start, end, nend, incr;
gomp_ull chunk_size;
- start = ws->next_ull;
+ start = __atomic_load_n (&ws->next_ull, MEMMODEL_RELAXED);
end = ws->end_ull;
incr = ws->incr_ull;
chunk_size = ws->chunk_size_ull;