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

Go to the source code of this file.

Functions

void test_priority_sema (void)
 
static void priority_sema_thread (void *aux UNUSED)
 

Variables

static thread_func priority_sema_thread
 Tests that the highest-priority thread waiting on a semaphore is the first to wake up. More...
 
static struct semaphore sema
 

Function Documentation

◆ priority_sema_thread()

static void priority_sema_thread ( void *aux  UNUSED)
static

Definition at line 41 of file priority-sema.c.

References msg(), sema, sema_down(), and thread_name().

Here is the call graph for this function:

◆ test_priority_sema()

void test_priority_sema ( void  )

Definition at line 16 of file priority-sema.c.

Variable Documentation

◆ priority_sema_thread

thread_func priority_sema_thread
static

Tests that the highest-priority thread waiting on a semaphore is the first to wake up.

Definition at line 12 of file priority-sema.c.

◆ sema

struct semaphore sema
static