diff --git a/src/threads/thread.c b/src/threads/thread.c index 82aa317..c74d86b 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -364,11 +364,20 @@ thread_get_priority (void) return thread_current ()->priority; } +/* Calculates priority for the current thread */ +int +calculate_priority (void) +{ + /* Not yet implemented */ + return 0; +} + /* Sets the current thread's nice value to NICE. */ void -thread_set_nice (int nice UNUSED) +thread_set_nice (int nice) { - /* Not yet implemented. */ + thread_current ()->nice = nice; + calculate_priority (); } /* Returns the current thread's nice value. */