summaryrefslogtreecommitdiff
path: root/kern/task.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-04-15 21:09:08 +0200
committerRichard Braun <rbraun@sceen.net>2013-04-15 21:09:08 +0200
commit434f06c437d7af0dc70acd6746d23c005550e031 (patch)
treefd2413b7fff9059980daaca307bcefcf5db2c452 /kern/task.c
parentd3a0a3140912d62602b7eaaf568a940f897b6d71 (diff)
kern/task: new task_remove_thread function
Diffstat (limited to 'kern/task.c')
-rw-r--r--kern/task.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kern/task.c b/kern/task.c
index 6e8eb5b..000a723 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -107,6 +107,14 @@ task_add_thread(struct task *task, struct thread *thread)
}
void
+task_remove_thread(struct task *task, struct thread *thread)
+{
+ spinlock_lock(&task->lock);
+ list_remove(&thread->task_node);
+ spinlock_unlock(&task->lock);
+}
+
+void
task_info(struct task *task)
{
struct thread *thread;