X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Freleaseseq.c;h=548f0a822380ae19640cb30197d7ac6e1209fde4;hb=1da45a14f1affce44fd050d4ddf63c9264526dbb;hp=27f2fb1cb8e5f5a357ce3da6a981f5e223538281;hpb=b59d5f84ac4800cc144fc7c8837d96181423d9ae;p=model-checker.git diff --git a/test/releaseseq.c b/test/releaseseq.c index 27f2fb1..548f0a8 100644 --- a/test/releaseseq.c +++ b/test/releaseseq.c @@ -5,10 +5,10 @@ */ #include +#include +#include -#include "libthreads.h" #include "librace.h" -#include "stdatomic.h" atomic_int x; int var = 0; @@ -23,7 +23,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)); } @@ -38,7 +38,7 @@ int user_main(int argc, char **argv) atomic_init(&x, 0); - printf("Thread %d: creating 3 threads\n", thrd_current()); + printf("Main thread: creating 3 threads\n"); thrd_create(&t1, (thrd_start_t)&a, NULL); thrd_create(&t2, (thrd_start_t)&b, NULL); thrd_create(&t3, (thrd_start_t)&c, NULL); @@ -46,7 +46,7 @@ int user_main(int argc, char **argv) thrd_join(t1); thrd_join(t2); thrd_join(t3); - printf("Thread %d is finished\n", thrd_current()); + printf("Main thread is finished\n"); return 0; }