Finally, implement the following functions that allow a thread to examine and modify
its own priority. Skeletons for these functions are provided in ‘threads/thread.c’.
void thread_set_priority (int new_priority) [Function]
Sets the current thread’s priority to new priority. If the current thread no longer has
the highest priority, yields.
int thread_get_priority (void) [Function]
Returns the current thread’s priority. In the presence of priority donation, returns
the higher (donated) priority.
(WILL BE IMPLEMENTED WITH PRIORITY SCHEDULING: IMPLEMENT PRIORITY SCHEDULING ISSUE)
Finally, implement the following functions that allow a thread to examine and modify its own priority. Skeletons for these functions are provided in ‘threads/thread.c’. void thread_set_priority (int new_priority) [Function] Sets the current thread’s priority to new priority. If the current thread no longer has the highest priority, yields. int thread_get_priority (void) [Function] Returns the current thread’s priority. In the presence of priority donation, returns the higher (donated) priority.
(WILL BE IMPLEMENTED WITH PRIORITY SCHEDULING: IMPLEMENT PRIORITY SCHEDULING ISSUE)