projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README: update for benchmarks
[model-checker.git]
/
test
/
releaseseq.c
diff --git
a/test/releaseseq.c
b/test/releaseseq.c
index 462a59f32a30251de82bed4ffbe451b8b862ed0b..a63fa93620bb3601e6dbded7f8cff0e6fe92ebfb 100644
(file)
--- a/
test/releaseseq.c
+++ b/
test/releaseseq.c
@@
-5,10
+5,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;
@@
-23,7
+23,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));
}
@@
-32,7
+32,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;
{
thrd_t t1, t2, t3;
@@
-47,4
+47,6
@@
void user_main()
thrd_join(t2);
thrd_join(t3);
printf("Thread %d is finished\n", thrd_current());
thrd_join(t2);
thrd_join(t3);
printf("Thread %d is finished\n", thrd_current());
+
+ return 0;
}
}