X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Frmwprog.c;h=feac7766c9f68154e169c143d0903cbf18b44141;hb=a09a4346390cc28a29428ee5a0610b1054aa48ed;hp=14929ee23b6502403d12f8dda1194b38c233c59e;hpb=09592530fc40cdf3eb049c1adb7f26066a450e16;p=model-checker.git diff --git a/test/rmwprog.c b/test/rmwprog.c index 14929ee..feac776 100644 --- a/test/rmwprog.c +++ b/test/rmwprog.c @@ -1,8 +1,8 @@ #include +#include +#include -#include "libthreads.h" #include "librace.h" -#include "stdatomic.h" atomic_int x; @@ -12,15 +12,16 @@ static void a(void *obj) atomic_fetch_add_explicit(&x, 1, memory_order_relaxed); } -void user_main() +int user_main(int argc, char **argv) { thrd_t t1, t2; atomic_init(&x, 0); - thrd_create(&t1, (thrd_start_t)&a, NULL); thrd_create(&t2, (thrd_start_t)&a, NULL); thrd_join(t1); thrd_join(t2); + + return 0; }