18 msg (
"Creating a high-priority thread 2.");
20 msg (
"Thread 2 should have just lowered its priority.");
22 msg (
"Thread 2 should have just exited.");
28 msg (
"Thread 2 now lowering priority.");
30 msg (
"Thread 2 exiting.");
#define ASSERT(CONDITION)
This is outside the header guard so that debug.h may be included multiple times with different settin...
#define UNUSED
GCC lets us add "attributes" to functions, function parameters, etc.
void msg(const char *format,...)
static thread_func changing_thread
Verifies that lowering a thread's priority so that it is no longer the highest-priority thread in the...
void test_priority_change(void)
bool thread_mlfqs
If false (default), use round-robin scheduler.
tid_t thread_create(const char *name, int priority, thread_func *function, void *aux)
Creates a new kernel thread named NAME with the given initial PRIORITY, which executes FUNCTION passi...
void thread_set_priority(int new_priority)
Sets the current thread's priority to NEW_PRIORITY.
#define PRI_DEFAULT
Default priority.
void thread_func(void *aux)