projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/master' into pldi13
[model-checker.git]
/
test
/
double-relseq.c
diff --git
a/test/double-relseq.c
b/test/double-relseq.c
index 5b220eb888c08f81610516d82c7d44f884054cec..65c3f55d791df600afa617b61ef4468ef3a5df6b 100644
(file)
--- a/
test/double-relseq.c
+++ b/
test/double-relseq.c
@@
-10,10
+10,10
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include <threads.h>
+#include <stdatomic.h>
-#include "libthreads.h"
#include "librace.h"
#include "librace.h"
-#include "stdatomic.h"
atomic_int x;
int var = 0;
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);
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));
}
printf("load %d\n", load_32(&var));
}
@@
-37,7
+37,7
@@
static void c(void *obj)
atomic_store_explicit(&x, 2, memory_order_relaxed);
}
atomic_store_explicit(&x, 2, memory_order_relaxed);
}
-
void user_main(
)
+
int user_main(int argc, char **argv
)
{
thrd_t t1, t2, t3, t4;
{
thrd_t t1, t2, t3, t4;
@@
-54,4
+54,6
@@
void user_main()
thrd_join(t3);
thrd_join(t4);
printf("Thread %d is finished\n", thrd_current());
thrd_join(t3);
thrd_join(t4);
printf("Thread %d is finished\n", thrd_current());
+
+ return 0;
}
}