CS318 - Pintos
Pintos source browser for JHU CS318 course
|
#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"
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 |
|
static |
Definition at line 41 of file priority-sema.c.
References msg(), sema, sema_down(), and thread_name().
void test_priority_sema | ( | void | ) |
Definition at line 16 of file priority-sema.c.
References ASSERT, msg(), name, NULL, PRI_DEFAULT, PRI_MIN, priority_sema_thread, sema, sema_init(), sema_up(), snprintf(), thread_create(), thread_mlfqs, and thread_set_priority().
|
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.
Referenced by test_priority_sema().
|
static |
Definition at line 13 of file priority-sema.c.
Referenced by priority_sema_thread(), sema_down(), sema_init(), sema_self_test(), sema_test_helper(), sema_try_down(), sema_up(), and test_priority_sema().