KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Primary timer used by the kernel. More...
Typedefs | |
typedef void(* | timer_primary_callback_t) (irq_context_t *) |
Primary timer callback type. | |
Functions | |
timer_primary_callback_t | timer_primary_set_callback (timer_primary_callback_t callback) |
Set the primary timer callback. | |
void | timer_primary_wakeup (uint32_t millis) |
Request a primary timer wakeup. | |
Primary timer used by the kernel.
This API provides a callback notification mechanism that can be hooked into the primary timer (TMU0). It is used by the KOS kernel for threading and scheduling.
typedef void(* timer_primary_callback_t) (irq_context_t *) |
Primary timer callback type.
This is the type of function which may be passed to timer_primary_set_callback() as the function that gets invoked upon interrupt.
timer_primary_callback_t timer_primary_set_callback | ( | timer_primary_callback_t | callback | ) |
Set the primary timer callback.
This function sets the primary timer callback to the specified function pointer.
callback | The new timer callback (set to NULL to disable). |
void timer_primary_wakeup | ( | uint32_t | millis | ) |
Request a primary timer wakeup.
This function will wake the caller (by calling the primary timer callback) in approximately the number of milliseconds specified. You can only have one timer wakeup scheduled at a time. Any subsequently scheduled wakeups will replace any existing one.
millis | The number of milliseconds to schedule for. |