From: Brian Norris Date: Mon, 21 May 2012 18:59:02 +0000 (-0700) Subject: userprog: use modulo X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4253111e600d9e6d1c3469bbc5832d0d79ee89a;p=cdsspec-compiler.git userprog: use modulo Increasing the number of loops is useless unless we have modulo here... I don't know why this was changed by Subramanian. --- diff --git a/userprog.c b/userprog.c index 0948f0b..2854ddc 100644 --- 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);