aboutsummaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-13 00:35:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-13 00:35:47 +0000
commitffda55b34a9a8a4a84f4cbc1da3836b944baec46 (patch)
treef74938699bd760dbbba52578827f5e100d7b3700 /nuttx/sched
parentb58281cab8add0af82167282126132b069170dd6 (diff)
downloadpx4-firmware-ffda55b34a9a8a4a84f4cbc1da3836b944baec46.tar.gz
px4-firmware-ffda55b34a9a8a4a84f4cbc1da3836b944baec46.tar.bz2
px4-firmware-ffda55b34a9a8a4a84f4cbc1da3836b944baec46.zip
Cosmetic cleanup from SIGCHLD changes
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5514 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/task_deletecurrent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/sched/task_deletecurrent.c b/nuttx/sched/task_deletecurrent.c
index 7ecfb26cc..e1e06acf6 100644
--- a/nuttx/sched/task_deletecurrent.c
+++ b/nuttx/sched/task_deletecurrent.c
@@ -115,9 +115,12 @@ int task_deletecurrent(void)
* does not correspond to the thread that is running. Disabling pre-
* emption on this TCB and marking the new ready-to-run task as not
* running (see, for example, get_errno_ptr()).
+ *
+ * We disable pre-emption here by directly incrementing the lockcount
+ * (vs. calling sched_lock()).
*/
- sched_lock();
+ rtcb->lockcount++;
rtcb->task_state = TSTATE_TASK_READYTORUN;
/* Move the TCB to the specified blocked task list and delete it */
@@ -143,7 +146,6 @@ int task_deletecurrent(void)
* the lockcount on rctb.
*/
- DEBUGASSERT(rtcb->lockcount > 0);
rtcb->lockcount--;
return OK;
}