This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / um / include / sysdep-x86_64 / syscalls.h
1 /*
2  * Copyright 2003 PathScale, Inc.
3  *
4  * Licensed under the GPL
5  */
6
7 #ifndef __SYSDEP_X86_64_SYSCALLS_H__
8 #define __SYSDEP_X86_64_SYSCALLS_H__
9
10 #include <linux/msg.h>
11 #include <linux/shm.h>
12
13 typedef long syscall_handler_t(void);
14
15 extern syscall_handler_t *ia32_sys_call_table[];
16
17 #define EXECUTE_SYSCALL(syscall, regs) \
18         (((long (*)(long, long, long, long, long, long)) \
19           (*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(&regs->regs), \
20                                       UPT_SYSCALL_ARG2(&regs->regs), \
21                                       UPT_SYSCALL_ARG3(&regs->regs), \
22                                       UPT_SYSCALL_ARG4(&regs->regs), \
23                                       UPT_SYSCALL_ARG5(&regs->regs), \
24                                       UPT_SYSCALL_ARG6(&regs->regs)))
25
26 extern long old_mmap(unsigned long addr, unsigned long len,
27                      unsigned long prot, unsigned long flags,
28                      unsigned long fd, unsigned long pgoff);
29 extern syscall_handler_t wrap_sys_shmat;
30 extern syscall_handler_t sys_modify_ldt;
31 extern syscall_handler_t sys_arch_prctl;
32
33 #define ARCH_SYSCALLS \
34         [ __NR_mmap ] = (syscall_handler_t *) old_mmap, \
35         [ __NR_select ] = (syscall_handler_t *) sys_select, \
36         [ __NR_mincore ] = (syscall_handler_t *) sys_mincore, \
37         [ __NR_madvise ] = (syscall_handler_t *) sys_madvise, \
38         [ __NR_shmget ] = (syscall_handler_t *) sys_shmget, \
39         [ __NR_shmat ] = (syscall_handler_t *) wrap_sys_shmat, \
40         [ __NR_shmctl ] = (syscall_handler_t *) sys_shmctl, \
41         [ __NR_semop ] = (syscall_handler_t *) sys_semop, \
42         [ __NR_semget ] = (syscall_handler_t *) sys_semget, \
43         [ __NR_semctl ] = (syscall_handler_t *) sys_semctl, \
44         [ __NR_shmdt ] = (syscall_handler_t *) sys_shmdt, \
45         [ __NR_msgget ] = (syscall_handler_t *) sys_msgget, \
46         [ __NR_msgsnd ] = (syscall_handler_t *) sys_msgsnd, \
47         [ __NR_msgrcv ] = (syscall_handler_t *) sys_msgrcv, \
48         [ __NR_msgctl ] = (syscall_handler_t *) sys_msgctl, \
49         [ __NR_pivot_root ] = (syscall_handler_t *) sys_pivot_root, \
50         [ __NR_tuxcall ] = (syscall_handler_t *) sys_ni_syscall, \
51         [ __NR_security ] = (syscall_handler_t *) sys_ni_syscall, \
52         [ __NR_epoll_ctl_old ] = (syscall_handler_t *) sys_ni_syscall, \
53         [ __NR_epoll_wait_old ] = (syscall_handler_t *) sys_ni_syscall, \
54         [ __NR_modify_ldt ] = (syscall_handler_t *) sys_modify_ldt, \
55         [ __NR_arch_prctl ] = (syscall_handler_t *) sys_arch_prctl, \
56         [ __NR_socket ] = (syscall_handler_t *) sys_socket, \
57         [ __NR_connect ] = (syscall_handler_t *) sys_connect, \
58         [ __NR_accept ] = (syscall_handler_t *) sys_accept, \
59         [ __NR_recvfrom ] = (syscall_handler_t *) sys_recvfrom, \
60         [ __NR_recvmsg ] = (syscall_handler_t *) sys_recvmsg, \
61         [ __NR_sendmsg ] = (syscall_handler_t *) sys_sendmsg, \
62         [ __NR_bind ] = (syscall_handler_t *) sys_bind, \
63         [ __NR_listen ] = (syscall_handler_t *) sys_listen, \
64         [ __NR_getsockname ] = (syscall_handler_t *) sys_getsockname, \
65         [ __NR_getpeername ] = (syscall_handler_t *) sys_getpeername, \
66         [ __NR_socketpair ] = (syscall_handler_t *) sys_socketpair, \
67         [ __NR_sendto ] = (syscall_handler_t *) sys_sendto, \
68         [ __NR_shutdown ] = (syscall_handler_t *) sys_shutdown, \
69         [ __NR_setsockopt ] = (syscall_handler_t *) sys_setsockopt, \
70         [ __NR_getsockopt ] = (syscall_handler_t *) sys_getsockopt, \
71         [ __NR_iopl ] = (syscall_handler_t *) sys_ni_syscall, \
72         [ __NR_set_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
73         [ __NR_get_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
74         [ __NR_semtimedop ] = (syscall_handler_t *) sys_semtimedop, \
75         [ 251 ] = (syscall_handler_t *) sys_ni_syscall,
76
77 #define LAST_ARCH_SYSCALL 251
78 #define NR_syscalls 1024
79
80 #endif
81
82 /*
83  * Overrides for Emacs so that we follow Linus's tabbing style.
84  * Emacs will notice this stuff at the end of the file and automatically
85  * adjust the settings for this buffer only.  This must remain at the end
86  * of the file.
87  * ---------------------------------------------------------------------------
88  * Local variables:
89  * c-file-style: "linux"
90  * End:
91  */