summaryrefslogtreecommitdiffstats
path: root/arch/um/include/sysdep-x86_64/syscalls.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/um/include/sysdep-x86_64/syscalls.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/um/include/sysdep-x86_64/syscalls.h')
-rw-r--r--arch/um/include/sysdep-x86_64/syscalls.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/arch/um/include/sysdep-x86_64/syscalls.h b/arch/um/include/sysdep-x86_64/syscalls.h
new file mode 100644
index 00000000000..b187a4157ff
--- /dev/null
+++ b/arch/um/include/sysdep-x86_64/syscalls.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2003 PathScale, Inc.
+ *
+ * Licensed under the GPL
+ */
+
+#ifndef __SYSDEP_X86_64_SYSCALLS_H__
+#define __SYSDEP_X86_64_SYSCALLS_H__
+
+#include <linux/msg.h>
+#include <linux/shm.h>
+
+typedef long syscall_handler_t(void);
+
+extern syscall_handler_t *ia32_sys_call_table[];
+
+#define EXECUTE_SYSCALL(syscall, regs) \
+ (((long (*)(long, long, long, long, long, long)) \
+ (*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(&regs->regs), \
+ UPT_SYSCALL_ARG2(&regs->regs), \
+ UPT_SYSCALL_ARG3(&regs->regs), \
+ UPT_SYSCALL_ARG4(&regs->regs), \
+ UPT_SYSCALL_ARG5(&regs->regs), \
+ UPT_SYSCALL_ARG6(&regs->regs)))
+
+extern long old_mmap(unsigned long addr, unsigned long len,
+ unsigned long prot, unsigned long flags,
+ unsigned long fd, unsigned long pgoff);
+extern syscall_handler_t wrap_sys_shmat;
+extern syscall_handler_t sys_modify_ldt;
+extern syscall_handler_t sys_arch_prctl;
+
+#define ARCH_SYSCALLS \
+ [ __NR_mmap ] = (syscall_handler_t *) old_mmap, \
+ [ __NR_select ] = (syscall_handler_t *) sys_select, \
+ [ __NR_mincore ] = (syscall_handler_t *) sys_mincore, \
+ [ __NR_madvise ] = (syscall_handler_t *) sys_madvise, \
+ [ __NR_shmget ] = (syscall_handler_t *) sys_shmget, \
+ [ __NR_shmat ] = (syscall_handler_t *) wrap_sys_shmat, \
+ [ __NR_shmctl ] = (syscall_handler_t *) sys_shmctl, \
+ [ __NR_semop ] = (syscall_handler_t *) sys_semop, \
+ [ __NR_semget ] = (syscall_handler_t *) sys_semget, \
+ [ __NR_semctl ] = (syscall_handler_t *) sys_semctl, \
+ [ __NR_shmdt ] = (syscall_handler_t *) sys_shmdt, \
+ [ __NR_msgget ] = (syscall_handler_t *) sys_msgget, \
+ [ __NR_msgsnd ] = (syscall_handler_t *) sys_msgsnd, \
+ [ __NR_msgrcv ] = (syscall_handler_t *) sys_msgrcv, \
+ [ __NR_msgctl ] = (syscall_handler_t *) sys_msgctl, \
+ [ __NR_pivot_root ] = (syscall_handler_t *) sys_pivot_root, \
+ [ __NR_tuxcall ] = (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_security ] = (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_epoll_ctl_old ] = (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_epoll_wait_old ] = (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_modify_ldt ] = (syscall_handler_t *) sys_modify_ldt, \
+ [ __NR_arch_prctl ] = (syscall_handler_t *) sys_arch_prctl, \
+ [ __NR_socket ] = (syscall_handler_t *) sys_socket, \
+ [ __NR_connect ] = (syscall_handler_t *) sys_connect, \
+ [ __NR_accept ] = (syscall_handler_t *) sys_accept, \
+ [ __NR_recvfrom ] = (syscall_handler_t *) sys_recvfrom, \
+ [ __NR_recvmsg ] = (syscall_handler_t *) sys_recvmsg, \
+ [ __NR_sendmsg ] = (syscall_handler_t *) sys_sendmsg, \
+ [ __NR_bind ] = (syscall_handler_t *) sys_bind, \
+ [ __NR_listen ] = (syscall_handler_t *) sys_listen, \
+ [ __NR_getsockname ] = (syscall_handler_t *) sys_getsockname, \
+ [ __NR_getpeername ] = (syscall_handler_t *) sys_getpeername, \
+ [ __NR_socketpair ] = (syscall_handler_t *) sys_socketpair, \
+ [ __NR_sendto ] = (syscall_handler_t *) sys_sendto, \
+ [ __NR_shutdown ] = (syscall_handler_t *) sys_shutdown, \
+ [ __NR_setsockopt ] = (syscall_handler_t *) sys_setsockopt, \
+ [ __NR_getsockopt ] = (syscall_handler_t *) sys_getsockopt, \
+ [ __NR_iopl ] = (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_set_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_get_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
+ [ __NR_semtimedop ] = (syscall_handler_t *) sys_semtimedop, \
+ [ 251 ] = (syscall_handler_t *) sys_ni_syscall,
+
+#define LAST_ARCH_SYSCALL 251
+#define NR_syscalls 1024
+
+#endif
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only. This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-file-style: "linux"
+ * End:
+ */