X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=test%2Fdouble-relseq.c;h=2ad1987aebe197ec098e46ff9b1ea354e2f7f085;hb=92db01802459e4913d32683c27e8b5cea2d9c2b2;hp=53147b72035e914bb095daa74eee3a968557de0b;hpb=616746ec12aae78b0d0262c009568109686cb000;p=model-checker.git diff --git a/test/double-relseq.c b/test/double-relseq.c index 53147b7..2ad1987 100644 --- a/test/double-relseq.c +++ b/test/double-relseq.c @@ -10,10 +10,10 @@ */ #include - #include +#include + #include "librace.h" -#include "stdatomic.h" atomic_int x; int var = 0; @@ -28,7 +28,7 @@ static void a(void *obj) static void b(void *obj) { int r = atomic_load_explicit(&x, memory_order_acquire); - printf("r = %u\n", r); + printf("r = %d\n", r); printf("load %d\n", load_32(&var)); } @@ -43,7 +43,7 @@ int user_main(int argc, char **argv) atomic_init(&x, 0); - printf("Thread %d: creating 4 threads\n", thrd_current()); + printf("Main thread: creating 4 threads\n"); thrd_create(&t1, (thrd_start_t)&a, NULL); thrd_create(&t2, (thrd_start_t)&b, NULL); thrd_create(&t3, (thrd_start_t)&b, NULL); @@ -53,7 +53,7 @@ int user_main(int argc, char **argv) thrd_join(t2); thrd_join(t3); thrd_join(t4); - printf("Thread %d is finished\n", thrd_current()); + printf("Main thread is finished\n"); return 0; }