2005-04-16 18:20:36 -04:00
|
|
|
/*
|
|
|
|
* 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>
|
2007-05-15 15:36:00 -04:00
|
|
|
#include <kern_constants.h>
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
typedef long syscall_handler_t(void);
|
|
|
|
|
2005-09-03 18:57:42 -04:00
|
|
|
extern syscall_handler_t *sys_call_table[];
|
|
|
|
|
2005-04-16 18:20:36 -04:00
|
|
|
#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 sys_modify_ldt;
|
|
|
|
extern syscall_handler_t sys_arch_prctl;
|
|
|
|
|
2007-05-15 15:36:00 -04:00
|
|
|
#define NR_syscalls (UM_NR_syscall_max + 1)
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
#endif
|