From 9af747690356f40fa8ee4496c8f3bdb04015c404 Mon Sep 17 00:00:00 2001 From: Peizhao Ou Date: Fri, 21 Mar 2014 14:16:13 -0700 Subject: [PATCH] injection result for deque --- benchmark/chase-lev-deque-bugfix/deque.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benchmark/chase-lev-deque-bugfix/deque.c b/benchmark/chase-lev-deque-bugfix/deque.c index e94da48..1ebeb13 100644 --- a/benchmark/chase-lev-deque-bugfix/deque.c +++ b/benchmark/chase-lev-deque-bugfix/deque.c @@ -79,6 +79,7 @@ void resize(Deque *q) { for(i=top; i < bottom; i++) { atomic_store_explicit(&new_a->buffer[i % new_size], atomic_load_explicit(&a->buffer[i % size], memory_order_relaxed), memory_order_relaxed); } + /**** FIXME: detected failure ****/ atomic_store_explicit(&q->array, new_a, memory_order_release); printf("resize\n"); } @@ -90,6 +91,7 @@ void resize(Deque *q) { */ void push(Deque *q, int x) { size_t b = atomic_load_explicit(&q->bottom, memory_order_relaxed); + /**** FIXME: detected correctness ****/ size_t t = atomic_load_explicit(&q->top, memory_order_acquire); Array *a = (Array *) atomic_load_explicit(&q->array, memory_order_relaxed); if (b - t > atomic_load_explicit(&a->size, memory_order_relaxed) - 1) /* Full queue. */ { -- 2.34.1