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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nuttx/sched/exit.c b/nuttx/sched/exit.c
index 93e24a29d..6793eae77 100644
--- a/nuttx/sched/exit.c
+++ b/nuttx/sched/exit.c
@@ -91,7 +91,9 @@
void exit(int status)
{
+#if CONFIG_NFILE_STREAMS > 0 || defined(CONFIG_SCHED_WAITPID) || defined(CONFIG_SCHED_ATEXIT)
_TCB *tcb = (_TCB*)g_readytorun.head;
+#endif
/* Only the lower 8 bits of the exit status are used */