17 #ifndef __LIBPOK_SYSCALL_H__
18 #define __LIBPOK_SYSCALL_H__
25 POK_SYSCALL_CONSWRITE = 10,
26 POK_SYSCALL_GETTICK = 20,
27 POK_SYSCALL_INT_NUMBER = 42,
28 POK_SYSCALL_THREAD_CREATE = 50,
29 POK_SYSCALL_THREAD_SLEEP_UNTIL = 51,
30 POK_SYSCALL_THREAD_SLEEP = 52,
31 POK_SYSCALL_THREAD_SUSPEND = 53,
32 POK_SYSCALL_THREAD_RESTART = 54,
33 POK_SYSCALL_THREAD_STOP = 55,
34 POK_SYSCALL_THREAD_PERIOD = 56,
35 POK_SYSCALL_THREAD_STOPSELF = 57,
36 POK_SYSCALL_THREAD_ID = 58,
37 POK_SYSCALL_THREAD_STATUS = 59,
38 POK_SYSCALL_THREAD_DEADLINE = 60,
39 POK_SYSCALL_THREAD_STATE = 61,
41 #ifdef POK_NEEDS_PORTS_SAMPLING
42 POK_SYSCALL_MIDDLEWARE_SAMPLING_ID = 101,
43 POK_SYSCALL_MIDDLEWARE_SAMPLING_READ = 102,
44 POK_SYSCALL_MIDDLEWARE_SAMPLING_STATUS = 103,
45 POK_SYSCALL_MIDDLEWARE_SAMPLING_WRITE = 104,
46 POK_SYSCALL_MIDDLEWARE_SAMPLING_CREATE = 105,
48 #ifdef POK_NEEDS_PORTS_QUEUEING
49 POK_SYSCALL_MIDDLEWARE_QUEUEING_CREATE = 110,
50 POK_SYSCALL_MIDDLEWARE_QUEUEING_SEND = 111,
51 POK_SYSCALL_MIDDLEWARE_QUEUEING_RECEIVE = 112,
52 POK_SYSCALL_MIDDLEWARE_QUEUEING_ID = 113,
53 POK_SYSCALL_MIDDLEWARE_QUEUEING_STATUS = 114,
55 #ifdef POK_NEEDS_PORTS_VIRTUAL
56 POK_SYSCALL_MIDDLEWARE_VIRTUAL_CREATE = 150,
57 POK_SYSCALL_MIDDLEWARE_VIRTUAL_NB_DESTINATIONS = 151,
58 POK_SYSCALL_MIDDLEWARE_VIRTUAL_DESTINATION = 152,
59 POK_SYSCALL_MIDDLEWARE_VIRTUAL_GET_GLOBAL = 153,
61 #if defined (POK_NEEDS_LOCKOBJECTS) || defined (POK_NEEDS_MUTEXES) || defined (POK_NEEDS_SEMAPHORES) || defined (POK_NEEDS_EVENTS) || defined (POK_NEEDS_BUFFERS) || defined (POK_NEEDS_BLACKBOARDS)
62 POK_SYSCALL_LOCKOBJ_CREATE = 201,
63 POK_SYSCALL_LOCKOBJ_OPERATION = 202,
65 #ifdef POK_NEEDS_ERROR_HANDLING
66 POK_SYSCALL_ERROR_HANDLER_CREATE = 301,
67 POK_SYSCALL_ERROR_HANDLER_SET_READY = 302,
68 POK_SYSCALL_ERROR_RAISE_APPLICATION_ERROR = 303,
69 POK_SYSCALL_ERROR_GET = 304,
71 #ifdef POK_NEEDS_PARTITIONS
72 POK_SYSCALL_PARTITION_SET_MODE = 404,
73 POK_SYSCALL_PARTITION_GET_ID = 405,
74 POK_SYSCALL_PARTITION_GET_PERIOD = 406,
75 POK_SYSCALL_PARTITION_GET_DURATION = 407,
76 POK_SYSCALL_PARTITION_GET_LOCK_LEVEL = 408,
77 POK_SYSCALL_PARTITION_GET_OPERATING_MODE = 409,
78 POK_SYSCALL_PARTITION_GET_START_CONDITION = 410,
81 POK_SYSCALL_INB = 501,
82 POK_SYSCALL_OUTB = 502,
85 POK_SYSCALL_PCI_REGISTER = 601,
108 #define pok_syscall1(sid,arg1) \
109 pok_do_syscall(sid,&((pok_syscall_args_t){2,arg1,0,0,0,0}))
111 #define pok_syscall2(sid,arg1,arg2) \
112 pok_do_syscall(sid,&((pok_syscall_args_t){2,arg1,arg2,0,0,0}))
114 #define pok_syscall3(sid,arg1,arg2,arg3) \
115 pok_do_syscall(sid,&((pok_syscall_args_t){2,arg1,arg2,arg3,0,0}))
117 #define pok_syscall4(sid,arg1,arg2,arg3,arg4) \
118 pok_do_syscall(sid,&((pok_syscall_args_t){2,arg1,arg2,arg3,arg4,0}))
120 #define pok_syscall5(sid,arg1,arg2,arg3,arg4,arg5) \
121 pok_do_syscall(sid,&((pok_syscall_args_t){2,arg1,arg2,arg3,arg4,arg5}))
124 pok_ret_t pok_syscall1 (pok_syscall_id_t syscall_id,
127 pok_ret_t pok_syscall2 (pok_syscall_id_t syscall_id,
131 pok_ret_t pok_syscall3 (pok_syscall_id_t syscall_id,
136 pok_ret_t pok_syscall4 (pok_syscall_id_t syscall_id,
142 pok_ret_t pok_syscall5 (pok_syscall_id_t syscall_id,