injection result for deque
authorPeizhao Ou <peizhaoo@uci.edu>
Fri, 21 Mar 2014 21:16:13 +0000 (14:16 -0700)
committerPeizhao Ou <peizhaoo@uci.edu>
Fri, 21 Mar 2014 21:16:13 +0000 (14:16 -0700)
benchmark/chase-lev-deque-bugfix/deque.c

index e94da48..1ebeb13 100644 (file)
@@ -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. */ {