The task scheduler: tasks, their order and the scheduler's state. More...
Go to the source code of this file.
Data Structures | |
| struct | SchedulerTask |
| A scheduled task: its routine's address, its order (see SCHEDULER_KEY_) and its flags, where bit 0 keeps it running while overlay tasks are suspended. More... | |
Macros | |
| #define | SCHEDULER_KEY_VBLANK 0x480 |
| A task's order: the high byte picks the pass that runs it, the low byte ranks it within the pass (higher runs first). | |
| #define | SCHEDULER_KEY_MAIN_LOOP 0xc80 |
| #define | TASK_STATE_HIGH(task) |
Typedefs | |
| typedef void(*) | SchedulerCallback(void) |
Enumerations | |
| enum | SchedulerTaskLimits { SCHEDULER_TBS_TASK_COUNT = 20 , SCHEDULER_TLA_TASK_COUNT = 24 } |
Functions | |
| STATIC_ASSERT (sizeof(struct SchedulerTask)==8) | |
| STATIC_ASSERT (offsetof(struct SchedulerTask, state)==4) | |
| STATIC_ASSERT (offsetof(struct SchedulerTask, mask)==6) | |
| void | Runtime_CallWorkEntryWithArgs (s32 arg0, s32 arg1) |
| void | Scheduler_RunCallbacksByKey (s32 key) |
| s32 | Scheduler_CountCallbacksByKey (s32 key) |
| void | Scheduler_RunCallbacksBeforeBoundary (s32 key) |
Variables | |
| volatile u8 | gSchedulerStatus |
| u8 | gSchedulerReady |
| 1 once the task table is set up | |
| struct SchedulerTask | gSchedulerTaskTable [] |
The task scheduler: tasks, their order and the scheduler's state.
Definition in file callback_scheduler.h.
| #define SCHEDULER_KEY_VBLANK 0x480 |
A task's order: the high byte picks the pass that runs it, the low byte ranks it within the pass (higher runs first).
An odd high byte means the task is suspended, so no pass matches it.
Definition at line 34 of file callback_scheduler.h.
Referenced by DisplayScroll_InitObjectTable(), DisplayScroll_RunSlideshow(), System_VBlankHandler(), and Title_ShowIntro().
| #define SCHEDULER_KEY_MAIN_LOOP 0xc80 |
Definition at line 35 of file callback_scheduler.h.
Referenced by DisplayScroll_InitObjectTable(), Map_ShowWorldMap(), PaletteFade_Init(), Shop_InitializeCursorWork(), and WaitFrames().
| #define TASK_STATE_HIGH | ( | task | ) |
Definition at line 37 of file callback_scheduler.h.
Referenced by Scheduler_ResumeOverlayTasks(), Scheduler_ResumeTasks(), Scheduler_RunPass(), Scheduler_SuspendOverlayTasks(), and Scheduler_SuspendTasks().
| typedef void(*) SchedulerCallback(void) |
Definition at line 16 of file callback_scheduler.h.
| enum SchedulerTaskLimits |
| Enumerator | |
|---|---|
| SCHEDULER_TBS_TASK_COUNT | |
| SCHEDULER_TLA_TASK_COUNT | |
Definition at line 11 of file callback_scheduler.h.
| STATIC_ASSERT | ( | sizeof(struct SchedulerTask) | = =8 | ) |
| STATIC_ASSERT | ( | offsetof(struct SchedulerTask, state) | = =4 | ) |
| STATIC_ASSERT | ( | offsetof(struct SchedulerTask, mask) | = =6 | ) |
| void Scheduler_RunCallbacksByKey | ( | s32 | key | ) |
Referenced by Scheduler_RunCallbacksByKey().
Referenced by Scheduler_CountCallbacksByKey().
| void Scheduler_RunCallbacksBeforeBoundary | ( | s32 | key | ) |
Referenced by Scheduler_RunCallbacksBeforeBoundary().
|
extern |
|
extern |
1 once the task table is set up
Referenced by Scheduler_ResetTaskTable(), and Scheduler_RunPass().
|
extern |
Referenced by Scheduler_AddOrUpdateCallback(), Scheduler_FindCallback(), Scheduler_RemoveCallback(), Scheduler_ResetTaskTable(), Scheduler_ResumeOverlayTasks(), Scheduler_ResumeTasks(), Scheduler_RunPass(), Scheduler_SetTaskFlags(), Scheduler_SortTasks(), Scheduler_SuspendOverlayTasks(), and Scheduler_SuspendTasks().