80f9507886
Reuse asm-x86-64/unistd.h to build our syscall table, like x86-64 already does. Like for i386, we must add some #defines for all the (right!) changes UML does to x86-64 syscall table. Note: I noted a bogus: [ __NR_sched_yield ] = (syscall_handler_t *) yield, while doing this patch (which could only be a workaround for some strange bug, but I would ignore this possibility). I'm changing this without notice. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
36 lines
985 B
C
36 lines
985 B
C
/*
|
|
* 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(®s->regs), \
|
|
UPT_SYSCALL_ARG2(®s->regs), \
|
|
UPT_SYSCALL_ARG3(®s->regs), \
|
|
UPT_SYSCALL_ARG4(®s->regs), \
|
|
UPT_SYSCALL_ARG5(®s->regs), \
|
|
UPT_SYSCALL_ARG6(®s->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 NR_syscalls (__NR_syscall_max + 1)
|
|
|
|
#endif
|