diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/arch/timer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/arch/timer.h b/include/arch/timer.h index 8b832c9..8f235e6 100644 --- a/include/arch/timer.h +++ b/include/arch/timer.h @@ -30,6 +30,12 @@ ticks_t stat_timer(const void *fdt); /** * Set up timer interrupt for absolute ticks. + * At least currently assumes there is only one global timer, the kernel will + * ensure that the timer is scheduled to handle events in order. + * + * When setting a new timer, the current timer (if one is set) will + * not trigger an interrupt. For instance, if called from the interrupt handler + * of the existing interrupt, it won't re-trigger. * * @param ticks Time point for timer to trigger. * \todo Should maybe be stat_t? @@ -37,6 +43,13 @@ ticks_t stat_timer(const void *fdt); void set_timer(ticks_t ticks); /** + * Stop the timer interrupts from happening altogether. Mainly called during + * init to avoid spurious interrupts and when all userspace timers have been + * handled. + */ +void clear_timer(); + +/** * Get current ticks. * * @return Current tick count. |
