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_multiple (void) |
static void | a_thread_func (void *lock_) |
static void | b_thread_func (void *lock_) |
Variables | |
static thread_func | a_thread_func |
The main thread acquires locks A and B, then it creates two higher-priority threads. More... | |
static thread_func | b_thread_func |
|
static |
Definition at line 58 of file priority-donate-multiple.c.
References lock_acquire(), lock_release(), and msg().
|
static |
Definition at line 69 of file priority-donate-multiple.c.
References lock_acquire(), lock_release(), and msg().
void test_priority_donate_multiple | ( | void | ) |
Definition at line 22 of file priority-donate-multiple.c.
|
static |
The main thread acquires locks A and B, then it creates two higher-priority threads.
Each of these threads blocks acquiring one of the locks and thus donate their priority to the main thread. The main thread releases the locks in turn and relinquishes its donated priorities.
Based on a test originally submitted for Stanford's CS 140 in winter 1999 by Matt Franklin start, Greg Hutchins led@ lelan d.st anfor d.ed ugmh@l, Yu Ping Hu elan d.sta nfor d.eduyph@c. Modified by arens. s.st anfor d.ed u
Definition at line 18 of file priority-donate-multiple.c.
|
static |
Definition at line 19 of file priority-donate-multiple.c.