summaryrefslogtreecommitdiff
path: root/nuttx/sched/on_exit.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-01 16:50:53 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-01 16:50:53 +0000
commit43f7ddc7d410a4982ec78cc45cc413a3270d1b52 (patch)
tree6047f392552b62c0d5f6e7aabe95266b5f2ef0cf /nuttx/sched/on_exit.c
parent86e0e99187f2074474404662a4e7cee3d2c5f2da (diff)
downloadpx4-nuttx-43f7ddc7d410a4982ec78cc45cc413a3270d1b52.tar.gz
px4-nuttx-43f7ddc7d410a4982ec78cc45cc413a3270d1b52.tar.bz2
px4-nuttx-43f7ddc7d410a4982ec78cc45cc413a3270d1b52.zip
Add __cxa_atexit(); atexit() is now built on top of on_exit()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5292 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/on_exit.c')
-rw-r--r--nuttx/sched/on_exit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/nuttx/sched/on_exit.c b/nuttx/sched/on_exit.c
index 5b8be5cd1..19a4f9196 100644
--- a/nuttx/sched/on_exit.c
+++ b/nuttx/sched/on_exit.c
@@ -117,7 +117,7 @@ int on_exit(CODE void (*func)(int, FAR void *), FAR void *arg)
#if defined(CONFIG_SCHED_ONEXIT_MAX) && CONFIG_SCHED_ONEXIT_MAX > 1
_TCB *tcb = (_TCB*)g_readytorun.head;
int index;
- int ret = ERROR;
+ int ret = ENOSPC;
/* The following must be atomic */
@@ -131,7 +131,6 @@ int on_exit(CODE void (*func)(int, FAR void *), FAR void *arg)
* indices.
*/
- available = -1;
for (index = 0; index < CONFIG_SCHED_ONEXIT_MAX; index++)
{
if (!tcb->onexitfunc[index])
@@ -149,7 +148,7 @@ int on_exit(CODE void (*func)(int, FAR void *), FAR void *arg)
return ret;
#else
_TCB *tcb = (_TCB*)g_readytorun.head;
- int ret = ERROR;
+ int ret = ENOSPC;
/* The following must be atomic */