#include <queue.h>
#include <stddef.h>


Go to the source code of this file.
Defines | |
| #define | CLKTICKS_PER_SEC 1000 |
| clock timer resolution | |
Functions | |
| void | clkupdate (ulong) |
| Normal case: COMPARE is increased by cycles and stored. | |
| interrupt | clkhandler (void) |
| Clock handler updates timer registers and system time. | |
Variables | |
| ulong | clkticks |
| counts clock interrupts | |
| ulong | clktime |
| current time in secs since boot | |
| qid_typ | sleepq |
| queue for sleeping processes | |
Definition in file clock.h.
| interrupt clkhandler | ( | void | ) |
Clock handler updates timer registers and system time.
Wakes sleeping threads if necessary.
Definition at line 22 of file clkhandler.c.
References clkticks, CLKTICKS_PER_SEC, clktime, clkupdate(), sleepq, and wakeup().

| text align globl clkupdatevoid clkupdate | ( | ulong | cycles | ) |
Normal case: COMPARE is increased by cycles and stored.
Abnormal case: We've lost so much time COUNT > COMPARE+cycles. Solution: Set COMPARE to COUNT+cycles
Referenced by clkhandler().

1.5.6