blob: 617295255a17c5b9e794ab231fd16ce48049ca9e [file] [log] [blame]
Jaswinder Singhbbc1f692008-07-21 21:34:13 +05301/*
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.
Jaswinder Singhbbc1f692008-07-21 21:34:13 +05308 */
9
10#ifndef _ASM_X86_SYSCALLS_H
11#define _ASM_X86_SYSCALLS_H
12
13#include <linux/compiler.h>
14#include <linux/linkage.h>
15#include <linux/types.h>
16#include <linux/signal.h>
17
18/* Common in X86_32 and X86_64 */
19/* kernel/ioport.c */
20asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
21
Jaswinder Singhc0195b62008-12-15 22:26:30 +053022/* kernel/ldt.c */
23asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
24
Jaswinder Singh7c9c1602008-12-17 23:18:52 +053025/* kernel/tls.c */
26asmlinkage int sys_set_thread_area(struct user_desc __user *);
27asmlinkage int sys_get_thread_area(struct user_desc __user *);
28
Jaswinder Singhbbc1f692008-07-21 21:34:13 +053029/* X86_32 only */
30#ifdef CONFIG_X86_32
31/* kernel/process_32.c */
Brian Gerst253f29a2009-02-10 09:51:46 -050032ptregscall int sys_fork(struct pt_regs *);
33ptregscall int sys_clone(struct pt_regs *, unsigned long,
34 unsigned long, int __user *,
35 unsigned long, int __user *);
36ptregscall int sys_vfork(struct pt_regs *);
37ptregscall int sys_execve(struct pt_regs *, char __user *,
38 char __user * __user *,
39 char __user * __user *);
Jaswinder Singhbbc1f692008-07-21 21:34:13 +053040
41/* kernel/signal_32.c */
42asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
43asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
44 struct old_sigaction __user *);
Brian Gerst253f29a2009-02-10 09:51:46 -050045ptregscall int sys_sigaltstack(struct pt_regs *, const stack_t __user *,
46 stack_t __user *);
47ptregscall unsigned long sys_sigreturn(struct pt_regs *);
48ptregscall int sys_rt_sigreturn(struct pt_regs *);
Jaswinder Singhbbc1f692008-07-21 21:34:13 +053049
50/* kernel/ioport.c */
Brian Gerst253f29a2009-02-10 09:51:46 -050051ptregscall long sys_iopl(struct pt_regs *, unsigned int);
Jaswinder Singhbbc1f692008-07-21 21:34:13 +053052
Jaswinder Singhbbc1f692008-07-21 21:34:13 +053053/* kernel/sys_i386_32.c */
54asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
55 unsigned long, unsigned long, unsigned long);
56struct mmap_arg_struct;
57asmlinkage int old_mmap(struct mmap_arg_struct __user *);
58struct sel_arg_struct;
59asmlinkage int old_select(struct sel_arg_struct __user *);
60asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
61struct old_utsname;
62asmlinkage int sys_uname(struct old_utsname __user *);
63struct oldold_utsname;
64asmlinkage int sys_olduname(struct oldold_utsname __user *);
65
Jaswinder Singh8f7db512008-07-23 17:31:02 +053066/* kernel/vm86_32.c */
Brian Gerst253f29a2009-02-10 09:51:46 -050067ptregscall int sys_vm86old(struct pt_regs *, struct vm86_struct __user *);
68ptregscall int sys_vm86(struct pt_regs *, unsigned long, unsigned long);
Jaswinder Singh8f7db512008-07-23 17:31:02 +053069
Jaswinder Singhbbc1f692008-07-21 21:34:13 +053070#else /* CONFIG_X86_32 */
71
72/* X86_64 only */
73/* kernel/process_64.c */
74asmlinkage long sys_fork(struct pt_regs *);
75asmlinkage long sys_clone(unsigned long, unsigned long,
76 void __user *, void __user *,
77 struct pt_regs *);
78asmlinkage long sys_vfork(struct pt_regs *);
79asmlinkage long sys_execve(char __user *, char __user * __user *,
80 char __user * __user *,
81 struct pt_regs *);
82
83/* kernel/ioport.c */
84asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
85
86/* kernel/signal_64.c */
87asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
88 struct pt_regs *);
89asmlinkage long sys_rt_sigreturn(struct pt_regs *);
90
91/* kernel/sys_x86_64.c */
92asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
93 unsigned long, unsigned long, unsigned long);
Jaswinder Singh461d1592008-07-25 09:19:05 +053094struct new_utsname;
Jaswinder Singhbbc1f692008-07-21 21:34:13 +053095asmlinkage long sys_uname(struct new_utsname __user *);
96
97#endif /* CONFIG_X86_32 */
98#endif /* _ASM_X86_SYSCALLS_H */