CS318 - Pintos
Pintos source browser for JHU CS318 course
Functions | Variables
priority-donate-lower.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-lower.c:

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...
 

Function Documentation

◆ acquire_thread_func()

static void acquire_thread_func ( void *  lock_)
static

Definition at line 43 of file priority-donate-lower.c.

References lock_acquire(), lock_release(), and msg().

Here is the call graph for this function:

◆ test_priority_donate_lower()

void test_priority_donate_lower ( void  )

Variable Documentation

◆ acquire_thread_func

thread_func acquire_thread_func
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.

Referenced by test_priority_donate_lower().