-extern void (*const __fini_array_start)() __attribute__((weak));
-extern void (*const __fini_array_end)() __attribute__((weak));
-#endif
-
-_Noreturn void exit(int code)
-{
- static int lock;
-
- /* If more than one thread calls exit, hang until _Exit ends it all */
- while (a_swap(&lock, 1)) __syscall(SYS_pause);