29 msg (
"Main thread should have priority %d. Actual priority: %d.",
32 msg (
"Lowering base priority...");
34 msg (
"Main thread should have priority %d. Actual priority: %d.",
37 msg (
"acquire must already have finished.");
38 msg (
"Main thread should have priority %d. Actual priority: %d.",
48 msg (
"acquire: got the lock");
50 msg (
"acquire: done");
#define ASSERT(CONDITION)
This is outside the header guard so that debug.h may be included multiple times with different settin...
void msg(const char *format,...)
static thread_func acquire_thread_func
The main thread acquires a lock.
void test_priority_donate_lower(void)
void lock_release(struct lock *lock)
Releases LOCK, which must be owned by the current thread.
void lock_init(struct lock *lock)
Initializes LOCK.
void lock_acquire(struct lock *lock)
Acquires LOCK, sleeping until it becomes available if necessary.
bool thread_mlfqs
If false (default), use round-robin scheduler.
int thread_get_priority(void)
Returns the current thread's priority.
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)