changes
[cdsspec-compiler.git] / benchmark / chase-lev-deque-bugfix / main.c
index 786aa3c9e975a6b013886887b3d375a98ba68560..6be90a5f7ffe73fc49f731ba6fd80cdf9f48e1f8 100644 (file)
@@ -16,6 +16,11 @@ int c;
 static void task(void * param) {
        //a=steal(q);
        a=steal(q);
+       if (a == ABORT) {
+               printf("Steal NULL\n");
+       } else {
+               printf("Steal %d\n", a);
+       }
 }
 
 int user_main(int argc, char **argv)
@@ -29,10 +34,23 @@ int user_main(int argc, char **argv)
        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;