projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get rid of THREAD_JOIN_IMPLEMENTED by adding thread_join() stub.
[pintos-anon]
/
grading
/
threads
/
priority-donate-one.c
diff --git
a/grading/threads/priority-donate-one.c
b/grading/threads/priority-donate-one.c
index 0f84e098566b87f7720298adc05b9e52789ac16c..35f135c3d9ef6c372cd0af29f92aa2750a37705e 100644
(file)
--- a/
grading/threads/priority-donate-one.c
+++ b/
grading/threads/priority-donate-one.c
@@
-41,14
+41,14
@@
test_donate_return (void)
lock_init (&lock, "donor");
lock_acquire (&lock);
thread_create ("acquire1", PRI_DEFAULT + 1, acquire1_thread_func, &lock);
lock_init (&lock, "donor");
lock_acquire (&lock);
thread_create ("acquire1", PRI_DEFAULT + 1, acquire1_thread_func, &lock);
- printf ("
1.
This thread should have priority %d. Actual priority: %d.\n",
+ printf ("This thread should have priority %d. Actual priority: %d.\n",
PRI_DEFAULT + 1, thread_get_priority ());
thread_create ("acquire2", PRI_DEFAULT + 2, acquire2_thread_func, &lock);
PRI_DEFAULT + 1, thread_get_priority ());
thread_create ("acquire2", PRI_DEFAULT + 2, acquire2_thread_func, &lock);
- printf ("
2.
This thread should have priority %d. Actual priority: %d.\n",
+ printf ("This thread should have priority %d. Actual priority: %d.\n",
PRI_DEFAULT + 2, thread_get_priority ());
lock_release (&lock);
PRI_DEFAULT + 2, thread_get_priority ());
lock_release (&lock);
- printf ("
7.
acquire2, acquire1 must already have finished, in that order.\n"
- "
8.
This should be the last line before finishing this test.\n"
+ printf ("acquire2, acquire1 must already have finished, in that order.\n"
+ "This should be the last line before finishing this test.\n"
"Priority donation test done.\n");
}
"Priority donation test done.\n");
}
@@
-58,9
+58,9
@@
acquire1_thread_func (void *lock_)
struct lock *lock = lock_;
lock_acquire (lock);
struct lock *lock = lock_;
lock_acquire (lock);
- printf ("
5.
acquire1: got the lock\n");
+ printf ("acquire1: got the lock\n");
lock_release (lock);
lock_release (lock);
- printf ("
6.
acquire1: done\n");
+ printf ("acquire1: done\n");
}
static void
}
static void
@@
-69,7
+69,7
@@
acquire2_thread_func (void *lock_)
struct lock *lock = lock_;
lock_acquire (lock);
struct lock *lock = lock_;
lock_acquire (lock);
- printf ("
3.
acquire2: got the lock\n");
+ printf ("acquire2: got the lock\n");
lock_release (lock);
lock_release (lock);
- printf ("
4.
acquire2: done\n");
+ printf ("acquire2: done\n");
}
}