diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-01 16:50:53 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-01 16:50:53 +0000 |
commit | eb26187767da1e752bfdc6571ccb70e3f84fd954 (patch) | |
tree | 6047f392552b62c0d5f6e7aabe95266b5f2ef0cf /nuttx/sched/on_exit.c | |
parent | 1214744afca8851c7888b6b3f2bb8b47c5a815e2 (diff) | |
download | px4-firmware-eb26187767da1e752bfdc6571ccb70e3f84fd954.tar.gz px4-firmware-eb26187767da1e752bfdc6571ccb70e3f84fd954.tar.bz2 px4-firmware-eb26187767da1e752bfdc6571ccb70e3f84fd954.zip |
Add __cxa_atexit(); atexit() is now built on top of on_exit()
git-svn-id: http://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.c | 5 |
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 */ |