summaryrefslogtreecommitdiff
path: root/nuttx/sched/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/exit.c')
-rw-r--r--nuttx/sched/exit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/sched/exit.c b/nuttx/sched/exit.c
index b1f743d97..2f287009b 100644
--- a/nuttx/sched/exit.c
+++ b/nuttx/sched/exit.c
@@ -130,11 +130,13 @@ void exit(int status)
/* If an exit function was registered, call it now. */
- if (tcb->exitfunc) {
-
- (*tcb->exitfunc)();
+#ifdef CONFIG_SCHED_ATEXT
+ if (tcb->exitfunc)
+ {
+ (*tcb->exitfunc)();
+ }
+#endif
- } /* end if */
/* Then "really" exit */
_exit(status);