39 lines
599 B
C
39 lines
599 B
C
//
|
|
// Created by rick on 22-02-21.
|
|
//
|
|
|
|
#ifndef NEW_KERNEL_TASK_H
|
|
#define NEW_KERNEL_TASK_H
|
|
|
|
#include <cpu/cpu.h>
|
|
|
|
typedef void (*task_entrypoint)(void *entry_data);
|
|
|
|
void task_notify_irq(uint8_t irq_no);
|
|
|
|
void task_wait_irq(uint16_t irq_bits);
|
|
|
|
void task_init();
|
|
|
|
void task_start_first();
|
|
|
|
void task_switch_next();
|
|
|
|
uint32_t task_spawn(task_entrypoint, void *entry_data);
|
|
|
|
void task_end(uint32_t tid);
|
|
|
|
void task_suspend();
|
|
|
|
uint32_t task_get_current_tid();
|
|
|
|
void task_signal(uint32_t tid);
|
|
|
|
void task_lock_acquire();
|
|
|
|
void task_ensure_enabled();
|
|
|
|
void task_lock_free();
|
|
|
|
#endif //NEW_KERNEL_TASK_H
|