mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 21:14:06 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__)
|
||||
|
||||
Reference in New Issue
Block a user