BSD Scheduler implementation #9

Merged
gk1623 merged 12 commits from BSD-merged into master 2024-10-23 16:34:40 +00:00
5 changed files with 62 additions and 276 deletions
Showing only changes of commit 337f8828d9 - Show all commits

View File

@@ -364,19 +364,27 @@ 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. */
int
thread_get_nice (void)
{
/* Not yet implemented. */
return 0;
return thread_current ()->nice;
}
/* Returns 100 times the system load average. */