24#ifndef _XENOMAI_PSOS_PSOS_H
25#define _XENOMAI_PSOS_PSOS_H
33#define T_NOPREEMPT 0x0001
34#define T_PREEMPT 0x0000
35#define T_TSLICE 0x0002
36#define T_NOTSLICE 0x0000
41#define T_LEVELMASK0 0x0000
42#define T_LEVELMASK1 0x0100
43#define T_LEVELMASK2 0x0200
44#define T_LEVELMASK3 0x0300
45#define T_LEVELMASK4 0x0400
46#define T_LEVELMASK5 0x0500
47#define T_LEVELMASK6 0x0600
48#define T_LEVELMASK7 0x0700
51#define T_GLOBAL 0x0001
56#define RN_PRIOR 0x0002
59#define RN_NODEL 0x0000
60#define RN_NOWAIT 0x0001
63#define SM_GLOBAL 0x0001
64#define SM_LOCAL 0x0000
65#define SM_PRIOR 0x0002
67#define SM_NOWAIT 0x0001
70#define EV_NOWAIT 0x0001
75#define K_GLOBAL 0x0001
78#define PT_GLOBAL 0x0001
79#define PT_LOCAL 0x0000
81#define PT_NODEL 0x0000
83#define Q_GLOBAL 0x0001
88#define Q_NOLIMIT 0x0000
89#define Q_PRIBUF 0x0008
90#define Q_SYSBUF 0x0000
91#define Q_NOWAIT 0x0001
94#define ERR_TIMEOUT 0x01
96#define ERR_NODENO 0x04
97#define ERR_OBJDEL 0x05
99#define ERR_OBJTYPE 0x07
100#define ERR_OBJTFULL 0x08
101#define ERR_OBJNF 0x09
103#define ERR_NOTCB 0x0E
104#define ERR_NOSTK 0x0F
105#define ERR_TINYSTK 0x10
106#define ERR_PRIOR 0x11
107#define ERR_ACTIVE 0x12
108#define ERR_NACTIVE 0x13
110#define ERR_NOTSUSP 0x15
111#define ERR_SETPRI 0x16
112#define ERR_REGNUM 0x17
114#define ERR_RNADDR 0x1B
115#define ERR_UNITSIZE 0x1C
116#define ERR_TINYUNIT 0x1D
117#define ERR_TINYRN 0x1E
118#define ERR_SEGINUSE 0x1F
119#define ERR_TOOBIG 0x21
120#define ERR_NOSEG 0x22
121#define ERR_NOTINRN 0x23
122#define ERR_SEGADDR 0x24
123#define ERR_SEGFREE 0x25
124#define ERR_RNKILLD 0x26
125#define ERR_TATRNDEL 0x27
127#define ERR_PTADDR 0x28
128#define ERR_BUFSIZE 0x29
129#define ERR_TINYPT 0x2A
130#define ERR_BUFINUSE 0x2B
131#define ERR_NOBUF 0x2C
132#define ERR_BUFADDR 0x2D
133#define ERR_BUFFREE 0x2F
135#define ERR_MSGSIZ 0x31
136#define ERR_BUFSIZ 0x32
137#define ERR_NOQCB 0x33
138#define ERR_NOMGB 0x34
139#define ERR_QFULL 0x35
140#define ERR_QKILLD 0x36
141#define ERR_NOMSG 0x37
142#define ERR_TATQDEL 0x38
143#define ERR_MATQDEL 0x39
145#define ERR_NOTVARQ 0x3B
147#define ERR_NOEVS 0x3C
148#define ERR_NOTINASR 0x3E
149#define ERR_NOASR 0x3F
151#define ERR_NOSCB 0x41
152#define ERR_NOSEM 0x42
153#define ERR_SKILLD 0x43
154#define ERR_TATSDEL 0x44
156#define ERR_NOTIME 0x47
157#define ERR_ILLDATE 0x48
158#define ERR_ILLTIME 0x49
159#define ERR_ILLTICKS 0x4A
160#define ERR_NOTIMERS 0x4B
161#define ERR_BADTMID 0x4C
162#define ERR_TMNOTSET 0x4D
163#define ERR_TOOLATE 0x4E
169u_long ev_receive(u_long events,
174u_long ev_send(u_long tid,
177u_long pt_create(
const char *name,
186u_long pt_delete(u_long tid);
188u_long pt_getbuf(u_long tid,
191u_long pt_ident(
const char *name,
195u_long pt_retbuf(u_long tid,
198u_long q_broadcast(u_long qid,
202u_long q_create(
const char *name,
207u_long q_delete(u_long qid);
209u_long q_ident(
const char *name,
213u_long q_receive(u_long qid,
218u_long q_send(u_long qid,
221u_long q_urgent(u_long qid,
224u_long q_vcreate(
const char *name,
230u_long q_vdelete(u_long qid);
232u_long q_vident(
const char *name,
236u_long q_vreceive(u_long qid,
243u_long q_vsend(u_long qid,
247u_long q_vurgent(u_long qid,
251u_long q_vbroadcast(u_long qid,
256u_long rn_create(
const char *name,
264u_long rn_delete(u_long rnid);
266u_long rn_getseg(u_long rnid,
272u_long rn_ident(
const char *name,
275u_long rn_retseg(u_long rnid,
278u_long sm_create(
const char *name,
283u_long sm_delete(u_long smid);
285u_long sm_ident(
const char *name,
289u_long sm_p(u_long smid,
293u_long sm_v(u_long smid);
295u_long t_create(
const char *name,
302u_long t_delete(u_long tid);
304u_long t_getreg(u_long tid,
308u_long t_ident(
const char *name,
312u_long t_mode(u_long mask,
316u_long t_resume(u_long tid);
318u_long t_setpri(u_long tid,
322u_long t_setreg(u_long tid,
326u_long t_start(u_long tid,
328 void (*entry)(u_long a0,
334u_long t_suspend(u_long tid);
336u_long tm_cancel(u_long tmid);
338u_long tm_evafter(u_long ticks,
342u_long tm_evevery(u_long ticks,
346u_long tm_evwhen(u_long date,
352u_long tm_get(u_long *date_r,
356u_long tm_set(u_long date,
360u_long tm_getm(
unsigned long long *ns);
362u_long tm_wkafter(u_long ticks);
364u_long tm_wkwhen(u_long date,
368int psos_task_normalize_priority(u_long psos_prio);
370u_long psos_task_denormalize_priority(
int core_prio);