PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Structures | Functions | Variables
priority-donate-sema.c File Reference
#include <stdio.h>
#include "tests/threads/tests.h"
#include "threads/init.h"
#include "threads/synch.h"
#include "threads/thread.h"
Include dependency graph for priority-donate-sema.c:

Go to the source code of this file.

Data Structures

struct  lock_and_sema
 Low priority thread L acquires a lock, then blocks downing a semaphore. More...
 

Functions

void test_priority_donate_sema (void)
 
static void l_thread_func (void *ls_)
 
static void m_thread_func (void *ls_)
 
static void h_thread_func (void *ls_)
 

Variables

static thread_func l_thread_func
 
static thread_func m_thread_func
 
static thread_func h_thread_func
 

Function Documentation

◆ h_thread_func()

static void h_thread_func ( void *  ls_)
static

Definition at line 72 of file priority-donate-sema.c.

References lock_and_sema::lock, lock_acquire(), lock_release(), msg(), lock_and_sema::sema, and sema_up().

Here is the call graph for this function:

◆ l_thread_func()

static void l_thread_func ( void *  ls_)
static

Definition at line 50 of file priority-donate-sema.c.

References lock_and_sema::lock, lock_acquire(), lock_release(), msg(), lock_and_sema::sema, and sema_down().

Here is the call graph for this function:

◆ m_thread_func()

static void m_thread_func ( void *  ls_)
static

Definition at line 63 of file priority-donate-sema.c.

References msg(), lock_and_sema::sema, and sema_down().

Here is the call graph for this function:

◆ test_priority_donate_sema()

void test_priority_donate_sema ( void  )

Definition at line 30 of file priority-donate-sema.c.

Variable Documentation

◆ h_thread_func

thread_func h_thread_func
static

Definition at line 27 of file priority-donate-sema.c.

◆ l_thread_func

thread_func l_thread_func
static

Definition at line 25 of file priority-donate-sema.c.

◆ m_thread_func

thread_func m_thread_func
static

Definition at line 26 of file priority-donate-sema.c.