• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/parisc/include/asm/
1/* syscall.h */
2
3#ifndef _ASM_PARISC_SYSCALL_H_
4#define _ASM_PARISC_SYSCALL_H_
5
6#include <linux/err.h>
7#include <asm/ptrace.h>
8
9static inline long syscall_get_nr(struct task_struct *tsk,
10				  struct pt_regs *regs)
11{
12	return regs->gr[20];
13}
14
15static inline void syscall_get_arguments(struct task_struct *tsk,
16					 struct pt_regs *regs, unsigned int i,
17					 unsigned int n, unsigned long *args)
18{
19	BUG_ON(i);
20
21	switch (n) {
22	case 6:
23		args[5] = regs->gr[21];
24	case 5:
25		args[4] = regs->gr[22];
26	case 4:
27		args[3] = regs->gr[23];
28	case 3:
29		args[2] = regs->gr[24];
30	case 2:
31		args[1] = regs->gr[25];
32	case 1:
33		args[0] = regs->gr[26];
34		break;
35	default:
36		BUG();
37	}
38}
39
40#endif /*_ASM_PARISC_SYSCALL_H_*/
41