From: Peizhao Ou <peizhaoo@uci.edu>
Date: Wed, 18 Nov 2015 03:06:02 +0000 (-0800)
Subject: edits
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=079a827884448a407adccbe1ae2696cafcaa0e0e;p=cdsspec-compiler.git

edits
---

diff --git a/benchmark/chase-lev-deque-bugfix/testcase.c b/benchmark/chase-lev-deque-bugfix/testcase.c
deleted file mode 100644
index 761ff46..0000000
--- a/benchmark/chase-lev-deque-bugfix/testcase.c
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <stdlib.h>
-#include <assert.h>
-#include <stdio.h>
-#include <threads.h>
-#include <stdatomic.h>
-
-#include "model-assert.h"
-
-#include "deque.h"
-
-Deque *q;
-int a;
-int b;
-int c;
-int x;
-
-static void task(void * param) {
-	a=steal(q);
-	if (a == ABORT) {
-		printf("Steal NULL\n");
-	} else {
-		printf("Steal %d\n", a);
-	}
-	x=steal(q);
-	if (x == ABORT) {
-		printf("Steal NULL\n");
-	} else {
-		printf("Steal %d\n", x);
-	}
-}
-
-int user_main(int argc, char **argv)
-{
-	/**
-		@Begin
-		@Entry_point
-		@End
-	*/
-	thrd_t t;
-	q=create();
-	thrd_create(&t, task, 0);
-	push(q, 1);
-	printf("Push 1\n");
-	push(q, 2);
-	printf("Push 2\n");
-	push(q, 4);
-	printf("Push 4\n");
-	b=take(q);
-	if (b == EMPTY) {
-		printf("Take NULL\n");
-	} else {
-		printf("Take %d\n", b);
-	}
-	c=take(q);
-	if (c == EMPTY) {
-		printf("Take NULL\n");
-	} else {
-		printf("Take %d\n", c);
-	}
-	thrd_join(t);
-/*
-	bool correct=true;
-	if (a!=1 && a!=2 && a!=4 && a!= EMPTY)
-		correct=false;
-	if (b!=1 && b!=2 && b!=4 && b!= EMPTY)
-		correct=false;
-	if (c!=1 && c!=2 && c!=4 && a!= EMPTY)
-		correct=false;
-	if (a!=EMPTY && b!=EMPTY && c!=EMPTY && (a+b+c)!=7)
-		correct=false;
-	if (!correct)
-		printf("a=%d b=%d c=%d\n",a,b,c);
-		*/
-	//MODEL_ASSERT(correct);
-
-	return 0;
-}
diff --git a/output/Makefile b/output/Makefile
index 7877016..06184fe 100644
--- a/output/Makefile
+++ b/output/Makefile
@@ -3,7 +3,7 @@
 	concurrent-hashmap seqlock spsc-example spsc-queue-scfence \
 	treiber-stack
 
-DIRS := ms-queue concurrent-hashmap linuxrwlocks mcs-lock read-copy-update
+DIRS := ms-queue concurrent-hashmap linuxrwlocks mcs-lock read-copy-update chase-lev-deque-bugfix
 
 .PHONY: $(DIRS)
 
diff --git a/src/edu/uci/eecs/specCompiler/codeGenerator/CodeGenerator.java b/src/edu/uci/eecs/specCompiler/codeGenerator/CodeGenerator.java
index c75fd81..fe4fd3b 100644
--- a/src/edu/uci/eecs/specCompiler/codeGenerator/CodeGenerator.java
+++ b/src/edu/uci/eecs/specCompiler/codeGenerator/CodeGenerator.java
@@ -318,11 +318,12 @@ public class CodeGenerator {
 		File[] srcTrylock = { new File(homeDir
 				+ "/benchmark/trylock/trylock.c") };
 
-//		File[] srcDeque = {
-//				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/deque.c"),
-//				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/main.c"),
-//				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/testcase.c"),
-//				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/deque.h") };
+		File[] srcDeque = {
+				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/deque.c"),
+				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/main.c"),
+				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/testcase1.c"),
+				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/testcase2.c"),
+				new File(homeDir + "/benchmark/chase-lev-deque-bugfix/deque.h") };
 //
 		File[] srcMCSLock = {
 				new File(homeDir + "/benchmark/mcs-lock/mcs-lock.cc"),
@@ -340,7 +341,7 @@ public class CodeGenerator {
 //		File[][] sources = { srcLinuxRWLocks,  srcMSQueue, srcRCU,
 //				srcDeque, srcMCSLock, srcSPSCQueue, srcMPMCQueue, srcHashtable };
 
-		 File[][] sources = {srcRCU};
+		 File[][] sources = {srcDeque};
 		// Compile all the benchmarks
 		for (int i = 0; i < sources.length; i++) {
 			CodeGenerator gen = new CodeGenerator(sources[i]);