- for (success = FALSE; success == FALSE; ) {
- head = atomic_load(&smp->head);
- tail = atomic_load(&smp->tail);
- next = atomic_load(&smp->nodes[get_ptr(head)].next);
- if (atomic_load(&smp->head) == head) {
+ while (!success) {
+ head = atomic_load_explicit(&q->head, acquire);
+ tail = atomic_load_explicit(&q->tail, acquire);
+ next = atomic_load_explicit(&q->nodes[get_ptr(head)].next, acquire);
+ if (atomic_load_explicit(&q->head, relaxed) == head) {