Xenomai
3.0-rc6
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
syscall.h
1
/*
2
* Copyright (C) 2011 Philippe Gerum <rpm@xenomai.org>.
3
*
4
* Xenomai is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published
6
* by the Free Software Foundation; either version 2 of the License,
7
* or (at your option) any later version.
8
*
9
* Xenomai is distributed in the hope that it will be useful, but
10
* WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with Xenomai; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17
* 02111-1307, USA.
18
*/
19
#ifndef _COBALT_SH_ASM_SYSCALL_H
20
#define _COBALT_SH_ASM_SYSCALL_H
21
22
#include <linux/errno.h>
23
#include <asm/ptrace.h>
24
#include <asm-generic/xenomai/syscall.h>
25
26
#define __xn_reg_sys(__regs) ((__regs)->regs[3])
27
#define __xn_syscall_p(__regs) (__xn_reg_sys(__regs) & __COBALT_SYSCALL_BIT)
28
#define __xn_syscall(__regs) (__xn_reg_sys(__regs) & ~__COBALT_SYSCALL_BIT)
29
30
#define __xn_reg_rval(__regs) ((__regs)->regs[0])
31
#define __xn_reg_arg1(__regs) ((__regs)->regs[4])
32
#define __xn_reg_arg2(__regs) ((__regs)->regs[5])
33
#define __xn_reg_arg3(__regs) ((__regs)->regs[6])
34
#define __xn_reg_arg4(__regs) ((__regs)->regs[7])
35
#define __xn_reg_arg5(__regs) ((__regs)->regs[0])
36
37
static
inline
void
__xn_error_return(
struct
pt_regs *regs,
int
v)
38
{
39
__xn_reg_rval(regs) = v;
40
}
41
42
static
inline
void
__xn_status_return(
struct
pt_regs *regs,
long
v)
43
{
44
__xn_reg_rval(regs) = v;
45
}
46
47
static
inline
int
__xn_interrupted_p(
struct
pt_regs *regs)
48
{
49
return
__xn_reg_rval(regs) == -EINTR;
50
}
51
52
static
inline
int
xnarch_local_syscall(
void
)
53
{
54
return
-ENOSYS;
55
}
56
57
#endif
/* !_COBALT_SH_ASM_SYSCALL_H */
kernel
cobalt
arch
sh
include
asm
xenomai
syscall.h
Generated by
1.8.9.1