syscalls.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * syscalls.h - Linux syscall interfaces (arch-specific)
  3. *
  4. * Copyright (c) 2008 Jaswinder Singh
  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/types.h>
  14. #include <linux/signal.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/ldt.c */
  19. asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
  20. /* kernel/tls.c */
  21. asmlinkage int sys_set_thread_area(struct user_desc __user *);
  22. asmlinkage int sys_get_thread_area(struct user_desc __user *);
  23. /* X86_32 only */
  24. #ifdef CONFIG_X86_32
  25. /* kernel/process_32.c */
  26. ptregscall int sys_fork(struct pt_regs *);
  27. ptregscall int sys_clone(struct pt_regs *, unsigned long,
  28. unsigned long, int __user *,
  29. unsigned long, int __user *);
  30. ptregscall int sys_vfork(struct pt_regs *);
  31. ptregscall int sys_execve(struct pt_regs *, char __user *,
  32. char __user * __user *,
  33. char __user * __user *);
  34. /* kernel/signal_32.c */
  35. asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
  36. asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
  37. struct old_sigaction __user *);
  38. ptregscall int sys_sigaltstack(struct pt_regs *, const stack_t __user *,
  39. stack_t __user *);
  40. ptregscall unsigned long sys_sigreturn(struct pt_regs *);
  41. ptregscall int sys_rt_sigreturn(struct pt_regs *);
  42. /* kernel/ioport.c */
  43. ptregscall long sys_iopl(struct pt_regs *, unsigned int);
  44. /* kernel/sys_i386_32.c */
  45. asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
  46. unsigned long, unsigned long, unsigned long);
  47. struct mmap_arg_struct;
  48. asmlinkage int old_mmap(struct mmap_arg_struct __user *);
  49. struct sel_arg_struct;
  50. asmlinkage int old_select(struct sel_arg_struct __user *);
  51. asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
  52. struct old_utsname;
  53. asmlinkage int sys_uname(struct old_utsname __user *);
  54. struct oldold_utsname;
  55. asmlinkage int sys_olduname(struct oldold_utsname __user *);
  56. /* kernel/vm86_32.c */
  57. ptregscall int sys_vm86old(struct pt_regs *, struct vm86_struct __user *);
  58. ptregscall int sys_vm86(struct pt_regs *, unsigned long, unsigned long);
  59. #else /* CONFIG_X86_32 */
  60. /* X86_64 only */
  61. /* kernel/process_64.c */
  62. asmlinkage long sys_fork(struct pt_regs *);
  63. asmlinkage long sys_clone(unsigned long, unsigned long,
  64. void __user *, void __user *,
  65. struct pt_regs *);
  66. asmlinkage long sys_vfork(struct pt_regs *);
  67. asmlinkage long sys_execve(char __user *, char __user * __user *,
  68. char __user * __user *,
  69. struct pt_regs *);
  70. /* kernel/ioport.c */
  71. asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
  72. /* kernel/signal_64.c */
  73. asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
  74. struct pt_regs *);
  75. asmlinkage long sys_rt_sigreturn(struct pt_regs *);
  76. /* kernel/sys_x86_64.c */
  77. asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
  78. unsigned long, unsigned long, unsigned long);
  79. struct new_utsname;
  80. asmlinkage long sys_uname(struct new_utsname __user *);
  81. #endif /* CONFIG_X86_32 */
  82. #endif /* _ASM_X86_SYSCALLS_H */