projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
934b4d3
)
userprog: use modulo
author
Brian Norris
<banorris@uci.edu>
Mon, 21 May 2012 18:59:02 +0000
(11:59 -0700)
committer
Brian Norris
<banorris@uci.edu>
Mon, 21 May 2012 18:59:02 +0000
(11:59 -0700)
Increasing the number of loops is useless unless we have modulo here... I
don't know why this was changed by Subramanian.
userprog.c
patch
|
blob
|
history
diff --git
a/userprog.c
b/userprog.c
index 0948f0bc395a5d103963e99d81592ac6e2307072..2854ddc4a6b73bdf366b63262ed63ff3c8911eff 100644
(file)
--- a/
userprog.c
+++ b/
userprog.c
@@
-14,7
+14,7
@@
static void a(atomic_int *obj)
for (i = 0; i < 2; i++) {
printf("Thread %d, loop %d\n", thrd_current(), i);
- switch (i
) {
+ switch (i
% 2
) {
case 1:
ret = atomic_load(obj);
printf("Read value: %d\n", ret);