syscall.h (5632a9fbcd451892332d45553ce8b831d5143691) syscall.h (fc79168a7c75423047d60a033dc4844955ccae0b)
1/* syscall.h */
2
3#ifndef _ASM_PARISC_SYSCALL_H_
4#define _ASM_PARISC_SYSCALL_H_
5
6#include <uapi/linux/audit.h>
7#include <linux/compat.h>
8#include <linux/err.h>
9#include <asm/ptrace.h>
10
1/* syscall.h */
2
3#ifndef _ASM_PARISC_SYSCALL_H_
4#define _ASM_PARISC_SYSCALL_H_
5
6#include <uapi/linux/audit.h>
7#include <linux/compat.h>
8#include <linux/err.h>
9#include <asm/ptrace.h>
10
11#define NR_syscalls (__NR_Linux_syscalls)
12
11static inline long syscall_get_nr(struct task_struct *tsk,
12 struct pt_regs *regs)
13{
14 return regs->gr[20];
15}
16
17static inline void syscall_get_arguments(struct task_struct *tsk,
18 struct pt_regs *regs, unsigned int i,

--- 9 unchanged lines hidden (view full) ---

28 case 4:
29 args[3] = regs->gr[23];
30 case 3:
31 args[2] = regs->gr[24];
32 case 2:
33 args[1] = regs->gr[25];
34 case 1:
35 args[0] = regs->gr[26];
13static inline long syscall_get_nr(struct task_struct *tsk,
14 struct pt_regs *regs)
15{
16 return regs->gr[20];
17}
18
19static inline void syscall_get_arguments(struct task_struct *tsk,
20 struct pt_regs *regs, unsigned int i,

--- 9 unchanged lines hidden (view full) ---

30 case 4:
31 args[3] = regs->gr[23];
32 case 3:
33 args[2] = regs->gr[24];
34 case 2:
35 args[1] = regs->gr[25];
36 case 1:
37 args[0] = regs->gr[26];
38 case 0:
36 break;
37 default:
38 BUG();
39 }
40}
41
39 break;
40 default:
41 BUG();
42 }
43}
44
45static inline long syscall_get_return_value(struct task_struct *task,
46 struct pt_regs *regs)
47{
48 return regs->gr[28];
49}
50
42static inline void syscall_set_return_value(struct task_struct *task,
43 struct pt_regs *regs,
44 int error, long val)
45{
46 regs->gr[28] = error ? error : val;
47}
48
49static inline void syscall_rollback(struct task_struct *task,

--- 15 unchanged lines hidden ---
51static inline void syscall_set_return_value(struct task_struct *task,
52 struct pt_regs *regs,
53 int error, long val)
54{
55 regs->gr[28] = error ? error : val;
56}
57
58static inline void syscall_rollback(struct task_struct *task,

--- 15 unchanged lines hidden ---