syscalls.h 2.6 KB
Newer Older
1 2 3
/*
 * syscalls.h - Linux syscall interfaces (arch-specific)
 *
4
 * Copyright (c) 2008 Jaswinder Singh Rajput
5 6 7 8 9 10 11 12 13 14 15
 *
 * This file is released under the GPLv2.
 * See the file COPYING for more details.
 */

#ifndef _ASM_X86_SYSCALLS_H
#define _ASM_X86_SYSCALLS_H

#include <linux/compiler.h>
#include <linux/linkage.h>
#include <linux/signal.h>
16
#include <linux/types.h>
17 18 19 20

/* Common in X86_32 and X86_64 */
/* kernel/ioport.c */
asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
B
Brian Gerst 已提交
21
long sys_iopl(unsigned int, struct pt_regs *);
22

23 24 25
/* kernel/process.c */
int sys_fork(struct pt_regs *);
int sys_vfork(struct pt_regs *);
B
Brian Gerst 已提交
26 27
long sys_execve(char __user *, char __user * __user *,
		char __user * __user *, struct pt_regs *);
28

29 30 31
/* kernel/ldt.c */
asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);

32 33
/* kernel/signal.c */
long sys_rt_sigreturn(struct pt_regs *);
B
Brian Gerst 已提交
34 35 36
long sys_sigaltstack(const stack_t __user *, stack_t __user *,
		     struct pt_regs *);

37

38 39 40 41
/* kernel/tls.c */
asmlinkage int sys_set_thread_area(struct user_desc __user *);
asmlinkage int sys_get_thread_area(struct user_desc __user *);

42 43
/* X86_32 only */
#ifdef CONFIG_X86_32
44

45
/* kernel/process_32.c */
46
int sys_clone(struct pt_regs *);
47

48
/* kernel/signal.c */
49 50 51
asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
			     struct old_sigaction __user *);
52
unsigned long sys_sigreturn(struct pt_regs *);
53 54

/* kernel/sys_i386_32.c */
55 56 57 58 59
struct mmap_arg_struct;
struct sel_arg_struct;
struct oldold_utsname;
struct old_utsname;

60 61 62 63 64 65 66 67
asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
			  unsigned long, unsigned long, unsigned long);
asmlinkage int old_mmap(struct mmap_arg_struct __user *);
asmlinkage int old_select(struct sel_arg_struct __user *);
asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
asmlinkage int sys_uname(struct old_utsname __user *);
asmlinkage int sys_olduname(struct oldold_utsname __user *);

68
/* kernel/vm86_32.c */
69 70
int sys_vm86old(struct vm86_struct __user *, struct pt_regs *);
int sys_vm86(unsigned long, unsigned long, struct pt_regs *);
71

72 73 74 75 76 77 78
#else /* CONFIG_X86_32 */

/* X86_64 only */
/* kernel/process_64.c */
asmlinkage long sys_clone(unsigned long, unsigned long,
			  void __user *, void __user *,
			  struct pt_regs *);
79
long sys_arch_prctl(int, unsigned long);
80 81

/* kernel/sys_x86_64.c */
82 83
struct new_utsname;

84 85 86 87 88 89
asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
			 unsigned long, unsigned long, unsigned long);
asmlinkage long sys_uname(struct new_utsname __user *);

#endif /* CONFIG_X86_32 */
#endif /* _ASM_X86_SYSCALLS_H */