projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix two bugs in the base Pintos code:
[pintos-anon]
/
src
/
tests
/
threads
/
priority-change.c
diff --git
a/src/tests/threads/priority-change.c
b/src/tests/threads/priority-change.c
index 735920ffe49fa309b5088aa9290bf4ed4aee2b6c..810b05a1d76973ebdf28f914d03c91318c021e85 100644
(file)
--- a/
src/tests/threads/priority-change.c
+++ b/
src/tests/threads/priority-change.c
@@
-13,12
+13,12
@@
void
test_priority_change (void)
{
/* This test does not work with the MLFQS. */
test_priority_change (void)
{
/* This test does not work with the MLFQS. */
- ASSERT (!
enable
_mlfqs);
+ ASSERT (!
thread
_mlfqs);
msg ("Creating a high-priority thread 2.");
msg ("Creating a high-priority thread 2.");
- thread_create ("thread 2", PRI_DEFAULT
-
1, changing_thread, NULL);
+ thread_create ("thread 2", PRI_DEFAULT
+
1, changing_thread, NULL);
msg ("Thread 2 should have just lowered its priority.");
msg ("Thread 2 should have just lowered its priority.");
- thread_set_priority (PRI_DEFAULT
+
2);
+ thread_set_priority (PRI_DEFAULT
-
2);
msg ("Thread 2 should have just exited.");
}
msg ("Thread 2 should have just exited.");
}
@@
-26,6
+26,6
@@
static void
changing_thread (void *aux UNUSED)
{
msg ("Thread 2 now lowering priority.");
changing_thread (void *aux UNUSED)
{
msg ("Thread 2 now lowering priority.");
- thread_set_priority (PRI_DEFAULT
+
1);
+ thread_set_priority (PRI_DEFAULT
-
1);
msg ("Thread 2 exiting.");
}
msg ("Thread 2 exiting.");
}