From 2aab4d3c3a24c4bee3fb55f74ca011e1ca2c8fb3 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 29 Mar 2007 13:32:13 +0000 Subject: [PATCH] Unmatched sched_lock()/sched_unlock() git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@172 42af7a65-404d-4744-a932-0658087f49c3 --- sched/task_delete.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sched/task_delete.c b/sched/task_delete.c index 4f463bd603..86a796ab75 100644 --- a/sched/task_delete.c +++ b/sched/task_delete.c @@ -118,10 +118,12 @@ STATUS task_delete(pid_t pid) /* Make sure the task does not become ready-to-run while * we are futzing with its TCB by locking ourselves as the * executing task. - * - * Frist, find for the TCB associated with matching pid */ + sched_lock(); + + /* Find for the TCB associated with matching pid */ + dtcb = sched_gettcb(pid); if (!dtcb) {