Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't destroy synchro in a simcall, this drives the JVM nuts
[simgrid.git] / src / simix / popping_generated.cpp
1 /**********************************************************************/
2 /* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
3 /*                                                                    */
4 /*                    DO NOT EVER CHANGE THIS FILE                    */
5 /*                                                                    */
6 /* change simcalls specification in src/simix/simcalls.in             */
7 /**********************************************************************/
8
9 /*
10  * Note that the name comes from http://en.wikipedia.org/wiki/Popping
11  * Indeed, the control flow is doing a strange dance in there.
12  *
13  * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
14  */
15
16 #include <xbt/base.h>
17 #include "smx_private.h"
18 #ifdef HAVE_MC
19 #include "src/mc/mc_forward.h"
20 #endif
21
22 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
23
24 /** @brief Simcalls' names (generated from src/simix/simcalls.in) */
25 const char* simcall_names[] = {
26    "SIMCALL_NONE",  "SIMCALL_VM_SUSPEND",
27   "SIMCALL_VM_RESUME",
28   "SIMCALL_VM_SHUTDOWN",
29   "SIMCALL_VM_SAVE",
30   "SIMCALL_VM_RESTORE",
31   "SIMCALL_PROCESS_CREATE",
32   "SIMCALL_PROCESS_KILL",
33   "SIMCALL_PROCESS_KILLALL",
34   "SIMCALL_PROCESS_CLEANUP",
35   "SIMCALL_PROCESS_SUSPEND",
36   "SIMCALL_PROCESS_RESUME",
37   "SIMCALL_PROCESS_SET_HOST",
38   "SIMCALL_PROCESS_IS_SUSPENDED",
39   "SIMCALL_PROCESS_JOIN",
40   "SIMCALL_PROCESS_SLEEP",
41   "SIMCALL_EXECUTION_START",
42   "SIMCALL_EXECUTION_PARALLEL_START",
43   "SIMCALL_EXECUTION_DESTROY",
44   "SIMCALL_EXECUTION_CANCEL",
45   "SIMCALL_EXECUTION_GET_REMAINS",
46   "SIMCALL_EXECUTION_GET_STATE",
47   "SIMCALL_EXECUTION_SET_PRIORITY",
48   "SIMCALL_EXECUTION_SET_BOUND",
49   "SIMCALL_EXECUTION_SET_AFFINITY",
50   "SIMCALL_EXECUTION_WAIT",
51   "SIMCALL_PROCESS_ON_EXIT",
52   "SIMCALL_PROCESS_AUTO_RESTART_SET",
53   "SIMCALL_PROCESS_RESTART",
54   "SIMCALL_RDV_CREATE",
55   "SIMCALL_RDV_DESTROY",
56   "SIMCALL_RDV_COMM_COUNT_BY_HOST",
57   "SIMCALL_RDV_GET_HEAD",
58   "SIMCALL_RDV_SET_RECEIVER",
59   "SIMCALL_RDV_GET_RECEIVER",
60   "SIMCALL_COMM_IPROBE",
61   "SIMCALL_COMM_SEND",
62   "SIMCALL_COMM_ISEND",
63   "SIMCALL_COMM_RECV",
64   "SIMCALL_COMM_IRECV",
65   "SIMCALL_COMM_CANCEL",
66   "SIMCALL_COMM_WAITANY",
67   "SIMCALL_COMM_WAIT",
68   "SIMCALL_COMM_TEST",
69   "SIMCALL_COMM_TESTANY",
70   "SIMCALL_COMM_GET_REMAINS",
71   "SIMCALL_COMM_GET_STATE",
72   "SIMCALL_COMM_GET_SRC_DATA",
73   "SIMCALL_COMM_GET_DST_DATA",
74   "SIMCALL_COMM_GET_SRC_PROC",
75   "SIMCALL_COMM_GET_DST_PROC",
76   "SIMCALL_MUTEX_INIT",
77   "SIMCALL_MUTEX_LOCK",
78   "SIMCALL_MUTEX_TRYLOCK",
79   "SIMCALL_MUTEX_UNLOCK",
80   "SIMCALL_COND_INIT",
81   "SIMCALL_COND_SIGNAL",
82   "SIMCALL_COND_WAIT",
83   "SIMCALL_COND_WAIT_TIMEOUT",
84   "SIMCALL_COND_BROADCAST",
85   "SIMCALL_SEM_INIT",
86   "SIMCALL_SEM_RELEASE",
87   "SIMCALL_SEM_WOULD_BLOCK",
88   "SIMCALL_SEM_ACQUIRE",
89   "SIMCALL_SEM_ACQUIRE_TIMEOUT",
90   "SIMCALL_SEM_GET_CAPACITY",
91   "SIMCALL_FILE_READ",
92   "SIMCALL_FILE_WRITE",
93   "SIMCALL_FILE_OPEN",
94   "SIMCALL_FILE_CLOSE",
95   "SIMCALL_FILE_UNLINK",
96   "SIMCALL_FILE_GET_SIZE",
97   "SIMCALL_FILE_TELL",
98   "SIMCALL_FILE_SEEK",
99   "SIMCALL_FILE_GET_INFO",
100   "SIMCALL_FILE_MOVE",
101   "SIMCALL_STORAGE_GET_FREE_SIZE",
102   "SIMCALL_STORAGE_GET_USED_SIZE",
103   "SIMCALL_STORAGE_GET_PROPERTIES",
104   "SIMCALL_STORAGE_GET_CONTENT",
105   "SIMCALL_ASR_GET_PROPERTIES",
106   "SIMCALL_MC_RANDOM",
107   "SIMCALL_SET_CATEGORY",
108   "SIMCALL_RUN_KERNEL",
109 #ifdef HAVE_LATENCY_BOUND_TRACKING
110   "SIMCALL_COMM_IS_LATENCY_BOUNDED",
111 #endif
112
113 #ifdef HAVE_MC
114   "SIMCALL_MC_SNAPSHOT",
115   "SIMCALL_MC_COMPARE_SNAPSHOTS",
116 #endif
117 };
118
119 /**
120  * @brief (in kernel mode) unpack the simcall and activate the handler
121  * 
122  * This function is generated from src/simix/simcalls.in
123  */
124 void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {
125   XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
126   SIMCALL_SET_MC_VALUE(simcall, value);
127   if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
128     return;
129   switch (simcall->call) {
130 case SIMCALL_VM_SUSPEND:
131        simcall_HANDLER_vm_suspend(simcall , (sg_host_t) simcall->args[0].dp);
132       SIMIX_simcall_answer(simcall);
133       break;  
134
135 case SIMCALL_VM_RESUME:
136        simcall_HANDLER_vm_resume(simcall , (sg_host_t) simcall->args[0].dp);
137       SIMIX_simcall_answer(simcall);
138       break;  
139
140 case SIMCALL_VM_SHUTDOWN:
141        simcall_HANDLER_vm_shutdown(simcall , (sg_host_t) simcall->args[0].dp);
142       SIMIX_simcall_answer(simcall);
143       break;  
144
145 case SIMCALL_VM_SAVE:
146        simcall_HANDLER_vm_save(simcall , (sg_host_t) simcall->args[0].dp);
147       SIMIX_simcall_answer(simcall);
148       break;  
149
150 case SIMCALL_VM_RESTORE:
151        simcall_HANDLER_vm_restore(simcall , (sg_host_t) simcall->args[0].dp);
152       SIMIX_simcall_answer(simcall);
153       break;  
154
155 case SIMCALL_PROCESS_CREATE:
156       simcall->result.dp = simcall_HANDLER_process_create(simcall ,  simcall->args[0].cc, (xbt_main_func_t) simcall->args[1].fp,  simcall->args[2].dp,  simcall->args[3].cc,  simcall->args[4].d,  simcall->args[5].i, (char**) simcall->args[6].dp, (xbt_dict_t) simcall->args[7].dp,  simcall->args[8].i);
157       SIMIX_simcall_answer(simcall);
158       break;  
159
160 case SIMCALL_PROCESS_KILL:
161        simcall_HANDLER_process_kill(simcall , (smx_process_t) simcall->args[0].dp);
162       SIMIX_simcall_answer(simcall);
163       break;  
164
165 case SIMCALL_PROCESS_KILLALL:
166        simcall_HANDLER_process_killall(simcall ,  simcall->args[0].i);
167       SIMIX_simcall_answer(simcall);
168       break;  
169
170 case SIMCALL_PROCESS_CLEANUP:
171        SIMIX_process_cleanup((smx_process_t) simcall->args[0].dp);
172       SIMIX_simcall_answer(simcall);
173       break;  
174
175 case SIMCALL_PROCESS_SUSPEND:
176        simcall_HANDLER_process_suspend(simcall , (smx_process_t) simcall->args[0].dp);
177        break;  
178
179 case SIMCALL_PROCESS_RESUME:
180        simcall_HANDLER_process_resume(simcall , (smx_process_t) simcall->args[0].dp);
181       SIMIX_simcall_answer(simcall);
182       break;  
183
184 case SIMCALL_PROCESS_SET_HOST:
185        simcall_HANDLER_process_set_host(simcall , (smx_process_t) simcall->args[0].dp, (sg_host_t) simcall->args[1].dp);
186       SIMIX_simcall_answer(simcall);
187       break;  
188
189 case SIMCALL_PROCESS_IS_SUSPENDED:
190       simcall->result.i = SIMIX_process_is_suspended((smx_process_t) simcall->args[0].dp);
191       SIMIX_simcall_answer(simcall);
192       break;  
193
194 case SIMCALL_PROCESS_JOIN:
195        simcall_HANDLER_process_join(simcall , (smx_process_t) simcall->args[0].dp,  simcall->args[1].d);
196        break;  
197
198 case SIMCALL_PROCESS_SLEEP:
199        simcall_HANDLER_process_sleep(simcall ,  simcall->args[0].d);
200        break;  
201
202 case SIMCALL_EXECUTION_START:
203       simcall->result.dp = simcall_HANDLER_execution_start(simcall ,  simcall->args[0].cc,  simcall->args[1].d,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].ul);
204       SIMIX_simcall_answer(simcall);
205       break;  
206
207 case SIMCALL_EXECUTION_PARALLEL_START:
208       simcall->result.dp = SIMIX_execution_parallel_start( simcall->args[0].cc, simcall->args[1].i,(sg_host_t*) simcall->args[2].dp,(double*) simcall->args[3].dp,(double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d);
209       SIMIX_simcall_answer(simcall);
210       break;  
211
212 case SIMCALL_EXECUTION_DESTROY:
213        SIMIX_execution_destroy((smx_synchro_t) simcall->args[0].dp);
214       SIMIX_simcall_answer(simcall);
215       break;  
216
217 case SIMCALL_EXECUTION_CANCEL:
218        SIMIX_execution_cancel((smx_synchro_t) simcall->args[0].dp);
219       SIMIX_simcall_answer(simcall);
220       break;  
221
222 case SIMCALL_EXECUTION_GET_REMAINS:
223       simcall->result.d = SIMIX_execution_get_remains((smx_synchro_t) simcall->args[0].dp);
224       SIMIX_simcall_answer(simcall);
225       break;  
226
227 case SIMCALL_EXECUTION_GET_STATE:
228       simcall->result.i = SIMIX_execution_get_state((smx_synchro_t) simcall->args[0].dp);
229       SIMIX_simcall_answer(simcall);
230       break;  
231
232 case SIMCALL_EXECUTION_SET_PRIORITY:
233        SIMIX_execution_set_priority((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
234       SIMIX_simcall_answer(simcall);
235       break;  
236
237 case SIMCALL_EXECUTION_SET_BOUND:
238        SIMIX_execution_set_bound((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
239       SIMIX_simcall_answer(simcall);
240       break;  
241
242 case SIMCALL_EXECUTION_SET_AFFINITY:
243        SIMIX_execution_set_affinity((smx_synchro_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp, simcall->args[2].ul);
244       SIMIX_simcall_answer(simcall);
245       break;  
246
247 case SIMCALL_EXECUTION_WAIT:
248        simcall_HANDLER_execution_wait(simcall , (smx_synchro_t) simcall->args[0].dp);
249        break;  
250
251 case SIMCALL_PROCESS_ON_EXIT:
252        SIMIX_process_on_exit((smx_process_t) simcall->args[0].dp,(int_f_pvoid_pvoid_t) simcall->args[1].fp, simcall->args[2].dp);
253       SIMIX_simcall_answer(simcall);
254       break;  
255
256 case SIMCALL_PROCESS_AUTO_RESTART_SET:
257        SIMIX_process_auto_restart_set((smx_process_t) simcall->args[0].dp, simcall->args[1].i);
258       SIMIX_simcall_answer(simcall);
259       break;  
260
261 case SIMCALL_PROCESS_RESTART:
262       simcall->result.dp = simcall_HANDLER_process_restart(simcall , (smx_process_t) simcall->args[0].dp);
263       SIMIX_simcall_answer(simcall);
264       break;  
265
266 case SIMCALL_RDV_CREATE:
267       simcall->result.dp = SIMIX_rdv_create( simcall->args[0].cc);
268       SIMIX_simcall_answer(simcall);
269       break;  
270
271 case SIMCALL_RDV_DESTROY:
272        SIMIX_rdv_destroy((smx_rdv_t) simcall->args[0].dp);
273       SIMIX_simcall_answer(simcall);
274       break;  
275
276 case SIMCALL_RDV_COMM_COUNT_BY_HOST:
277       simcall->result.ui = SIMIX_rdv_comm_count_by_host((smx_rdv_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp);
278       SIMIX_simcall_answer(simcall);
279       break;  
280
281 case SIMCALL_RDV_GET_HEAD:
282       simcall->result.dp = SIMIX_rdv_get_head((smx_rdv_t) simcall->args[0].dp);
283       SIMIX_simcall_answer(simcall);
284       break;  
285
286 case SIMCALL_RDV_SET_RECEIVER:
287        SIMIX_rdv_set_receiver((smx_rdv_t) simcall->args[0].dp,(smx_process_t) simcall->args[1].dp);
288       SIMIX_simcall_answer(simcall);
289       break;  
290
291 case SIMCALL_RDV_GET_RECEIVER:
292       simcall->result.dp = SIMIX_rdv_get_receiver((smx_rdv_t) simcall->args[0].dp);
293       SIMIX_simcall_answer(simcall);
294       break;  
295
296 case SIMCALL_COMM_IPROBE:
297       simcall->result.dp = simcall_HANDLER_comm_iprobe(simcall , (smx_rdv_t) simcall->args[0].dp,  simcall->args[1].i,  simcall->args[2].i,  simcall->args[3].i, (simix_match_func_t) simcall->args[4].fp,  simcall->args[5].dp);
298       SIMIX_simcall_answer(simcall);
299       break;  
300
301 case SIMCALL_COMM_SEND:
302        simcall_HANDLER_comm_send(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].dp,  simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_copy_data_func_t) simcall->args[7].fp,  simcall->args[8].dp,  simcall->args[9].d);
303        break;  
304
305 case SIMCALL_COMM_ISEND:
306       simcall->result.dp = simcall_HANDLER_comm_isend(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].dp,  simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_clean_func_t) simcall->args[7].fp, (simix_copy_data_func_t) simcall->args[8].fp,  simcall->args[9].dp,  simcall->args[10].i);
307       SIMIX_simcall_answer(simcall);
308       break;  
309
310 case SIMCALL_COMM_RECV:
311        simcall_HANDLER_comm_recv(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].dp, (size_t*) simcall->args[3].dp, (simix_match_func_t) simcall->args[4].fp, (simix_copy_data_func_t) simcall->args[5].fp,  simcall->args[6].dp,  simcall->args[7].d,  simcall->args[8].d);
312        break;  
313
314 case SIMCALL_COMM_IRECV:
315       simcall->result.dp = simcall_HANDLER_comm_irecv(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].dp, (size_t*) simcall->args[3].dp, (simix_match_func_t) simcall->args[4].fp, (simix_copy_data_func_t) simcall->args[5].fp,  simcall->args[6].dp,  simcall->args[7].d);
316       SIMIX_simcall_answer(simcall);
317       break;  
318
319 case SIMCALL_COMM_CANCEL:
320        SIMIX_comm_cancel((smx_synchro_t) simcall->args[0].dp);
321       SIMIX_simcall_answer(simcall);
322       break;  
323
324 case SIMCALL_COMM_WAITANY:
325        simcall_HANDLER_comm_waitany(simcall , (xbt_dynar_t) simcall->args[0].dp);
326        break;  
327
328 case SIMCALL_COMM_WAIT:
329        simcall_HANDLER_comm_wait(simcall , (smx_synchro_t) simcall->args[0].dp,  simcall->args[1].d);
330        break;  
331
332 case SIMCALL_COMM_TEST:
333        simcall_HANDLER_comm_test(simcall , (smx_synchro_t) simcall->args[0].dp);
334        break;  
335
336 case SIMCALL_COMM_TESTANY:
337        simcall_HANDLER_comm_testany(simcall , (xbt_dynar_t) simcall->args[0].dp);
338        break;  
339
340 case SIMCALL_COMM_GET_REMAINS:
341       simcall->result.d = SIMIX_comm_get_remains((smx_synchro_t) simcall->args[0].dp);
342       SIMIX_simcall_answer(simcall);
343       break;  
344
345 case SIMCALL_COMM_GET_STATE:
346       simcall->result.i = SIMIX_comm_get_state((smx_synchro_t) simcall->args[0].dp);
347       SIMIX_simcall_answer(simcall);
348       break;  
349
350 case SIMCALL_COMM_GET_SRC_DATA:
351       simcall->result.dp = SIMIX_comm_get_src_data((smx_synchro_t) simcall->args[0].dp);
352       SIMIX_simcall_answer(simcall);
353       break;  
354
355 case SIMCALL_COMM_GET_DST_DATA:
356       simcall->result.dp = SIMIX_comm_get_dst_data((smx_synchro_t) simcall->args[0].dp);
357       SIMIX_simcall_answer(simcall);
358       break;  
359
360 case SIMCALL_COMM_GET_SRC_PROC:
361       simcall->result.dp = SIMIX_comm_get_src_proc((smx_synchro_t) simcall->args[0].dp);
362       SIMIX_simcall_answer(simcall);
363       break;  
364
365 case SIMCALL_COMM_GET_DST_PROC:
366       simcall->result.dp = SIMIX_comm_get_dst_proc((smx_synchro_t) simcall->args[0].dp);
367       SIMIX_simcall_answer(simcall);
368       break;  
369
370 case SIMCALL_MUTEX_INIT:
371       simcall->result.dp = simcall_HANDLER_mutex_init(simcall );
372       SIMIX_simcall_answer(simcall);
373       break;  
374
375 case SIMCALL_MUTEX_LOCK:
376        simcall_HANDLER_mutex_lock(simcall , (smx_mutex_t) simcall->args[0].dp);
377        break;  
378
379 case SIMCALL_MUTEX_TRYLOCK:
380       simcall->result.i = simcall_HANDLER_mutex_trylock(simcall , (smx_mutex_t) simcall->args[0].dp);
381       SIMIX_simcall_answer(simcall);
382       break;  
383
384 case SIMCALL_MUTEX_UNLOCK:
385        simcall_HANDLER_mutex_unlock(simcall , (smx_mutex_t) simcall->args[0].dp);
386       SIMIX_simcall_answer(simcall);
387       break;  
388
389 case SIMCALL_COND_INIT:
390       simcall->result.dp = SIMIX_cond_init();
391       SIMIX_simcall_answer(simcall);
392       break;  
393
394 case SIMCALL_COND_SIGNAL:
395        SIMIX_cond_signal((smx_cond_t) simcall->args[0].dp);
396       SIMIX_simcall_answer(simcall);
397       break;  
398
399 case SIMCALL_COND_WAIT:
400        simcall_HANDLER_cond_wait(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp);
401        break;  
402
403 case SIMCALL_COND_WAIT_TIMEOUT:
404        simcall_HANDLER_cond_wait_timeout(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp,  simcall->args[2].d);
405        break;  
406
407 case SIMCALL_COND_BROADCAST:
408        SIMIX_cond_broadcast((smx_cond_t) simcall->args[0].dp);
409       SIMIX_simcall_answer(simcall);
410       break;  
411
412 case SIMCALL_SEM_INIT:
413       simcall->result.dp = SIMIX_sem_init( simcall->args[0].ui);
414       SIMIX_simcall_answer(simcall);
415       break;  
416
417 case SIMCALL_SEM_RELEASE:
418        simcall_HANDLER_sem_release(simcall , (smx_sem_t) simcall->args[0].dp);
419       SIMIX_simcall_answer(simcall);
420       break;  
421
422 case SIMCALL_SEM_WOULD_BLOCK:
423       simcall->result.i = simcall_HANDLER_sem_would_block(simcall , (smx_sem_t) simcall->args[0].dp);
424       SIMIX_simcall_answer(simcall);
425       break;  
426
427 case SIMCALL_SEM_ACQUIRE:
428        simcall_HANDLER_sem_acquire(simcall , (smx_sem_t) simcall->args[0].dp);
429        break;  
430
431 case SIMCALL_SEM_ACQUIRE_TIMEOUT:
432        simcall_HANDLER_sem_acquire_timeout(simcall , (smx_sem_t) simcall->args[0].dp,  simcall->args[1].d);
433        break;  
434
435 case SIMCALL_SEM_GET_CAPACITY:
436       simcall->result.i = simcall_HANDLER_sem_get_capacity(simcall , (smx_sem_t) simcall->args[0].dp);
437       SIMIX_simcall_answer(simcall);
438       break;  
439
440 case SIMCALL_FILE_READ:
441        simcall_HANDLER_file_read(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz, (sg_host_t) simcall->args[2].dp);
442        break;  
443
444 case SIMCALL_FILE_WRITE:
445        simcall_HANDLER_file_write(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz, (sg_host_t) simcall->args[2].dp);
446        break;  
447
448 case SIMCALL_FILE_OPEN:
449        simcall_HANDLER_file_open(simcall ,  simcall->args[0].cc, (sg_host_t) simcall->args[1].dp);
450        break;  
451
452 case SIMCALL_FILE_CLOSE:
453        simcall_HANDLER_file_close(simcall , (smx_file_t) simcall->args[0].dp, (sg_host_t) simcall->args[1].dp);
454        break;  
455
456 case SIMCALL_FILE_UNLINK:
457       simcall->result.i = SIMIX_file_unlink((smx_file_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp);
458       SIMIX_simcall_answer(simcall);
459       break;  
460
461 case SIMCALL_FILE_GET_SIZE:
462       simcall->result.sgsz = simcall_HANDLER_file_get_size(simcall , (smx_file_t) simcall->args[0].dp);
463       SIMIX_simcall_answer(simcall);
464       break;  
465
466 case SIMCALL_FILE_TELL:
467       simcall->result.sgsz = simcall_HANDLER_file_tell(simcall , (smx_file_t) simcall->args[0].dp);
468       SIMIX_simcall_answer(simcall);
469       break;  
470
471 case SIMCALL_FILE_SEEK:
472       simcall->result.i = simcall_HANDLER_file_seek(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgoff,  simcall->args[2].i);
473       SIMIX_simcall_answer(simcall);
474       break;  
475
476 case SIMCALL_FILE_GET_INFO:
477       simcall->result.dp = simcall_HANDLER_file_get_info(simcall , (smx_file_t) simcall->args[0].dp);
478       SIMIX_simcall_answer(simcall);
479       break;  
480
481 case SIMCALL_FILE_MOVE:
482       simcall->result.i = simcall_HANDLER_file_move(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].cc);
483       SIMIX_simcall_answer(simcall);
484       break;  
485
486 case SIMCALL_STORAGE_GET_FREE_SIZE:
487       simcall->result.sgsz = simcall_HANDLER_storage_get_free_size(simcall , (smx_storage_t) simcall->args[0].dp);
488       SIMIX_simcall_answer(simcall);
489       break;  
490
491 case SIMCALL_STORAGE_GET_USED_SIZE:
492       simcall->result.sgsz = simcall_HANDLER_storage_get_used_size(simcall , (smx_storage_t) simcall->args[0].dp);
493       SIMIX_simcall_answer(simcall);
494       break;  
495
496 case SIMCALL_STORAGE_GET_PROPERTIES:
497       simcall->result.dp = SIMIX_storage_get_properties((smx_storage_t) simcall->args[0].dp);
498       SIMIX_simcall_answer(simcall);
499       break;  
500
501 case SIMCALL_STORAGE_GET_CONTENT:
502       simcall->result.dp = SIMIX_storage_get_content((smx_storage_t) simcall->args[0].dp);
503       SIMIX_simcall_answer(simcall);
504       break;  
505
506 case SIMCALL_ASR_GET_PROPERTIES:
507       simcall->result.dp = simcall_HANDLER_asr_get_properties(simcall ,  simcall->args[0].cc);
508       SIMIX_simcall_answer(simcall);
509       break;  
510
511 case SIMCALL_MC_RANDOM:
512       simcall->result.i = simcall_HANDLER_mc_random(simcall ,  simcall->args[0].i,  simcall->args[1].i);
513       SIMIX_simcall_answer(simcall);
514       break;  
515
516 case SIMCALL_SET_CATEGORY:
517        SIMIX_set_category((smx_synchro_t) simcall->args[0].dp, simcall->args[1].cc);
518       SIMIX_simcall_answer(simcall);
519       break;  
520
521 case SIMCALL_RUN_KERNEL:
522        SIMIX_run_kernel( simcall->args[0].dp);
523       SIMIX_simcall_answer(simcall);
524       break;  
525
526 #ifdef HAVE_LATENCY_BOUND_TRACKING
527 case SIMCALL_COMM_IS_LATENCY_BOUNDED:
528       simcall->result.i = SIMIX_comm_is_latency_bounded((smx_synchro_t) simcall->args[0].dp);
529       SIMIX_simcall_answer(simcall);
530       break;  
531
532 #endif
533
534 #ifdef HAVE_MC
535 case SIMCALL_MC_SNAPSHOT:
536       simcall->result.dp = simcall_HANDLER_mc_snapshot(simcall );
537       SIMIX_simcall_answer(simcall);
538       break;  
539
540 case SIMCALL_MC_COMPARE_SNAPSHOTS:
541       simcall->result.i = simcall_HANDLER_mc_compare_snapshots(simcall , (mc_snapshot_t) simcall->args[0].dp, (mc_snapshot_t) simcall->args[1].dp);
542       SIMIX_simcall_answer(simcall);
543       break;  
544
545 #endif
546     case NUM_SIMCALLS:
547       break;
548     case SIMCALL_NONE:
549       THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
550           SIMIX_process_get_name(simcall->issuer),
551           sg_host_get_name(SIMIX_process_get_host(simcall->issuer))
552           );
553       break;
554
555   }
556 }