46 #if defined (POK_NEEDS_CONSOLE) || defined (POK_NEEDS_DEBUG)
60 #ifdef POK_NEEDS_PORTS_VIRTUAL
61 case POK_SYSCALL_MIDDLEWARE_VIRTUAL_CREATE:
67 case POK_SYSCALL_MIDDLEWARE_VIRTUAL_NB_DESTINATIONS:
72 case POK_SYSCALL_MIDDLEWARE_VIRTUAL_DESTINATION:
77 case POK_SYSCALL_MIDDLEWARE_VIRTUAL_GET_GLOBAL:
84 #if defined POK_NEEDS_GETTICK
97 #ifdef POK_NEEDS_THREAD_SLEEP
99 return pok_thread_sleep (args->
arg1);
103 #ifdef POK_NEEDS_THREAD_SLEEP_UNTIL
105 return pok_thread_sleep_until (args->
arg1);
110 return pok_sched_end_period ();
113 #if defined (POK_NEEDS_THREAD_SUSPEND) || defined (POK_NEEDS_ERROR_HANDLING)
115 return pok_thread_suspend ();
119 #ifdef POK_NEEDS_THREAD_ID
125 return pok_thread_get_status (args->
arg1, (pok_thread_attr_t*) (args->
arg2 + infos->
base_addr));
128 #ifdef POK_NEEDS_ERROR_HANDLING
135 return pok_partition_restart_thread (args->
arg1);
139 return pok_partition_stop_thread (args->
arg1);
146 pok_sched_stop_self ();
152 #ifdef POK_NEEDS_PARTITIONS
153 case POK_SYSCALL_PARTITION_SET_MODE:
154 return pok_partition_set_mode_current ((pok_partition_mode_t)args->
arg1);
156 case POK_SYSCALL_PARTITION_GET_ID:
159 case POK_SYSCALL_PARTITION_GET_PERIOD:
162 case POK_SYSCALL_PARTITION_GET_DURATION:
165 case POK_SYSCALL_PARTITION_GET_LOCK_LEVEL:
168 case POK_SYSCALL_PARTITION_GET_OPERATING_MODE:
169 return pok_current_partition_get_operating_mode ((pok_partition_mode_t*)(args->
arg1 + infos->
base_addr));
171 case POK_SYSCALL_PARTITION_GET_START_CONDITION:
172 return pok_current_partition_get_start_condition ((pok_start_condition_t*)(args->
arg1 + infos->
base_addr));
176 #ifdef POK_NEEDS_ERROR_HANDLING
177 case POK_SYSCALL_ERROR_HANDLER_CREATE:
178 return pok_error_thread_create (args->
arg1 , (
void*) (args->
arg2));
181 case POK_SYSCALL_ERROR_RAISE_APPLICATION_ERROR:
183 pok_error_raise_application_error ((
char*) (args->
arg1 + infos->
base_addr), args->
arg2);
187 case POK_SYSCALL_ERROR_GET:
188 return pok_error_get ((pok_error_status_t*) (args->
arg1 + infos->
base_addr));
193 #ifdef POK_NEEDS_PORTS_SAMPLING
194 case POK_SYSCALL_MIDDLEWARE_SAMPLING_CREATE:
197 return pok_port_sampling_create ((
char*)(args->
arg1 + infos->
base_addr),
204 case POK_SYSCALL_MIDDLEWARE_SAMPLING_WRITE:
212 case POK_SYSCALL_MIDDLEWARE_SAMPLING_READ:
221 case POK_SYSCALL_MIDDLEWARE_SAMPLING_ID:
224 return pok_port_sampling_id ((
char*)(args->
arg1 + infos->
base_addr),
228 #ifndef POK_GENERATED_CODE
229 case POK_SYSCALL_MIDDLEWARE_SAMPLING_STATUS:
232 (pok_port_sampling_status_t*) (args->
arg2 + infos->
base_addr));
238 #ifdef POK_NEEDS_PORTS_QUEUEING
239 case POK_SYSCALL_MIDDLEWARE_QUEUEING_CREATE:
242 return pok_port_queueing_create ((
char*) (args->
arg1 + infos->
base_addr),
249 case POK_SYSCALL_MIDDLEWARE_QUEUEING_SEND:
257 case POK_SYSCALL_MIDDLEWARE_QUEUEING_RECEIVE:
267 case POK_SYSCALL_MIDDLEWARE_QUEUEING_ID:
270 return pok_port_queueing_id ((
char*) (args->
arg1 + infos->
base_addr),
274 #ifndef POK_GENERATED_CODE
275 case POK_SYSCALL_MIDDLEWARE_QUEUEING_STATUS:
278 (pok_port_queueing_status_t*) (args->
arg2 + infos->
base_addr));
283 #ifdef POK_NEEDS_LOCKOBJECTS
284 case POK_SYSCALL_LOCKOBJ_CREATE:
291 case POK_SYSCALL_LOCKOBJ_OPERATION:
306 case POK_SYSCALL_INB:
307 if ((args->
arg1 < pok_partitions[infos->
partition].io_min) ||
314 return inb((
unsigned short) args->
arg1);
318 case POK_SYSCALL_OUTB:
319 if ((args->
arg1 < pok_partitions[infos->
partition].io_min) ||
326 outb((
unsigned short) args->
arg1, (
unsigned char) args->
arg2);
333 case POK_SYSCALL_PCI_REGISTER:
347 #ifdef POK_NEEDS_ERROR_HANDLING
348 pok_error_declare (POK_ERROR_KIND_ILLEGAL_REQUEST);
349 pok_sched_activate_error_thread ();
351 #ifdef POK_NEEDS_DEBUG
352 printf (
"Tried to use syscall %d\n", syscall_id);