From 39b79e00c60c3da0e8ad1519cac9f808d877070e Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Tue, 18 Dec 2012 21:41:52 +0100 Subject: kern/task: task creation and information --- kern/task.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'kern/task.h') diff --git a/kern/task.h b/kern/task.h index 319651db..ed074acf 100644 --- a/kern/task.h +++ b/kern/task.h @@ -19,11 +19,8 @@ #define _KERN_TASK_H #include - -/* - * Forward declaration. - */ -struct thread; +#include +#include /* * Task name buffer size. @@ -34,6 +31,7 @@ struct thread; * Task structure. */ struct task { + struct spinlock lock; struct list node; struct list threads; struct vm_map *map; @@ -50,9 +48,21 @@ extern struct task *kernel_task; */ void task_setup(void); +/* + * Create a task. + */ +int task_create(struct task **taskp, const char *name); + /* * Add a thread to a task. */ void task_add_thread(struct task *task, struct thread *thread); +/* + * Display task information. + * + * If task is NULL, this function displays all tasks. + */ +void task_info(struct task *task); + #endif /* _KERN_TASK_H */ -- cgit v1.2.3