projects
/
model-checker-benchmarks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
510a66b
)
deque: wrong bug fix before...now the correct one
author
Brian Demsky
<bdemsky@uci.edu>
Thu, 7 Mar 2013 03:06:26 +0000
(19:06 -0800)
committer
Brian Demsky
<bdemsky@uci.edu>
Thu, 7 Mar 2013 03:06:26 +0000
(19:06 -0800)
chase-lev-deque/main.c
patch
|
blob
|
history
diff --git
a/chase-lev-deque/main.c
b/chase-lev-deque/main.c
index 77ea5a850451d06c9e66eb627ade7ab4dd0e6946..ee69867f2ebb37d1aa1cd4d9c0bb9f19c0ef2926 100644
(file)
--- a/
chase-lev-deque/main.c
+++ b/
chase-lev-deque/main.c
@@
-11,7
+11,9
@@
int a;
int b;
static void task(void * param) {
- a=steal(q);
+ do {
+ a=steal(q);
+ } while(a==EMPTY);
}
int user_main(int argc, char **argv)
@@
-21,9
+23,7
@@
int user_main(int argc, char **argv)
thrd_create(&t, task, 0);
push(q, 1);
push(q, 2);
- do {
- b=take(q);
- } while(b==EMPTY);
+ b=take(q);
thrd_join(t);
if (a+b!=3)
printf("a=%d b=%d\n",a,b);