PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
#include <stdio.h>
#include "tests/threads/tests.h"
#include "threads/init.h"
#include "threads/synch.h"
#include "threads/thread.h"
Go to the source code of this file.
Functions | |
void | test_priority_donate_lower (void) |
static void | acquire_thread_func (void *lock_) |
Variables | |
static thread_func | acquire_thread_func |
The main thread acquires a lock. More... | |
|
static |
Definition at line 43 of file priority-donate-lower.c.
References lock_acquire(), lock_release(), and msg().
void test_priority_donate_lower | ( | void | ) |
Definition at line 16 of file priority-donate-lower.c.
|
static |
The main thread acquires a lock.
Then it creates a higher-priority thread that blocks acquiring the lock, causing it to donate their priorities to the main thread. The main thread attempts to lower its priority, which should not take effect until the donation is released.
Definition at line 13 of file priority-donate-lower.c.