. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / posix / __exit.c
blob2f9c8beeb713dbab53d8adf8dcc82eec4ca17019
1 #define _exit __exit
2 #include <lib.h>
3 #include <unistd.h>
5 PUBLIC void _exit(status)
6 int status;
8 void (*suicide)(void);
9 message m;
11 m.m1_i1 = status;
12 _syscall(MM, EXIT, &m);
14 /* If exiting nicely through PM fails for some reason, try to
15 * commit suicide. E.g., message to PM might fail due to deadlock.
17 suicide = (void (*)(void)) -1;
18 suicide();
20 /* If committing suicide fails for some reason, hang. */
21 for(;;) { }