#include <round.h>
#include <stdint.h>
Go to the source code of this file.
Defines | |
#define | TIMER_FREQ 100 |
Functions | |
void | timer_init (void) |
void | timer_calibrate (void) |
int64_t | timer_ticks (void) |
int64_t | timer_elapsed (int64_t) |
void | timer_sleep (int64_t ticks) |
void | timer_msleep (int64_t milliseconds) |
void | timer_usleep (int64_t microseconds) |
void | timer_nsleep (int64_t nanoseconds) |
void | timer_mdelay (int64_t milliseconds) |
void | timer_udelay (int64_t microseconds) |
void | timer_ndelay (int64_t nanoseconds) |
void | timer_print_stats (void) |
#define TIMER_FREQ 100 |
Definition at line 9 of file timer.h.
Referenced by block_thread(), load_thread(), real_time_delay(), real_time_sleep(), test_alarm_priority(), test_mlfqs_block(), test_mlfqs_fair(), test_mlfqs_load_1(), test_mlfqs_load_60(), test_mlfqs_load_avg(), test_mlfqs_recent_1(), timer_calibrate(), and timer_init().
void timer_calibrate | ( | void | ) |
Definition at line 45 of file timer.c.
References ASSERT, intr_get_level(), INTR_ON, loops_per_tick, printf(), PRIu64, TIMER_FREQ, and too_many_loops().
Referenced by main().
Definition at line 84 of file timer.c.
References timer_ticks().
Referenced by alarm_priority_thread(), block_thread(), load_thread(), test_mlfqs_block(), test_mlfqs_fair(), test_mlfqs_load_1(), test_mlfqs_load_60(), test_mlfqs_load_avg(), test_mlfqs_recent_1(), and timer_sleep().
void timer_init | ( | void | ) |
Definition at line 37 of file timer.c.
References intr_register_ext(), pit_configure_channel(), TIMER_FREQ, and timer_interrupt.
Referenced by main().
void timer_mdelay | ( | int64_t | milliseconds | ) |
void timer_msleep | ( | int64_t | milliseconds | ) |
Definition at line 104 of file timer.c.
References real_time_sleep().
Referenced by reset_channel(), speaker_beep(), uhci_enable_port(), uhci_stall_watchdog(), and wait_while_busy().
void timer_ndelay | ( | int64_t | nanoseconds | ) |
void timer_nsleep | ( | int64_t | nanoseconds | ) |
Definition at line 120 of file timer.c.
References real_time_sleep().
Referenced by select_device().
void timer_print_stats | ( | void | ) |
Definition at line 166 of file timer.c.
References PRId64, printf(), and timer_ticks().
Referenced by print_stats().
void timer_sleep | ( | int64_t | ticks | ) |
Definition at line 92 of file timer.c.
References ASSERT, intr_get_level(), INTR_ON, start, thread_yield(), timer_elapsed(), and timer_ticks().
Referenced by alarm_priority_thread(), load_thread(), real_time_sleep(), sleeper(), test_alarm_negative(), test_alarm_zero(), test_mlfqs_block(), test_mlfqs_fair(), test_mlfqs_load_1(), test_mlfqs_load_60(), test_mlfqs_load_avg(), test_mlfqs_recent_1(), and test_sleep().
int64_t timer_ticks | ( | void | ) |
Definition at line 72 of file timer.c.
References barrier, intr_disable(), intr_set_level(), and ticks.
Referenced by alarm_priority_thread(), block_thread(), load_thread(), sleeper(), test_alarm_priority(), test_mlfqs_block(), test_mlfqs_fair(), test_mlfqs_load_1(), test_mlfqs_load_60(), test_mlfqs_load_avg(), test_mlfqs_recent_1(), test_sleep(), timer_elapsed(), timer_print_stats(), and timer_sleep().
void timer_udelay | ( | int64_t | microseconds | ) |
void timer_usleep | ( | int64_t | microseconds | ) |
Definition at line 112 of file timer.c.
References real_time_sleep().
Referenced by reset_channel(), uhci_enable_port(), uhci_init(), and wait_until_idle().