From 434f06c437d7af0dc70acd6746d23c005550e031 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Mon, 15 Apr 2013 21:09:08 +0200 Subject: kern/task: new task_remove_thread function --- kern/task.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kern/task.c') diff --git a/kern/task.c b/kern/task.c index 6e8eb5bf..000a723e 100644 --- a/kern/task.c +++ b/kern/task.c @@ -106,6 +106,14 @@ task_add_thread(struct task *task, struct thread *thread) spinlock_unlock(&task->lock); } +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) { -- cgit v1.2.3