sched: implement various ways to end tasks and threads

This commit is contained in:
2026-03-18 21:07:43 +00:00
parent e03b2e07d0
commit 4551e7b2e6
12 changed files with 148 additions and 17 deletions

View File

@@ -68,6 +68,7 @@ extern kern_status_t sys_task_config_set(
size_t len);
extern kern_status_t sys_thread_start(kern_handle_t thread);
extern kern_status_t sys_thread_exit(void);
extern kern_status_t sys_thread_config_get(
kern_handle_t thread,
kern_config_key_t key,

View File

@@ -48,6 +48,7 @@ static inline void task_unref(struct task *task)
{
object_unref(&task->t_base);
}
extern void task_exit(int status);
extern kern_status_t task_add_child(struct task *parent, struct task *child);
extern kern_status_t task_add_channel(
struct task *task,

View File

@@ -59,6 +59,9 @@ extern kern_status_t thread_init_user(
size_t nr_args);
extern int thread_priority(struct thread *thr);
extern void thread_awaken(struct thread *thr);
extern void thread_exit(void);
extern void thread_join(struct thread *thread, unsigned long *irq_flags);
extern void thread_kill(struct thread *thread);
extern void idle(void);
extern struct thread *create_kernel_thread(void (*fn)(void));
extern struct thread *create_idle_thread(void);