summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2022-08-24 13:24:24 -0400
committerRobert Morris <[email protected]>2022-08-24 13:24:24 -0400
commit9c1b8a4eb085d7c639c2039fc14beba83d95653e (patch)
treec278acf9ced36ffd58dcb27aac5a6ef2457d7a1e /user
parent96047832c62e6a172c92f9ead6715b553d4c2271 (diff)
downloadxv6-labs-9c1b8a4eb085d7c639c2039fc14beba83d95653e.tar.gz
xv6-labs-9c1b8a4eb085d7c639c2039fc14beba83d95653e.tar.bz2
xv6-labs-9c1b8a4eb085d7c639c2039fc14beba83d95653e.zip
sfence before writing satp, as well as after
Diffstat (limited to 'user')
-rw-r--r--user/grind.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/user/grind.c b/user/grind.c
index 5cd89f4..431ed19 100644
--- a/user/grind.c
+++ b/user/grind.c
@@ -305,7 +305,7 @@ iter()
exit(1);
}
if(pid1 == 0){
- rand_next = 31;
+ rand_next ^= 31;
go(0);
exit(0);
}
@@ -316,7 +316,7 @@ iter()
exit(1);
}
if(pid2 == 0){
- rand_next = 7177;
+ rand_next ^= 7177;
go(1);
exit(0);
}
@@ -346,5 +346,6 @@ main()
wait(0);
}
sleep(20);
+ rand_next += 1;
}
}