syscalls.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * syscalls.h - Linux syscall interfaces (arch-specific)
  3. *
  4. * Copyright (c) 2008 Jaswinder Singh Rajput
  5. *
  6. * This file is released under the GPLv2.
  7. * See the file COPYING for more details.
  8. */
  9. #ifndef _ASM_X86_SYSCALLS_H
  10. #define _ASM_X86_SYSCALLS_H
  11. #include <linux/compiler.h>
  12. #include <linux/linkage.h>
  13. #include <linux/signal.h>
  14. #include <linux/types.h>
  15. /* Common in X86_32 and X86_64 */
  16. /* kernel/ioport.c */
  17. asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
  18. /* kernel/process.c */
  19. int sys_fork(struct pt_regs *);
  20. int sys_vfork(struct pt_regs *);
  21. /* kernel/ldt.c */
  22. asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
  23. /* kernel/signal.c */
  24. long sys_rt_sigreturn(struct pt_regs *);
  25. /* kernel/tls.c */
  26. asmlinkage int sys_set_thread_area(struct user_desc __user *);
  27. asmlinkage int sys_get_thread_area(struct user_desc __user *);
  28. /* X86_32 only */
  29. #ifdef CONFIG_X86_32
  30. /* kernel/ioport.c */
  31. long sys_iopl(struct pt_regs *);
  32. /* kernel/process_32.c */
  33. int sys_clone(struct pt_regs *);
  34. int sys_execve(struct pt_regs *);
  35. /* kernel/signal.c */
  36. asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
  37. asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
  38. struct old_sigaction __user *);
  39. int sys_sigaltstack(struct pt_regs *);
  40. unsigned long sys_sigreturn(struct pt_regs *);
  41. /* kernel/sys_i386_32.c */
  42. struct mmap_arg_struct;
  43. struct sel_arg_struct;
  44. struct oldold_utsname;
  45. struct old_utsname;
  46. asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
  47. unsigned long, unsigned long, unsigned long);
  48. asmlinkage int old_mmap(struct mmap_arg_struct __user *);
  49. asmlinkage int old_select(struct sel_arg_struct __user *);
  50. asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
  51. asmlinkage int sys_uname(struct old_utsname __user *);
  52. asmlinkage int sys_olduname(struct oldold_utsname __user *);
  53. /* kernel/vm86_32.c */
  54. int sys_vm86old(struct pt_regs *);
  55. int sys_vm86(struct pt_regs *);
  56. #else /* CONFIG_X86_32 */
  57. /* X86_64 only */
  58. /* kernel/ioport.c */
  59. asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
  60. /* kernel/process_64.c */
  61. asmlinkage long sys_clone(unsigned long, unsigned long,
  62. void __user *, void __user *,
  63. struct pt_regs *);
  64. asmlinkage long sys_execve(char __user *, char __user * __user *,
  65. char __user * __user *,
  66. struct pt_regs *);
  67. long sys_arch_prctl(int, unsigned long);
  68. /* kernel/signal.c */
  69. asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
  70. struct pt_regs *);
  71. /* kernel/sys_x86_64.c */
  72. struct new_utsname;
  73. asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
  74. unsigned long, unsigned long, unsigned long);
  75. asmlinkage long sys_uname(struct new_utsname __user *);
  76. #endif /* CONFIG_X86_32 */
  77. #endif /* _ASM_X86_SYSCALLS_H */