_exit.c 561 B

1234567891011121314151617181920212223242526
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * exit syscall for uClibc
  4. *
  5. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include <unistd.h>
  10. #include <stdlib.h>
  11. #include <sys/syscall.h>
  12. void _exit(int status)
  13. {
  14. /* The loop is added only to keep gcc happy. */
  15. while(1)
  16. {
  17. #if defined __NR_exit_group && defined __UCLIBC_HAS_THREADS_NATIVE__
  18. INLINE_SYSCALL(exit_group, 1, status);
  19. #endif
  20. INLINE_SYSCALL(exit, 1, status);
  21. }
  22. }
  23. libc_hidden_def(_exit)
  24. weak_alias(_exit,_Exit)