projects
/
model-checker-benchmarks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add another testcase for dekker-fences
[model-checker-benchmarks.git]
/
seqlock
/
testcase1.c
diff --git
a/seqlock/testcase1.c
b/seqlock/testcase1.c
index 8441972702762d0ab33aef89f5ca9c435331fae8..0c9e49cf1c3662d9158775117264ce5273d33ca2 100644
(file)
--- a/
seqlock/testcase1.c
+++ b/
seqlock/testcase1.c
@@
-11,10
+11,10
@@
static void a(void *obj) {
static void b(void *obj) {
lock->write(2);
static void b(void *obj) {
lock->write(2);
+ int r1 = lock->read();
}
static void c(void *obj) {
}
static void c(void *obj) {
- lock->write(2);
int r1 = lock->read();
}
int r1 = lock->read();
}
@@
-23,11
+23,11
@@
int user_main(int argc, char **argv) {
lock = new seqlock_t();
thrd_create(&t1, (thrd_start_t)&a, NULL);
lock = new seqlock_t();
thrd_create(&t1, (thrd_start_t)&a, NULL);
-
//
thrd_create(&t2, (thrd_start_t)&b, NULL);
- thrd_create(&t3, (thrd_start_t)&c, NULL);
+ thrd_create(&t2, (thrd_start_t)&b, NULL);
+
//
thrd_create(&t3, (thrd_start_t)&c, NULL);
thrd_join(t1);
thrd_join(t1);
-
//
thrd_join(t2);
- thrd_join(t3);
+ thrd_join(t2);
+
//
thrd_join(t3);
return 0;
}
return 0;
}