#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.
Data Structures | |
struct | sleep_test |
struct | sleep_thread |
Functions | |
static void | test_sleep (int thread_cnt, int iterations) |
void | test_alarm_single (void) |
void | test_alarm_multiple (void) |
static void | sleeper (void *) |
static void sleeper | ( | void * | t_ | ) | [static] |
Definition at line 138 of file alarm-wait.c.
References sleep_thread::duration, sleep_thread::id, sleep_test::iterations, lock_acquire(), lock_release(), sleep_test::output_lock, sleep_test::output_pos, sleep_test::start, sleep_thread::test, timer_sleep(), and timer_ticks().
void test_alarm_multiple | ( | void | ) |
void test_alarm_single | ( | void | ) |
static void test_sleep | ( | int | thread_cnt, | |
int | iterations | |||
) | [static] |
Definition at line 51 of file alarm-wait.c.
References ASSERT, sleep_thread::duration, fail(), free(), sleep_thread::id, sleep_thread::iterations, sleep_test::iterations, lock_acquire(), lock_init(), lock_release(), malloc(), msg(), name, NULL, sleep_test::output_lock, sleep_test::output_pos, PANIC, PRI_DEFAULT, sleeper(), snprintf(), sleep_test::start, sleep_thread::test, thread_create(), thread_mlfqs, timer_sleep(), and timer_ticks().