__syscall_error.c 394 B

12345678910111213141516
  1. /*
  2. * Copyright (C) 2016 Andes Technology, Inc.
  3. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  4. */
  5. #include <errno.h>
  6. #include <features.h>
  7. /* This routine is jumped to by all the syscall handlers, to stash
  8. * an error number into errno. */
  9. long __syscall_error(int err_no) attribute_hidden;
  10. long __syscall_error(int err_no)
  11. {
  12. __set_errno(err_no);
  13. return -1;
  14. }