__syscall_error.c 390 B

12345678910111213141516
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <errno.h>
  7. /* This routine is jumped to by all the syscall handlers, to stash
  8. an error number into errno. */
  9. int attribute_hidden __syscall_error (void)
  10. {
  11. register int err_no __asm__("$0");
  12. __set_errno (err_no);
  13. return -1;
  14. }