projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4def0a
)
Sleep until recent_cpu actually decays.
author
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 5 Oct 2006 03:07:31 +0000
(
03:07
+0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 5 Oct 2006 03:07:31 +0000
(
03:07
+0000)
src/tests/threads/mlfqs-recent-1.c
patch
|
blob
|
history
diff --git
a/src/tests/threads/mlfqs-recent-1.c
b/src/tests/threads/mlfqs-recent-1.c
index 670b00cb05ba0180ad1729b8d441c9c952477944..425867145c79b2e54f892e51d8f0da33473cf53a 100644
(file)
--- a/
src/tests/threads/mlfqs-recent-1.c
+++ b/
src/tests/threads/mlfqs-recent-1.c
@@
-114,10
+114,14
@@
test_mlfqs_recent_1 (void)
ASSERT (thread_mlfqs);
ASSERT (thread_mlfqs);
- msg ("Sleeping 10 seconds to allow recent_cpu to decay, please wait...");
- start_time = timer_ticks ();
- timer_sleep (DIV_ROUND_UP (start_time, TIMER_FREQ) - start_time
- + 10 * TIMER_FREQ);
+ do
+ {
+ msg ("Sleeping 10 seconds to allow recent_cpu to decay, please wait...");
+ start_time = timer_ticks ();
+ timer_sleep (DIV_ROUND_UP (start_time, TIMER_FREQ) - start_time
+ + 10 * TIMER_FREQ);
+ }
+ while (thread_get_recent_cpu () > 700);
start_time = timer_ticks ();
for (;;)
start_time = timer_ticks ();
for (;;)