2 * Copyright (C) 2011 Texas Instruments Incorporated
3 * Author: Mark Salter <msalter@redhat.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
11 #ifndef __ASM_C6X_SYSCALL_H
12 #define __ASM_C6X_SYSCALL_H
14 #include <linux/err.h>
15 #include <linux/sched.h>
17 static inline int syscall_get_nr(struct task_struct
*task
,
23 static inline void syscall_rollback(struct task_struct
*task
,
29 static inline long syscall_get_error(struct task_struct
*task
,
32 return IS_ERR_VALUE(regs
->a4
) ? regs
->a4
: 0;
35 static inline long syscall_get_return_value(struct task_struct
*task
,
41 static inline void syscall_set_return_value(struct task_struct
*task
,
45 regs
->a4
= error
?: val
;
48 static inline void syscall_get_arguments(struct task_struct
*task
,
49 struct pt_regs
*regs
, unsigned int i
,
50 unsigned int n
, unsigned long *args
)
85 static inline void syscall_set_arguments(struct task_struct
*task
,
87 unsigned int i
, unsigned int n
,
88 const unsigned long *args
)
123 #endif /* __ASM_C6X_SYSCALLS_H */