summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-27 16:47:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-27 16:47:13 +0000
commit83734c9d521ddadfabb9589da9574436fdf45f4a (patch)
tree845c1fe4db50e7e8a5454ca7dcf0aeba3210f439 /cpukit
parent2008-05-27 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-83734c9d521ddadfabb9589da9574436fdf45f4a.tar.bz2
2008-05-27 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/newlibc_exit.c, score/src/threadhandler.c: Call fini() as part of exit(). This avoids atexit() being a required function.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/libcsupport/src/newlibc_exit.c19
-rw-r--r--cpukit/score/src/threadhandler.c2
3 files changed, 15 insertions, 12 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 1c4ae0bff3..0cc569c4fa 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2008-05-27 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * libcsupport/src/newlibc_exit.c, score/src/threadhandler.c: Call
+ fini() as part of exit(). This avoids atexit() being a required
+ function.
+
+2008-05-27 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* libmisc/shell/shell.c: Minor change so dropping connection during
login prompt results in connection still being available.
diff --git a/cpukit/libcsupport/src/newlibc_exit.c b/cpukit/libcsupport/src/newlibc_exit.c
index cff0146cbb..735f5752d1 100644
--- a/cpukit/libcsupport/src/newlibc_exit.c
+++ b/cpukit/libcsupport/src/newlibc_exit.c
@@ -120,8 +120,16 @@ void libc_wrapup(void)
#include <unistd.h>
#if !defined(RTEMS_UNIX)
-void _exit(int status)
+ #define EXIT_SYMBOL _exit
+#else
+ #define EXIT_SYMBOL exit
+#endif
+
+void EXIT_SYMBOL(int status)
{
+ extern void _fini( void );
+ _fini();
+
/*
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
@@ -133,14 +141,5 @@ void _exit(int status)
for (;;) ; /* to avoid warnings */
}
-#else
-
-void exit(int status)
-{
- libc_wrapup();
- rtems_shutdown_executive(status);
- for (;;) ; /* to avoid warnings */
-}
-#endif
#endif
diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
index 0522061002..187ec62f39 100644
--- a/cpukit/score/src/threadhandler.c
+++ b/cpukit/score/src/threadhandler.c
@@ -130,9 +130,7 @@ void _Thread_Handler( void )
*/
if (!doneCons) /* && (volatile void *)_init) */
{
- extern void _fini( void );
_init ();
- atexit( _fini );
}
#endif
#if defined(__USE__MAIN__)