save more
[cdsspec-compiler.git] / benchmark / chase-lev-deque-bugfix / main.c
index a67be6efad20e8f81fdf029c1ffe13e8e363a29c..786aa3c9e975a6b013886887b3d375a98ba68560 100644 (file)
@@ -13,14 +13,11 @@ int a;
 int b;
 int c;
 
-static void task1(void * param) {
+static void task(void * param) {
+       //a=steal(q);
        a=steal(q);
 }
 
-static void task2(void * param) {
-       a=take(q);
-}
-
 int user_main(int argc, char **argv)
 {
        /**
@@ -28,18 +25,16 @@ int user_main(int argc, char **argv)
                @Entry_point
                @End
        */
-       thrd_t t1, t2;
+       thrd_t t;
        q=create();
+       thrd_create(&t, task, 0);
        push(q, 1);
        push(q, 2);
-       thrd_create(&t1, task1, 0);
-       thrd_create(&t2, task2, 0);
        push(q, 4);
        b=take(q);
        c=take(q);
-       thrd_join(t1);
-       thrd_join(t2);
-
+       thrd_join(t);
+/*
        bool correct=true;
        if (a!=1 && a!=2 && a!=4 && a!= EMPTY)
                correct=false;
@@ -51,6 +46,7 @@ int user_main(int argc, char **argv)
                correct=false;
        if (!correct)
                printf("a=%d b=%d c=%d\n",a,b,c);
+               */
        //MODEL_ASSERT(correct);
 
        return 0;