summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/testwsdeque.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rts/testwsdeque.c')
-rw-r--r--testsuite/tests/rts/testwsdeque.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/testsuite/tests/rts/testwsdeque.c b/testsuite/tests/rts/testwsdeque.c
index 3f17f321cd..0a2a64d78e 100644
--- a/testsuite/tests/rts/testwsdeque.c
+++ b/testsuite/tests/rts/testwsdeque.c
@@ -50,14 +50,17 @@ myStealWSDeque_ (WSDeque *q, uint32_t n)
// concurrent popWSQueue() operation.
if ((long)b - (long)t <= 0 ) {
return NULL; /* already looks empty, abort */
- }
-
+ }
+ // NB. the load of q->bottom must be ordered before the load of
+ // q->elements[t & q-> moduloSize]. See comment "KG:..." below
+ // and Ticket #13633.
+ load_load_barrier();
/* now access array, see pushBottom() */
stolen = q->elements[t & q->moduloSize];
/* now decide whether we have won */
if ( !(CASTOP(&(q->top),t,t+1)) ) {
- /* lost the race, someon else has changed top in the meantime */
+ /* lost the race, someone else has changed top in the meantime */
return NULL;
} /* else: OK, top has been incremented by the cas call */