mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
Create a branch for header work.
svn path=/branches/header-work/; revision=45691
This commit is contained in:
parent
14fe274b1c
commit
9ea495ba33
19538 changed files with 0 additions and 1063950 deletions
55
lib/sdk/crt/stdlib/_exit.c
Normal file
55
lib/sdk/crt/stdlib/_exit.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
#include <precomp.h>
|
||||
#include <internal/atexit.h>
|
||||
|
||||
extern void _atexit_cleanup(void);
|
||||
|
||||
struct __atexit *__atexit_ptr = 0;
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void exit(int status)
|
||||
{
|
||||
//int i;
|
||||
|
||||
/*
|
||||
if (__stdio_cleanup_hook)
|
||||
__stdio_cleanup_hook();
|
||||
for (i=0; i<djgpp_last_dtor-djgpp_first_dtor; i++)
|
||||
djgpp_first_dtor[i]();
|
||||
*/
|
||||
/* in case the program set it this way */
|
||||
_setmode(0, _O_TEXT);
|
||||
_atexit_cleanup();
|
||||
_exit(status);
|
||||
for(;;);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void _exit(int _status)
|
||||
{
|
||||
// FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload
|
||||
ExitProcess(_status);
|
||||
for(;;);
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
void _cexit( void )
|
||||
{
|
||||
_atexit_cleanup();
|
||||
// flush
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
void _c_exit( void )
|
||||
{
|
||||
// FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload
|
||||
// reset interup vectors
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue