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.
This commit is contained in:
Joel Sherrill
2008-05-27 16:47:13 +00:00
parent 7c4cdeb9ea
commit 83734c9d52
3 changed files with 15 additions and 12 deletions
+6
View File
@@ -1,3 +1,9 @@
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
+9 -10
View File
@@ -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
-2
View File
@@ -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__)