 |
Xyris
0.5
|
Go to the documentation of this file.
17 #define TIME_SLICE_SIZE (1 * 1000 * 1000ULL)
46 #define TASK_ONLY if (current_task != NULL)
54 #define MAX_TASKS_QUEUED 8
62 static inline void tasks_sync_init(
struct task_sync *ts) {
struct task * tasks_new(void(*entry)(void), struct task *storage, task_state state, const char *name)
Creates a new kernel task with a provided entry point, register storage struct, and task state struct...
void tasks_unblock(struct task *task)
Unblocks the current task.
struct task * current_task
void tasks_nano_sleep(uint64_t time)
Sleep for a given period of time (in nanoseconds).
Architecture control and initialization.
void tasks_init()
Initializes the kernel task manager.
void tasks_nano_sleep_until(uint64_t time)
Sleeps until the provided absolute time (in nanoseconds).
void tasks_sync_unblock(struct task_sync *tsc)
uint64_t tasks_get_self_time()
Returns the lifetime of the current task (in nanoseconds).
void tasks_block_current(task_state reason)
Blocks the current task.
void tasks_schedule()
Tell the kernel task scheduler to schedule all of the added tasks.
void tasks_exit(void)
Exits the current task.
void tasks_switch_to(struct task *task)
Switches to a provided task.
void tasks_sync_block(struct task_sync *tsc)