e3d8fe9d4a
this avoids having to pull in atexit() and its dependencies (lock(), unlock()) into every program. (as exits() is called by _main() from main9.s).
14 lines
149 B
C
14 lines
149 B
C
#include <u.h>
|
|
#include <libc.h>
|
|
|
|
void (*_onexit)(void);
|
|
|
|
#pragma profile off
|
|
|
|
void
|
|
exits(char *s)
|
|
{
|
|
if(_onexit != nil) (*_onexit)();
|
|
_exits(s);
|
|
}
|