syscall.c 668 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * syscall() library function
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <stdarg.h>
  7. #include <sys/syscall.h>
  8. #include <unistd.h>
  9. long syscall(long sysnum, ...)
  10. {
  11. unsigned long arg1, arg2, arg3, arg4, arg5, arg6;
  12. va_list arg;
  13. va_start (arg, sysnum);
  14. arg1 = va_arg (arg, unsigned long);
  15. arg2 = va_arg (arg, unsigned long);
  16. arg3 = va_arg (arg, unsigned long);
  17. arg4 = va_arg (arg, unsigned long);
  18. arg5 = va_arg (arg, unsigned long);
  19. arg6 = va_arg (arg, unsigned long);
  20. va_end (arg);
  21. __asm__ volatile ( "" ::: "memory" );
  22. return INLINE_SYSCALL_NCS(sysnum, 6, arg1, arg2, arg3, arg4, arg5, arg6);
  23. }