diff options
author | Richard Braun <rbraun@sceen.net> | 2012-12-18 21:41:52 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2012-12-18 21:41:52 +0100 |
commit | 39b79e00c60c3da0e8ad1519cac9f808d877070e (patch) | |
tree | 9dfd5e36f26319528f892882a5718b37aaa6a7c4 /kern/task.h | |
parent | 8fb359f3d5c6826a1efb6b9fb9e0a7b1431eb3a4 (diff) |
kern/task: task creation and information
Diffstat (limited to 'kern/task.h')
-rw-r--r-- | kern/task.h | 20 |
1 files changed, 15 insertions, 5 deletions
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 <kern/list.h> - -/* - * Forward declaration. - */ -struct thread; +#include <kern/spinlock.h> +#include <kern/thread.h> /* * 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; @@ -51,8 +49,20 @@ 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 */ |