PKUOS - Pintos
Pintos source browser for PKU Operating System 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.
|
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.
|
static |
Definition at line 14 of file alarm-priority.c.
Referenced by alarm_priority_thread().
|
static |
Definition at line 13 of file alarm-priority.c.
Referenced by alarm_priority_thread().