From eb9e3f6c13d6519884da7199d52c0a53f4bc43f4 Mon Sep 17 00:00:00 2001 From: Peizhao Ou Date: Wed, 18 Nov 2015 16:30:41 -0800 Subject: [PATCH] edits --- benchmark/chase-lev-deque-bugfix/deque.c | 2 +- output/Makefile | 2 +- output/benchmarks.mk | 2 +- output/chase-lev-deque-bugfix/deque.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/benchmark/chase-lev-deque-bugfix/deque.c b/benchmark/chase-lev-deque-bugfix/deque.c index 010704c..b4f6317 100644 --- a/benchmark/chase-lev-deque-bugfix/deque.c +++ b/benchmark/chase-lev-deque-bugfix/deque.c @@ -118,7 +118,7 @@ void push(Deque *q, int x) { resize(q); // CDSSpec can actually detect the same bug if we avoid the UL error //Bug in paper...should have next line... - //a = (Array *) atomic_load_explicit(&q->array, memory_order_relaxed); + a = (Array *) atomic_load_explicit(&q->array, memory_order_relaxed); /** //@Begin @Commit_point_define_check: true diff --git a/output/Makefile b/output/Makefile index a5b333b..fc54440 100644 --- a/output/Makefile +++ b/output/Makefile @@ -4,7 +4,7 @@ treiber-stack DIRS := ms-queue concurrent-hashmap linuxrwlocks mcs-lock read-copy-update \ - chase-lev-deque-bugfix spsc-bugfix mpmc-queue + chase-lev-deque-bugfix spsc-bugfix mpmc-queue seqlock .PHONY: $(DIRS) diff --git a/output/benchmarks.mk b/output/benchmarks.mk index 20a76d8..e7a8736 100644 --- a/output/benchmarks.mk +++ b/output/benchmarks.mk @@ -12,7 +12,7 @@ BASE = $(HOME)/model-checker-priv/model-checker-priv INCLUDE = -I$(BASE)/include -I../include -I$(BASE)/spec-analysis -I$(BASE) # C preprocessor flags -CPPFLAGS += $(INCLUDE) -g +CPPFLAGS += $(INCLUDE) -O3 # C++ compiler flags CXXFLAGS += $(CPPFLAGS) diff --git a/output/chase-lev-deque-bugfix/deque.c b/output/chase-lev-deque-bugfix/deque.c index 15ffe0f..68eab07 100644 --- a/output/chase-lev-deque-bugfix/deque.c +++ b/output/chase-lev-deque-bugfix/deque.c @@ -153,7 +153,8 @@ void __wrapper__push(Deque * q, int x) { Array *a = (Array *) atomic_load_explicit(&q->array, memory_order_relaxed); if (b - t > atomic_load_explicit(&a->size, memory_order_relaxed) - 1) { resize(q); - + a = (Array *) atomic_load_explicit(&q->array, memory_order_relaxed); + } int size = atomic_load_explicit(&a->size, memory_order_relaxed); -- 2.34.1