30 uint32_t edx, uint32_t esi, uint32_t edi,
cpu_state_t** cpu) {
33 if (current_task == next_task) {
34 println(
"%4aThe last task cannot exit%a");
static uint32_t syscall_getpid()
Returns the current task's PID.
task_pid_t schedule_get_current_task()
Returns the current task's PID.
The CPU's state when an interrupt occurs.
task_pid_t schedule_get_next_task()
Returns the next running task's PID.
uint32_t task_pid_t
unique process ID
void isr_register_syscall(size_t id, void *syscall)
Registers a syscall handler to call whenever a specified syscall is requested.
void task_stop(task_pid_t pid)
Stops a task.
static task_pid_t current_task
the currently running task pid
void syscall_init()
Initializes the syscall interface.
static void syscall_exit(uint32_t return_value, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, cpu_state_t **cpu)
Exits the current task.
cpu_state_t * schedule_switch_task(task_pid_t next_task)
Switches to a given task.