implement thread_set_nice and make skeleton for calculate_priority

This commit is contained in:
EDiasAlberto
2024-10-15 19:25:02 +01:00
parent ab66551c06
commit efed660968

View File

@@ -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. */