Merge contributions from gleb-bsd to main merged repo #6

Merged
ed1223 merged 11 commits from gleb/BSD into BSD-merged 2024-10-17 15:55:24 +00:00
3 changed files with 30 additions and 86 deletions
Showing only changes of commit efed660968 - Show all commits

View File

@@ -364,11 +364,20 @@ thread_get_priority (void)
return thread_current ()->priority; 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. */ /* Sets the current thread's nice value to NICE. */
void 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. */ /* Returns the current thread's nice value. */