2 * Access to user system call parameters and results
4 * Copyright (C) 2008 Intel Corp. Shaohua Li <shaohua.li@intel.com>
6 * This copyrighted material is made available to anyone wishing to use,
7 * modify, copy, or redistribute it subject to the terms and conditions
8 * of the GNU General Public License v.2.
10 * See asm-generic/syscall.h for descriptions of what we must do here.
13 #ifndef _ASM_SYSCALL_H
14 #define _ASM_SYSCALL_H 1
16 #include <linux/sched.h>
17 #include <linux/err.h>
19 static inline long syscall_get_nr(struct task_struct
*task
,
22 if ((long)regs
->cr_ifs
< 0) /* Not a syscall */
28 static inline void syscall_rollback(struct task_struct
*task
,
34 static inline long syscall_get_error(struct task_struct
*task
,
37 return regs
->r10
== -1 ? regs
->r8
:0;
40 static inline long syscall_get_return_value(struct task_struct
*task
,
46 static inline void syscall_set_return_value(struct task_struct
*task
,
51 /* error < 0, but ia64 uses > 0 return value */
60 extern void ia64_syscall_get_set_arguments(struct task_struct
*task
,
61 struct pt_regs
*regs
, unsigned int i
, unsigned int n
,
62 unsigned long *args
, int rw
);
63 static inline void syscall_get_arguments(struct task_struct
*task
,
65 unsigned int i
, unsigned int n
,
70 ia64_syscall_get_set_arguments(task
, regs
, i
, n
, args
, 0);
73 static inline void syscall_set_arguments(struct task_struct
*task
,
75 unsigned int i
, unsigned int n
,
80 ia64_syscall_get_set_arguments(task
, regs
, i
, n
, args
, 1);
82 #endif /* _ASM_SYSCALL_H */