base/include/rtai_spl.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
#ifndef _RTAI_SPL_H
00020
#define _RTAI_SPL_H
00021
00022
#include <rtai_sem.h>
00023
00024
struct rtai_spl;
00025
00026
#ifdef __KERNEL__
00027
00028
#ifndef __cplusplus
00029
00030
typedef struct rtai_spl {
00031
void *owndby;
00032
int count;
00033
unsigned long flags;
00034 }
SPL;
00035
00036
#else
00037
extern "C" {
00038
#endif
00039
00040
int rt_spl_init(
struct rtai_spl *spl);
00041
00042
int rt_spl_delete(
struct rtai_spl *spl);
00043
00044
int rt_spl_lock(
struct rtai_spl *spl);
00045
00046
int rt_spl_lock_if(
struct rtai_spl *spl);
00047
00048
int rt_spl_lock_timed(
struct rtai_spl *spl,
00049
unsigned long ns);
00050
00051
int rt_spl_unlock(
struct rtai_spl *spl);
00052
00053
#ifdef __cplusplus
00054
}
00055
#endif
00056
00057
#else
00058
00059
#ifdef __cplusplus
00060
extern "C" {
00061
#endif
00062
00063 RTAI_PROTO(
struct rtai_spl *, rt_spl_init,(
unsigned long name))
00064 {
00065
struct {
unsigned long name; } arg = { name };
00066
return (
struct rtai_spl *)
rtai_lxrt(
BIDX,
SIZARG,
LXRT_SPL_INIT, &arg).
v[
LOW];
00067 }
00068
00069 RTAI_PROTO(
int, rt_spl_delete,(
struct rtai_spl *spl))
00070 {
00071
struct {
struct rtai_spl *spl; } arg = { spl };
00072
return rtai_lxrt(
BIDX,
SIZARG,
LXRT_SPL_DELETE, &arg).
i[
LOW];
00073 }
00074
00075 RTAI_PROTO(
struct rtai_spl *, rt_named_spl_init,(
const char *name))
00076 {
00077
struct {
const char *name; } arg = { name };
00078
return (
struct rtai_spl *)
rtai_lxrt(
BIDX,
SIZARG,
NAMED_SPL_INIT, &arg).
v[
LOW];
00079 }
00080
00081 RTAI_PROTO(
int, rt_named_spl_delete,(
struct rtai_spl *spl))
00082 {
00083
struct {
struct rtai_spl *spl; } arg = { spl };
00084
return rtai_lxrt(
BIDX,
SIZARG,
NAMED_SPL_DELETE, &arg).
i[
LOW];
00085 }
00086
00087 RTAI_PROTO(
int, rt_spl_lock,(
struct rtai_spl *spl))
00088 {
00089
struct {
struct rtai_spl *spl; } arg = { spl };
00090
return rtai_lxrt(
BIDX,
SIZARG,
SPL_LOCK, &arg).
i[
LOW];
00091 }
00092
00093 RTAI_PROTO(
int, rt_spl_lock_if,(
struct rtai_spl *spl))
00094 {
00095
struct {
struct rtai_spl *spl; } arg = { spl };
00096
return rtai_lxrt(
BIDX,
SIZARG,
SPL_LOCK_IF, &arg).
i[
LOW];
00097 }
00098
00099 RTAI_PROTO(
int, rt_spl_lock_timed,(
struct rtai_spl *spl,
RTIME delay))
00100 {
00101
struct {
struct rtai_spl *spl;
RTIME delay; } arg = { spl, delay };
00102
return rtai_lxrt(
BIDX,
SIZARG,
SPL_LOCK_TIMED, &arg).
i[
LOW];
00103 }
00104
00105 RTAI_PROTO(
int, rt_spl_unlock,(
struct rtai_spl *spl))
00106 {
00107
struct {
struct rtai_spl *spl; } arg = { spl };
00108
return rtai_lxrt(
BIDX,
SIZARG,
SPL_UNLOCK, &arg).
i[
LOW];
00109 }
00110
00111
#ifdef __cplusplus
00112
}
00113
#endif
00114
00115
#endif
00116
00117
#if !defined(__KERNEL__) || defined(__cplusplus)
00118
00119 typedef struct rtai_spl {
00120 int opaque;
00121 }
SPL;
00122
00123
#endif
00124
00125
#endif
Generated on Thu Nov 20 11:49:50 2008 for RTAI API by
1.3.8