__syscall_error.c 476 B

12345678910111213141516171819
  1. /*
  2. * This file is subject to the terms and conditions of the LGPL V2.1
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2018 Kalray Inc.
  7. */
  8. #include <errno.h>
  9. #include <features.h>
  10. /* This routine is jumped to by all the syscall handlers, to stash
  11. * an error number into errno. */
  12. long __syscall_error(int err_no) attribute_hidden;
  13. long __syscall_error(int err_no)
  14. {
  15. __set_errno(-err_no);
  16. return -1;
  17. }