#pragma once #include #include struct percpu; void arch_sched_preempt_disable(); bool arch_sched_preempt_enable(); void arch_sched_kick(struct percpu* cpu); struct task* arch_sched_switch(struct task* from, struct task* to); errno_t arch_task_init( struct arch_task_context* context, void* entry, uintptr_t arg0, uintptr_t stack_start, bool is_user ); void arch_task_fini(struct arch_task_context* context); void arch_task_fork(struct arch_task_context* dst); void arch_context_init_user(struct arch_context* ctx, uintptr_t ip, uintptr_t sp); [[noreturn]] void arch_sched_jump_to_context(struct arch_context* context); [[noreturn]] void arch_sched_jump_to_user(uintptr_t ip, uintptr_t sp, uintptr_t arg);