27 msg (
"The high-priority thread should have already completed.");
35 for (i = 0; i < 5; i++)
#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 simple_thread_func
Ensures that a high-priority thread really preempts.
void test_priority_preempt(void)
bool thread_mlfqs
If false (default), use round-robin scheduler.
int thread_get_priority(void)
Returns the current thread's priority.
const char * thread_name(void)
Returns the name of the running thread.
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_yield(void)
Yields the CPU.
#define PRI_DEFAULT
Default priority.
void thread_func(void *aux)