syscall_kern.c 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
  3. * Licensed under the GPL
  4. */
  5. #include "linux/sys.h"
  6. #include "linux/ptrace.h"
  7. #include "asm/errno.h"
  8. #include "asm/unistd.h"
  9. #include "asm/ptrace.h"
  10. #include "asm/current.h"
  11. #include "sysdep/syscalls.h"
  12. #include "kern_util.h"
  13. extern syscall_handler_t *sys_call_table[];
  14. long execute_syscall_skas(void *r)
  15. {
  16. struct pt_regs *regs = r;
  17. long res;
  18. int syscall;
  19. current->thread.nsyscalls++;
  20. nsyscalls++;
  21. syscall = UPT_SYSCALL_NR(&regs->regs);
  22. if((syscall >= NR_syscalls) || (syscall < 0))
  23. res = -ENOSYS;
  24. else res = EXECUTE_SYSCALL(syscall, regs);
  25. return(res);
  26. }
  27. /*
  28. * Overrides for Emacs so that we follow Linus's tabbing style.
  29. * Emacs will notice this stuff at the end of the file and automatically
  30. * adjust the settings for this buffer only. This must remain at the end
  31. * of the file.
  32. * ---------------------------------------------------------------------------
  33. * Local variables:
  34. * c-file-style: "linux"
  35. * End:
  36. */