chiark / gitweb /
volume_id: provide libvolume_id.a file
[elogind.git] / klibc / klibc / exitc.c
1 /*
2  * exit.c
3  *
4  * Implement exit()
5  */
6
7 #include <stdlib.h>
8 #include <unistd.h>
9 #include <sys/syscall.h>
10
11 /* We have an assembly version for i386 and x86-64 */
12
13 #if !defined(__i386__) && !defined(__x86_64__)
14
15 /* This allows atexit/on_exit to install a hook */
16 __noreturn (*__exit_handler)(int) = _exit;
17
18 __noreturn exit(int rv)
19 {
20   __exit_handler(rv);
21 }
22
23 #endif