24 #ifndef _XENOMAI_PSOS_PSOS_H
25 #define _XENOMAI_PSOS_PSOS_H
27 #include <sys/types.h>
28 #include <boilerplate/tunables.h>
34 #define T_NOPREEMPT 0x0001
35 #define T_PREEMPT 0x0000
36 #define T_TSLICE 0x0002
37 #define T_NOTSLICE 0x0000
38 #define T_NOASR 0x0004
42 #define T_LEVELMASK0 0x0000
43 #define T_LEVELMASK1 0x0100
44 #define T_LEVELMASK2 0x0200
45 #define T_LEVELMASK3 0x0300
46 #define T_LEVELMASK4 0x0400
47 #define T_LEVELMASK5 0x0500
48 #define T_LEVELMASK6 0x0600
49 #define T_LEVELMASK7 0x0700
50 #define T_NOISR 0x0700
52 #define T_GLOBAL 0x0001
53 #define T_LOCAL 0x0000
54 #define T_NOFPU 0x0000
57 #define RN_PRIOR 0x0002
58 #define RN_FIFO 0x0000
60 #define RN_NODEL 0x0000
61 #define RN_NOWAIT 0x0001
62 #define RN_WAIT 0x0000
64 #define SM_GLOBAL 0x0001
65 #define SM_LOCAL 0x0000
66 #define SM_PRIOR 0x0002
67 #define SM_FIFO 0x0000
68 #define SM_NOWAIT 0x0001
69 #define SM_WAIT 0x0000
71 #define EV_NOWAIT 0x0001
72 #define EV_WAIT 0x0000
76 #define K_GLOBAL 0x0001
77 #define K_LOCAL 0x0000
79 #define PT_GLOBAL 0x0001
80 #define PT_LOCAL 0x0000
82 #define PT_NODEL 0x0000
84 #define Q_GLOBAL 0x0001
85 #define Q_LOCAL 0x0000
86 #define Q_PRIOR 0x0002
88 #define Q_LIMIT 0x0004
89 #define Q_NOLIMIT 0x0000
90 #define Q_PRIBUF 0x0008
91 #define Q_SYSBUF 0x0000
92 #define Q_NOWAIT 0x0001
95 #define ERR_TIMEOUT 0x01
97 #define ERR_NODENO 0x04
98 #define ERR_OBJDEL 0x05
99 #define ERR_OBJID 0x06
100 #define ERR_OBJTYPE 0x07
101 #define ERR_OBJTFULL 0x08
102 #define ERR_OBJNF 0x09
104 #define ERR_NOTCB 0x0E
105 #define ERR_NOSTK 0x0F
106 #define ERR_TINYSTK 0x10
107 #define ERR_PRIOR 0x11
108 #define ERR_ACTIVE 0x12
109 #define ERR_NACTIVE 0x13
110 #define ERR_SUSP 0x14
111 #define ERR_NOTSUSP 0x15
112 #define ERR_SETPRI 0x16
113 #define ERR_REGNUM 0x17
115 #define ERR_RNADDR 0x1B
116 #define ERR_UNITSIZE 0x1C
117 #define ERR_TINYUNIT 0x1D
118 #define ERR_TINYRN 0x1E
119 #define ERR_SEGINUSE 0x1F
120 #define ERR_TOOBIG 0x21
121 #define ERR_NOSEG 0x22
122 #define ERR_NOTINRN 0x23
123 #define ERR_SEGADDR 0x24
124 #define ERR_SEGFREE 0x25
125 #define ERR_RNKILLD 0x26
126 #define ERR_TATRNDEL 0x27
128 #define ERR_PTADDR 0x28
129 #define ERR_BUFSIZE 0x29
130 #define ERR_TINYPT 0x2A
131 #define ERR_BUFINUSE 0x2B
132 #define ERR_NOBUF 0x2C
133 #define ERR_BUFADDR 0x2D
134 #define ERR_BUFFREE 0x2F
136 #define ERR_MSGSIZ 0x31
137 #define ERR_BUFSIZ 0x32
138 #define ERR_NOQCB 0x33
139 #define ERR_NOMGB 0x34
140 #define ERR_QFULL 0x35
141 #define ERR_QKILLD 0x36
142 #define ERR_NOMSG 0x37
143 #define ERR_TATQDEL 0x38
144 #define ERR_MATQDEL 0x39
145 #define ERR_VARQ 0x3A
146 #define ERR_NOTVARQ 0x3B
148 #define ERR_NOEVS 0x3C
149 #define ERR_NOTINASR 0x3E
150 #define ERR_NOASR 0x3F
152 #define ERR_NOSCB 0x41
153 #define ERR_NOSEM 0x42
154 #define ERR_SKILLD 0x43
155 #define ERR_TATSDEL 0x44
157 #define ERR_NOTIME 0x47
158 #define ERR_ILLDATE 0x48
159 #define ERR_ILLTIME 0x49
160 #define ERR_ILLTICKS 0x4A
161 #define ERR_NOTIMERS 0x4B
162 #define ERR_BADTMID 0x4C
163 #define ERR_TMNOTSET 0x4D
164 #define ERR_TOOLATE 0x4E
170 u_long ev_receive(u_long events,
175 u_long ev_send(u_long tid,
178 u_long pt_create(
const char *name,
187 u_long pt_delete(u_long tid);
189 u_long pt_getbuf(u_long tid,
192 u_long pt_ident(
const char *name,
196 u_long pt_retbuf(u_long tid,
199 u_long q_broadcast(u_long qid,
203 u_long q_create(
const char *name,
208 u_long q_delete(u_long qid);
210 u_long q_ident(
const char *name,
214 u_long q_receive(u_long qid,
219 u_long q_send(u_long qid,
222 u_long q_urgent(u_long qid,
225 u_long q_vcreate(
const char *name,
231 u_long q_vdelete(u_long qid);
233 u_long q_vident(
const char *name,
237 u_long q_vreceive(u_long qid,
244 u_long q_vsend(u_long qid,
248 u_long q_vurgent(u_long qid,
252 u_long q_vbroadcast(u_long qid,
257 u_long rn_create(
const char *name,
265 u_long rn_delete(u_long rnid);
267 u_long rn_getseg(u_long rnid,
273 u_long rn_ident(
const char *name,
276 u_long rn_retseg(u_long rnid,
279 u_long sm_create(
const char *name,
284 u_long sm_delete(u_long smid);
286 u_long sm_ident(
const char *name,
290 u_long sm_p(u_long smid,
294 u_long sm_v(u_long smid);
296 u_long t_create(
const char *name,
303 u_long t_delete(u_long tid);
305 u_long t_getreg(u_long tid,
309 u_long t_ident(
const char *name,
313 u_long t_mode(u_long mask,
317 u_long t_resume(u_long tid);
319 u_long t_setpri(u_long tid,
323 u_long t_setreg(u_long tid,
327 u_long t_start(u_long tid,
329 void (*entry)(u_long a0,
335 u_long t_suspend(u_long tid);
337 u_long tm_cancel(u_long tmid);
339 u_long tm_evafter(u_long ticks,
343 u_long tm_evevery(u_long ticks,
347 u_long tm_evwhen(u_long date,
353 u_long tm_get(u_long *date_r,
357 u_long tm_set(u_long date,
361 u_long tm_getm(
unsigned long long *ns);
363 u_long tm_wkafter(u_long ticks);
365 u_long tm_wkwhen(u_long date,
369 int psos_task_normalize_priority(u_long psos_prio);
371 u_long psos_task_denormalize_priority(
int core_prio);
373 extern int psos_long_names;
375 static inline define_config_tunable(long_names,
int, on)
377 psos_long_names = on;
380 static inline read_config_tunable(long_names,
int)
382 return psos_long_names;