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-donate-nest.c
diff --git
a/src/tests/threads/priority-donate-nest.c
b/src/tests/threads/priority-donate-nest.c
index 1f245847698c3bc8254fe7d3726b9ff8530970a5..3a3a9a590a2b677031524ad351f6e20e88216b8d 100644
(file)
--- a/
src/tests/threads/priority-donate-nest.c
+++ b/
src/tests/threads/priority-donate-nest.c
@@
-31,7
+31,7
@@
test_priority_donate_nest (void)
struct locks locks;
/* This test does not work with the MLFQS. */
struct locks locks;
/* This test does not work with the MLFQS. */
- ASSERT (!
enable
_mlfqs);
+ ASSERT (!
thread
_mlfqs);
/* Make sure our priority is the default. */
ASSERT (thread_get_priority () == PRI_DEFAULT);
/* Make sure our priority is the default. */
ASSERT (thread_get_priority () == PRI_DEFAULT);
@@
-43,15
+43,15
@@
test_priority_donate_nest (void)
locks.a = &a;
locks.b = &b;
locks.a = &a;
locks.b = &b;
- thread_create ("medium", PRI_DEFAULT
-
1, medium_thread_func, &locks);
+ thread_create ("medium", PRI_DEFAULT
+
1, medium_thread_func, &locks);
thread_yield ();
msg ("Low thread should have priority %d. Actual priority: %d.",
thread_yield ();
msg ("Low thread should have priority %d. Actual priority: %d.",
- PRI_DEFAULT
-
1, thread_get_priority ());
+ PRI_DEFAULT
+
1, thread_get_priority ());
- thread_create ("high", PRI_DEFAULT
-
2, high_thread_func, &b);
+ thread_create ("high", PRI_DEFAULT
+
2, high_thread_func, &b);
thread_yield ();
msg ("Low thread should have priority %d. Actual priority: %d.",
thread_yield ();
msg ("Low thread should have priority %d. Actual priority: %d.",
- PRI_DEFAULT
-
2, thread_get_priority ());
+ PRI_DEFAULT
+
2, thread_get_priority ());
lock_release (&a);
thread_yield ();
lock_release (&a);
thread_yield ();
@@
-69,7
+69,7
@@
medium_thread_func (void *locks_)
lock_acquire (locks->a);
msg ("Medium thread should have priority %d. Actual priority: %d.",
lock_acquire (locks->a);
msg ("Medium thread should have priority %d. Actual priority: %d.",
- PRI_DEFAULT
-
2, thread_get_priority ());
+ PRI_DEFAULT
+
2, thread_get_priority ());
msg ("Medium thread got the lock.");
lock_release (locks->a);
msg ("Medium thread got the lock.");
lock_release (locks->a);