diff --git a/src/threads/thread.c b/src/threads/thread.c index 30ca2bd..ed305ad 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -354,6 +354,7 @@ thread_foreach (thread_action_func *func, void *aux) void thread_set_priority (int new_priority) { + ASSERT (PRI_MIN <= new_priority && new_priority <= PRI_MAX); thread_current ()->priority = new_priority; }