syscall.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* system call interface. Linux/RISC-V version.
  2. Copyright (C) 2001-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library. If not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #include <sysdep.h>
  16. long int
  17. syscall (long int syscall_number, long int arg1, long int arg2, long int arg3,
  18. long int arg4, long int arg5, long int arg6, long int arg7)
  19. {
  20. long int ret;
  21. INTERNAL_SYSCALL_DECL (err);
  22. ret = INTERNAL_SYSCALL_NCS (syscall_number, err, 7, arg1, arg2, arg3, arg4,
  23. arg5, arg6, arg7);
  24. if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  25. return __syscall_error (ret);
  26. return ret;
  27. }