syscalls.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. typedef long syscall_handler_t(unsigned long arg1, unsigned long arg2,
  6. unsigned long arg3, unsigned long arg4,
  7. unsigned long arg5, unsigned long arg6);
  8. #define EXECUTE_SYSCALL(syscall, regs) \
  9. (*sys_call_table[syscall])(UM_SYSCALL_ARG1(&regs), \
  10. UM_SYSCALL_ARG2(&regs), \
  11. UM_SYSCALL_ARG3(&regs), \
  12. UM_SYSCALL_ARG4(&regs), \
  13. UM_SYSCALL_ARG5(&regs), \
  14. UM_SYSCALL_ARG6(&regs))
  15. extern syscall_handler_t sys_mincore;
  16. extern syscall_handler_t sys_madvise;
  17. /* old_mmap needs the correct prototype since syscall_kern.c includes
  18. * this file.
  19. */
  20. int old_mmap(unsigned long addr, unsigned long len,
  21. unsigned long prot, unsigned long flags,
  22. unsigned long fd, unsigned long offset);
  23. #define ARCH_SYSCALLS \
  24. [ __NR_modify_ldt ] = sys_ni_syscall, \
  25. [ __NR_pciconfig_read ] = sys_ni_syscall, \
  26. [ __NR_pciconfig_write ] = sys_ni_syscall, \
  27. [ __NR_pciconfig_iobase ] = sys_ni_syscall, \
  28. [ __NR_pivot_root ] = sys_ni_syscall, \
  29. [ __NR_multiplexer ] = sys_ni_syscall, \
  30. [ __NR_mmap ] = old_mmap, \
  31. [ __NR_madvise ] = sys_madvise, \
  32. [ __NR_mincore ] = sys_mincore, \
  33. [ __NR_iopl ] = (syscall_handler_t *) sys_ni_syscall, \
  34. [ __NR_utimes ] = (syscall_handler_t *) sys_utimes, \
  35. [ __NR_fadvise64 ] = (syscall_handler_t *) sys_fadvise64,
  36. #define LAST_ARCH_SYSCALL __NR_fadvise64