diff --git a/src/threads/thread.c b/src/threads/thread.c index 5bca536..4ddee22 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -374,6 +374,9 @@ priority_more (const struct list_elem *a_, const struct list_elem *b_, void thread_set_priority (int new_priority) { + ASSERT (new_priority >= PRI_MIN); + ASSERT (new_priority <= PRI_MAX); + thread_current ()->priority = new_priority; }