X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=chase-lev-deque-bugfix%2Ftestcase3.c;h=ed020144f59cfcec6f505a25be82fa59e9c28c0c;hb=d634d19b6134309ed0893c6fd58d815cbafecd16;hp=92f33ec409a27f4d2553057dcd0972d9857f3b2a;hpb=7af936f607d179d4c9df6fa64df17cf30c6f8e59;p=model-checker-benchmarks.git diff --git a/chase-lev-deque-bugfix/testcase3.c b/chase-lev-deque-bugfix/testcase3.c index 92f33ec..ed02014 100644 --- a/chase-lev-deque-bugfix/testcase3.c +++ b/chase-lev-deque-bugfix/testcase3.c @@ -13,25 +13,27 @@ int a; int b; int c; +/** Making CAS in steal() (w39) SC */ + static void task(void * param) { - a=steal(q); - printf("steal a=%d\n", a); + b=steal(q); + //c=steal(q); } int user_main(int argc, char **argv) { thrd_t t1, t2; q=create(); + push(q, 1); + push(q, 2); + push(q, 3); thrd_create(&t1, task, 0); - //thrd_create(&t2, task, 0); - //push(q, 2); - //push(q, 4); - b=take(q); - printf("take b=%d\n", b); + thrd_create(&t2, task, 0); + a=take(q); //c=take(q); thrd_join(t1); - //thrd_join(t2); + thrd_join(t2); /* bool correct=true;