|
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_alarm_priority (void) |
| static void | alarm_priority_thread (void *aux UNUSED) |
Variables | |
| static thread_func | alarm_priority_thread |
| Checks that when the alarm clock wakes up threads, the higher-priority threads run first. More... | |
| static int64_t | wake_time |
| static struct semaphore | wait_sema |
|
static |
Definition at line 42 of file alarm-priority.c.
References msg(), sema_up(), start_time, thread_name(), timer_elapsed(), timer_sleep(), timer_ticks(), wait_sema, and wake_time.

| void test_alarm_priority | ( | void | ) |
Definition at line 17 of file alarm-priority.c.
References alarm_priority_thread, ASSERT, name, NULL, PRI_DEFAULT, PRI_MIN, sema_down(), sema_init(), snprintf(), thread_create(), thread_mlfqs, thread_set_priority(), TIMER_FREQ, timer_ticks(), wait_sema, and wake_time.

|
static |
Checks that when the alarm clock wakes up threads, the higher-priority threads run first.
Definition at line 12 of file alarm-priority.c.
Referenced by test_alarm_priority().
|
static |
Definition at line 14 of file alarm-priority.c.
Referenced by alarm_priority_thread(), and test_alarm_priority().
|
static |
Definition at line 13 of file alarm-priority.c.
Referenced by alarm_priority_thread(), and test_alarm_priority().
1.8.16