summaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-04-19 18:35:06 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-04-19 18:35:06 -0600
commitcce5af04eab27f136d48a5d06f5ac97b22e6b627 (patch)
treeee0ba220bf6921fa4f2d7221dd991b5f8e782b56 /nuttx/sched
parent2d32b627f6f91e9f70ea20a481adf91dd8d27e99 (diff)
downloadpx4-nuttx-cce5af04eab27f136d48a5d06f5ac97b22e6b627.tar.gz
px4-nuttx-cce5af04eab27f136d48a5d06f5ac97b22e6b627.tar.bz2
px4-nuttx-cce5af04eab27f136d48a5d06f5ac97b22e6b627.zip
Fix comments, references to the old SVN, and links to the old SVN. Replace with equivalent GIT info
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/exit.c5
-rw-r--r--nuttx/sched/task_exit.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/nuttx/sched/exit.c b/nuttx/sched/exit.c
index ec3f1b928..487748d3c 100644
--- a/nuttx/sched/exit.c
+++ b/nuttx/sched/exit.c
@@ -98,7 +98,10 @@ void exit(int status)
status &= 0xff;
- /* Perform common task termination logic */
+ /* Perform common task termination logic. This will get called again later
+ * through logic kicked off by _exit(). However, we need to call it before
+ * calling _exit() in order to handle atexit() and on_exit() callbacks.
+ */
task_exithook(tcb, status);
diff --git a/nuttx/sched/task_exit.c b/nuttx/sched/task_exit.c
index 4414030cf..aafe65f22 100644
--- a/nuttx/sched/task_exit.c
+++ b/nuttx/sched/task_exit.c
@@ -99,7 +99,7 @@ static inline void task_cancel_atexit(FAR struct tcb_s *tcb)
FAR struct task_group_s *group = tcb->group;
DEBUGASSERT(group);
- /* This behavior applies only to tasks that _exit() */
+ /* This behavior applies only to tasks that call _exit() */
#ifndef CONFIG_DISABLE_PTHREAD
if ((tcb->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_PTHREAD)
@@ -155,7 +155,7 @@ static inline void task_cancel_onexit(FAR struct tcb_s *tcb)
FAR struct task_group_s *group = tcb->group;
DEBUGASSERT(group);
- /* This behavior applies only to tasks that _exit() */
+ /* This behavior applies only to tasks that call _exit() */
#ifndef CONFIG_DISABLE_PTHREAD
if ((tcb->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_PTHREAD)