Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
b6c206aa53de297c747462f94ecc81150c2c8b36
[simgrid.git] / src / simix / popping_bodies.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 "smx_private.h"
17 #include "src/mc/mc_forward.h"
18 #include "xbt/ex.h"
19 #include <simgrid/simix.hpp>
20   
21 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
22     smx_process_t self = SIMIX_process_self();
23
24     /* Go to that function to follow the code flow through the simcall barrier */
25     if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
26     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
27
28     self->simcall.call = SIMCALL_VM_SUSPEND;
29     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
30     memset(self->simcall.args, 0, sizeof(self->simcall.args));
31     self->simcall.args[0].dp = (void*) ind_vm;
32     if (self != simix_global->maestro_process) {
33       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
34                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
35       SIMIX_process_yield(self);
36     } else {
37       SIMIX_simcall_handle(&self->simcall, 0);
38     }    
39     
40   }
41   
42 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
43     smx_process_t self = SIMIX_process_self();
44
45     /* Go to that function to follow the code flow through the simcall barrier */
46     if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
47     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
48
49     self->simcall.call = SIMCALL_VM_RESUME;
50     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
51     memset(self->simcall.args, 0, sizeof(self->simcall.args));
52     self->simcall.args[0].dp = (void*) ind_vm;
53     if (self != simix_global->maestro_process) {
54       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
55                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
56       SIMIX_process_yield(self);
57     } else {
58       SIMIX_simcall_handle(&self->simcall, 0);
59     }    
60     
61   }
62   
63 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
64     smx_process_t self = SIMIX_process_self();
65
66     /* Go to that function to follow the code flow through the simcall barrier */
67     if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
68     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
69
70     self->simcall.call = SIMCALL_VM_SHUTDOWN;
71     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
72     memset(self->simcall.args, 0, sizeof(self->simcall.args));
73     self->simcall.args[0].dp = (void*) ind_vm;
74     if (self != simix_global->maestro_process) {
75       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
76                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
77       SIMIX_process_yield(self);
78     } else {
79       SIMIX_simcall_handle(&self->simcall, 0);
80     }    
81     
82   }
83   
84 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
85     smx_process_t self = SIMIX_process_self();
86
87     /* Go to that function to follow the code flow through the simcall barrier */
88     if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
89     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
90
91     self->simcall.call = SIMCALL_VM_SAVE;
92     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
93     memset(self->simcall.args, 0, sizeof(self->simcall.args));
94     self->simcall.args[0].dp = (void*) ind_vm;
95     if (self != simix_global->maestro_process) {
96       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
97                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
98       SIMIX_process_yield(self);
99     } else {
100       SIMIX_simcall_handle(&self->simcall, 0);
101     }    
102     
103   }
104   
105 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
106     smx_process_t self = SIMIX_process_self();
107
108     /* Go to that function to follow the code flow through the simcall barrier */
109     if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
110     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
111
112     self->simcall.call = SIMCALL_VM_RESTORE;
113     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
114     memset(self->simcall.args, 0, sizeof(self->simcall.args));
115     self->simcall.args[0].dp = (void*) ind_vm;
116     if (self != simix_global->maestro_process) {
117       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
118                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
119       SIMIX_process_yield(self);
120     } else {
121       SIMIX_simcall_handle(&self->simcall, 0);
122     }    
123     
124   }
125   
126 inline static void* simcall_BODY_process_create(const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart) {
127     smx_process_t self = SIMIX_process_self();
128
129     /* Go to that function to follow the code flow through the simcall barrier */
130     if (0) simcall_HANDLER_process_create(&self->simcall, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
131     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
132
133     self->simcall.call = SIMCALL_PROCESS_CREATE;
134     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
135     memset(self->simcall.args, 0, sizeof(self->simcall.args));
136     self->simcall.args[0].cc = (const char*) name;
137     self->simcall.args[1].fp = (FPtr) code;
138     self->simcall.args[2].dp = (void*) data;
139     self->simcall.args[3].cc = (const char*) hostname;
140     self->simcall.args[4].d = (double) kill_time;
141     self->simcall.args[5].i = (int) argc;
142     self->simcall.args[6].dp = (void*) argv;
143     self->simcall.args[7].dp = (void*) properties;
144     self->simcall.args[8].i = (int) auto_restart;
145     if (self != simix_global->maestro_process) {
146       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
147                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
148       SIMIX_process_yield(self);
149     } else {
150       SIMIX_simcall_handle(&self->simcall, 0);
151     }    
152     return (void*) self->simcall.result.dp;
153   }
154   
155 inline static void simcall_BODY_process_kill(smx_process_t process) {
156     smx_process_t self = SIMIX_process_self();
157
158     /* Go to that function to follow the code flow through the simcall barrier */
159     if (0) simcall_HANDLER_process_kill(&self->simcall, process);
160     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
161
162     self->simcall.call = SIMCALL_PROCESS_KILL;
163     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
164     memset(self->simcall.args, 0, sizeof(self->simcall.args));
165     self->simcall.args[0].dp = (void*) process;
166     if (self != simix_global->maestro_process) {
167       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
168                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
169       SIMIX_process_yield(self);
170     } else {
171       SIMIX_simcall_handle(&self->simcall, 0);
172     }    
173     
174   }
175   
176 inline static void simcall_BODY_process_killall(int reset_pid) {
177     smx_process_t self = SIMIX_process_self();
178
179     /* Go to that function to follow the code flow through the simcall barrier */
180     if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
181     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
182
183     self->simcall.call = SIMCALL_PROCESS_KILLALL;
184     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
185     memset(self->simcall.args, 0, sizeof(self->simcall.args));
186     self->simcall.args[0].i = (int) reset_pid;
187     if (self != simix_global->maestro_process) {
188       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
189                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
190       SIMIX_process_yield(self);
191     } else {
192       SIMIX_simcall_handle(&self->simcall, 0);
193     }    
194     
195   }
196   
197 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
198     smx_process_t self = SIMIX_process_self();
199
200     /* Go to that function to follow the code flow through the simcall barrier */
201     if (0) SIMIX_process_cleanup(process);
202     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
203
204     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
205     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
206     memset(self->simcall.args, 0, sizeof(self->simcall.args));
207     self->simcall.args[0].dp = (void*) process;
208     if (self != simix_global->maestro_process) {
209       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
210                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
211       SIMIX_process_yield(self);
212     } else {
213       SIMIX_simcall_handle(&self->simcall, 0);
214     }    
215     
216   }
217   
218 inline static void simcall_BODY_process_suspend(smx_process_t process) {
219     smx_process_t self = SIMIX_process_self();
220
221     /* Go to that function to follow the code flow through the simcall barrier */
222     if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
223     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
224
225     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
226     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
227     memset(self->simcall.args, 0, sizeof(self->simcall.args));
228     self->simcall.args[0].dp = (void*) process;
229     if (self != simix_global->maestro_process) {
230       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
231                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
232       SIMIX_process_yield(self);
233     } else {
234       SIMIX_simcall_handle(&self->simcall, 0);
235     }    
236     
237   }
238   
239 inline static void simcall_BODY_process_resume(smx_process_t process) {
240     smx_process_t self = SIMIX_process_self();
241
242     /* Go to that function to follow the code flow through the simcall barrier */
243     if (0) simcall_HANDLER_process_resume(&self->simcall, process);
244     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
245
246     self->simcall.call = SIMCALL_PROCESS_RESUME;
247     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
248     memset(self->simcall.args, 0, sizeof(self->simcall.args));
249     self->simcall.args[0].dp = (void*) process;
250     if (self != simix_global->maestro_process) {
251       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
252                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
253       SIMIX_process_yield(self);
254     } else {
255       SIMIX_simcall_handle(&self->simcall, 0);
256     }    
257     
258   }
259   
260 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
261     smx_process_t self = SIMIX_process_self();
262
263     /* Go to that function to follow the code flow through the simcall barrier */
264     if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
265     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
266
267     self->simcall.call = SIMCALL_PROCESS_SET_HOST;
268     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
269     memset(self->simcall.args, 0, sizeof(self->simcall.args));
270     self->simcall.args[0].dp = (void*) process;
271     self->simcall.args[1].dp = (void*) dest;
272     if (self != simix_global->maestro_process) {
273       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
274                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
275       SIMIX_process_yield(self);
276     } else {
277       SIMIX_simcall_handle(&self->simcall, 0);
278     }    
279     
280   }
281   
282 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
283     smx_process_t self = SIMIX_process_self();
284
285     /* Go to that function to follow the code flow through the simcall barrier */
286     if (0) SIMIX_process_is_suspended(process);
287     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
288
289     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
290     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
291     memset(self->simcall.args, 0, sizeof(self->simcall.args));
292     self->simcall.args[0].dp = (void*) process;
293     if (self != simix_global->maestro_process) {
294       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
295                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
296       SIMIX_process_yield(self);
297     } else {
298       SIMIX_simcall_handle(&self->simcall, 0);
299     }    
300     return (int) self->simcall.result.i;
301   }
302   
303 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
304     smx_process_t self = SIMIX_process_self();
305
306     /* Go to that function to follow the code flow through the simcall barrier */
307     if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
308     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
309
310     self->simcall.call = SIMCALL_PROCESS_JOIN;
311     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
312     memset(self->simcall.args, 0, sizeof(self->simcall.args));
313     self->simcall.args[0].dp = (void*) process;
314     self->simcall.args[1].d = (double) timeout;
315     if (self != simix_global->maestro_process) {
316       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
317                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
318       SIMIX_process_yield(self);
319     } else {
320       SIMIX_simcall_handle(&self->simcall, 0);
321     }    
322     return (int) self->simcall.result.i;
323   }
324   
325 inline static int simcall_BODY_process_sleep(double duration) {
326     smx_process_t self = SIMIX_process_self();
327
328     /* Go to that function to follow the code flow through the simcall barrier */
329     if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
330     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
331
332     self->simcall.call = SIMCALL_PROCESS_SLEEP;
333     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
334     memset(self->simcall.args, 0, sizeof(self->simcall.args));
335     self->simcall.args[0].d = (double) duration;
336     if (self != simix_global->maestro_process) {
337       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
338                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
339       SIMIX_process_yield(self);
340     } else {
341       SIMIX_simcall_handle(&self->simcall, 0);
342     }    
343     return (int) self->simcall.result.i;
344   }
345   
346 inline static smx_synchro_t simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
347     smx_process_t self = SIMIX_process_self();
348
349     /* Go to that function to follow the code flow through the simcall barrier */
350     if (0) simcall_HANDLER_execution_start(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
351     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
352
353     self->simcall.call = SIMCALL_EXECUTION_START;
354     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
355     memset(self->simcall.args, 0, sizeof(self->simcall.args));
356     self->simcall.args[0].cc = (const char*) name;
357     self->simcall.args[1].d = (double) flops_amount;
358     self->simcall.args[2].d = (double) priority;
359     self->simcall.args[3].d = (double) bound;
360     self->simcall.args[4].ul = (unsigned long) affinity_mask;
361     if (self != simix_global->maestro_process) {
362       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
363                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
364       SIMIX_process_yield(self);
365     } else {
366       SIMIX_simcall_handle(&self->simcall, 0);
367     }    
368     return (smx_synchro_t) self->simcall.result.dp;
369   }
370   
371 inline static smx_synchro_t simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
372     smx_process_t self = SIMIX_process_self();
373
374     /* Go to that function to follow the code flow through the simcall barrier */
375     if (0) SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
376     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
377
378     self->simcall.call = SIMCALL_EXECUTION_PARALLEL_START;
379     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
380     memset(self->simcall.args, 0, sizeof(self->simcall.args));
381     self->simcall.args[0].cc = (const char*) name;
382     self->simcall.args[1].i = (int) host_nb;
383     self->simcall.args[2].dp = (void*) host_list;
384     self->simcall.args[3].dp = (void*) flops_amount;
385     self->simcall.args[4].dp = (void*) bytes_amount;
386     self->simcall.args[5].d = (double) amount;
387     self->simcall.args[6].d = (double) rate;
388     if (self != simix_global->maestro_process) {
389       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
390                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
391       SIMIX_process_yield(self);
392     } else {
393       SIMIX_simcall_handle(&self->simcall, 0);
394     }    
395     return (smx_synchro_t) self->simcall.result.dp;
396   }
397   
398 inline static void simcall_BODY_execution_destroy(smx_synchro_t execution) {
399     smx_process_t self = SIMIX_process_self();
400
401     /* Go to that function to follow the code flow through the simcall barrier */
402     if (0) SIMIX_execution_destroy(execution);
403     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
404
405     self->simcall.call = SIMCALL_EXECUTION_DESTROY;
406     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
407     memset(self->simcall.args, 0, sizeof(self->simcall.args));
408     self->simcall.args[0].dp = (void*) execution;
409     if (self != simix_global->maestro_process) {
410       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
411                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
412       SIMIX_process_yield(self);
413     } else {
414       SIMIX_simcall_handle(&self->simcall, 0);
415     }    
416     
417   }
418   
419 inline static void simcall_BODY_execution_cancel(smx_synchro_t execution) {
420     smx_process_t self = SIMIX_process_self();
421
422     /* Go to that function to follow the code flow through the simcall barrier */
423     if (0) SIMIX_execution_cancel(execution);
424     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
425
426     self->simcall.call = SIMCALL_EXECUTION_CANCEL;
427     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
428     memset(self->simcall.args, 0, sizeof(self->simcall.args));
429     self->simcall.args[0].dp = (void*) execution;
430     if (self != simix_global->maestro_process) {
431       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
432                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
433       SIMIX_process_yield(self);
434     } else {
435       SIMIX_simcall_handle(&self->simcall, 0);
436     }    
437     
438   }
439   
440 inline static double simcall_BODY_execution_get_remains(smx_synchro_t execution) {
441     smx_process_t self = SIMIX_process_self();
442
443     /* Go to that function to follow the code flow through the simcall barrier */
444     if (0) SIMIX_execution_get_remains(execution);
445     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
446
447     self->simcall.call = SIMCALL_EXECUTION_GET_REMAINS;
448     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
449     memset(self->simcall.args, 0, sizeof(self->simcall.args));
450     self->simcall.args[0].dp = (void*) execution;
451     if (self != simix_global->maestro_process) {
452       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
453                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
454       SIMIX_process_yield(self);
455     } else {
456       SIMIX_simcall_handle(&self->simcall, 0);
457     }    
458     return (double) self->simcall.result.d;
459   }
460   
461 inline static e_smx_state_t simcall_BODY_execution_get_state(smx_synchro_t execution) {
462     smx_process_t self = SIMIX_process_self();
463
464     /* Go to that function to follow the code flow through the simcall barrier */
465     if (0) SIMIX_execution_get_state(execution);
466     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
467
468     self->simcall.call = SIMCALL_EXECUTION_GET_STATE;
469     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
470     memset(self->simcall.args, 0, sizeof(self->simcall.args));
471     self->simcall.args[0].dp = (void*) execution;
472     if (self != simix_global->maestro_process) {
473       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
474                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
475       SIMIX_process_yield(self);
476     } else {
477       SIMIX_simcall_handle(&self->simcall, 0);
478     }    
479     return (e_smx_state_t) self->simcall.result.i;
480   }
481   
482 inline static void simcall_BODY_execution_set_priority(smx_synchro_t execution, double priority) {
483     smx_process_t self = SIMIX_process_self();
484
485     /* Go to that function to follow the code flow through the simcall barrier */
486     if (0) SIMIX_execution_set_priority(execution, priority);
487     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
488
489     self->simcall.call = SIMCALL_EXECUTION_SET_PRIORITY;
490     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
491     memset(self->simcall.args, 0, sizeof(self->simcall.args));
492     self->simcall.args[0].dp = (void*) execution;
493     self->simcall.args[1].d = (double) priority;
494     if (self != simix_global->maestro_process) {
495       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
496                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
497       SIMIX_process_yield(self);
498     } else {
499       SIMIX_simcall_handle(&self->simcall, 0);
500     }    
501     
502   }
503   
504 inline static void simcall_BODY_execution_set_bound(smx_synchro_t execution, double bound) {
505     smx_process_t self = SIMIX_process_self();
506
507     /* Go to that function to follow the code flow through the simcall barrier */
508     if (0) SIMIX_execution_set_bound(execution, bound);
509     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
510
511     self->simcall.call = SIMCALL_EXECUTION_SET_BOUND;
512     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
513     memset(self->simcall.args, 0, sizeof(self->simcall.args));
514     self->simcall.args[0].dp = (void*) execution;
515     self->simcall.args[1].d = (double) bound;
516     if (self != simix_global->maestro_process) {
517       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
518                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
519       SIMIX_process_yield(self);
520     } else {
521       SIMIX_simcall_handle(&self->simcall, 0);
522     }    
523     
524   }
525   
526 inline static void simcall_BODY_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
527     smx_process_t self = SIMIX_process_self();
528
529     /* Go to that function to follow the code flow through the simcall barrier */
530     if (0) SIMIX_execution_set_affinity(execution, ws, mask);
531     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
532
533     self->simcall.call = SIMCALL_EXECUTION_SET_AFFINITY;
534     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
535     memset(self->simcall.args, 0, sizeof(self->simcall.args));
536     self->simcall.args[0].dp = (void*) execution;
537     self->simcall.args[1].dp = (void*) ws;
538     self->simcall.args[2].ul = (unsigned long) mask;
539     if (self != simix_global->maestro_process) {
540       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
541                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
542       SIMIX_process_yield(self);
543     } else {
544       SIMIX_simcall_handle(&self->simcall, 0);
545     }    
546     
547   }
548   
549 inline static int simcall_BODY_execution_wait(smx_synchro_t execution) {
550     smx_process_t self = SIMIX_process_self();
551
552     /* Go to that function to follow the code flow through the simcall barrier */
553     if (0) simcall_HANDLER_execution_wait(&self->simcall, execution);
554     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
555
556     self->simcall.call = SIMCALL_EXECUTION_WAIT;
557     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
558     memset(self->simcall.args, 0, sizeof(self->simcall.args));
559     self->simcall.args[0].dp = (void*) execution;
560     if (self != simix_global->maestro_process) {
561       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
562                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
563       SIMIX_process_yield(self);
564     } else {
565       SIMIX_simcall_handle(&self->simcall, 0);
566     }    
567     return (int) self->simcall.result.i;
568   }
569   
570 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
571     smx_process_t self = SIMIX_process_self();
572
573     /* Go to that function to follow the code flow through the simcall barrier */
574     if (0) SIMIX_process_on_exit(process, fun, data);
575     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
576
577     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
578     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
579     memset(self->simcall.args, 0, sizeof(self->simcall.args));
580     self->simcall.args[0].dp = (void*) process;
581     self->simcall.args[1].fp = (FPtr) fun;
582     self->simcall.args[2].dp = (void*) data;
583     if (self != simix_global->maestro_process) {
584       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
585                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
586       SIMIX_process_yield(self);
587     } else {
588       SIMIX_simcall_handle(&self->simcall, 0);
589     }    
590     
591   }
592   
593 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
594     smx_process_t self = SIMIX_process_self();
595
596     /* Go to that function to follow the code flow through the simcall barrier */
597     if (0) SIMIX_process_auto_restart_set(process, auto_restart);
598     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
599
600     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
601     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
602     memset(self->simcall.args, 0, sizeof(self->simcall.args));
603     self->simcall.args[0].dp = (void*) process;
604     self->simcall.args[1].i = (int) auto_restart;
605     if (self != simix_global->maestro_process) {
606       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
607                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
608       SIMIX_process_yield(self);
609     } else {
610       SIMIX_simcall_handle(&self->simcall, 0);
611     }    
612     
613   }
614   
615 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
616     smx_process_t self = SIMIX_process_self();
617
618     /* Go to that function to follow the code flow through the simcall barrier */
619     if (0) simcall_HANDLER_process_restart(&self->simcall, process);
620     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
621
622     self->simcall.call = SIMCALL_PROCESS_RESTART;
623     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
624     memset(self->simcall.args, 0, sizeof(self->simcall.args));
625     self->simcall.args[0].dp = (void*) process;
626     if (self != simix_global->maestro_process) {
627       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
628                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
629       SIMIX_process_yield(self);
630     } else {
631       SIMIX_simcall_handle(&self->simcall, 0);
632     }    
633     return (smx_process_t) self->simcall.result.dp;
634   }
635   
636 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
637     smx_process_t self = SIMIX_process_self();
638
639     /* Go to that function to follow the code flow through the simcall barrier */
640     if (0) SIMIX_rdv_create(name);
641     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
642
643     self->simcall.call = SIMCALL_RDV_CREATE;
644     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
645     memset(self->simcall.args, 0, sizeof(self->simcall.args));
646     self->simcall.args[0].cc = (const char*) name;
647     if (self != simix_global->maestro_process) {
648       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
649                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
650       SIMIX_process_yield(self);
651     } else {
652       SIMIX_simcall_handle(&self->simcall, 0);
653     }    
654     return (smx_rdv_t) self->simcall.result.dp;
655   }
656   
657 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
658     smx_process_t self = SIMIX_process_self();
659
660     /* Go to that function to follow the code flow through the simcall barrier */
661     if (0) SIMIX_rdv_destroy(rdv);
662     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
663
664     self->simcall.call = SIMCALL_RDV_DESTROY;
665     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
666     memset(self->simcall.args, 0, sizeof(self->simcall.args));
667     self->simcall.args[0].dp = (void*) rdv;
668     if (self != simix_global->maestro_process) {
669       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
670                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
671       SIMIX_process_yield(self);
672     } else {
673       SIMIX_simcall_handle(&self->simcall, 0);
674     }    
675     
676   }
677   
678 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) {
679     smx_process_t self = SIMIX_process_self();
680
681     /* Go to that function to follow the code flow through the simcall barrier */
682     if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
683     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
684
685     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
686     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
687     memset(self->simcall.args, 0, sizeof(self->simcall.args));
688     self->simcall.args[0].dp = (void*) rdv;
689     self->simcall.args[1].dp = (void*) host;
690     if (self != simix_global->maestro_process) {
691       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
692                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
693       SIMIX_process_yield(self);
694     } else {
695       SIMIX_simcall_handle(&self->simcall, 0);
696     }    
697     return (unsigned int) self->simcall.result.ui;
698   }
699   
700 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
701     smx_process_t self = SIMIX_process_self();
702
703     /* Go to that function to follow the code flow through the simcall barrier */
704     if (0) SIMIX_rdv_get_head(rdv);
705     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
706
707     self->simcall.call = SIMCALL_RDV_GET_HEAD;
708     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
709     memset(self->simcall.args, 0, sizeof(self->simcall.args));
710     self->simcall.args[0].dp = (void*) rdv;
711     if (self != simix_global->maestro_process) {
712       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
713                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
714       SIMIX_process_yield(self);
715     } else {
716       SIMIX_simcall_handle(&self->simcall, 0);
717     }    
718     return (smx_synchro_t) self->simcall.result.dp;
719   }
720   
721 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
722     smx_process_t self = SIMIX_process_self();
723
724     /* Go to that function to follow the code flow through the simcall barrier */
725     if (0) SIMIX_rdv_set_receiver(rdv, receiver);
726     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
727
728     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
729     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
730     memset(self->simcall.args, 0, sizeof(self->simcall.args));
731     self->simcall.args[0].dp = (void*) rdv;
732     self->simcall.args[1].dp = (void*) receiver;
733     if (self != simix_global->maestro_process) {
734       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
735                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
736       SIMIX_process_yield(self);
737     } else {
738       SIMIX_simcall_handle(&self->simcall, 0);
739     }    
740     
741   }
742   
743 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
744     smx_process_t self = SIMIX_process_self();
745
746     /* Go to that function to follow the code flow through the simcall barrier */
747     if (0) SIMIX_rdv_get_receiver(rdv);
748     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
749
750     self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
751     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
752     memset(self->simcall.args, 0, sizeof(self->simcall.args));
753     self->simcall.args[0].dp = (void*) rdv;
754     if (self != simix_global->maestro_process) {
755       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
756                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
757       SIMIX_process_yield(self);
758     } else {
759       SIMIX_simcall_handle(&self->simcall, 0);
760     }    
761     return (smx_process_t) self->simcall.result.dp;
762   }
763   
764 inline static smx_synchro_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
765     smx_process_t self = SIMIX_process_self();
766
767     /* Go to that function to follow the code flow through the simcall barrier */
768     if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
769     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
770
771     self->simcall.call = SIMCALL_COMM_IPROBE;
772     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
773     memset(self->simcall.args, 0, sizeof(self->simcall.args));
774     self->simcall.args[0].dp = (void*) rdv;
775     self->simcall.args[1].i = (int) type;
776     self->simcall.args[2].i = (int) src;
777     self->simcall.args[3].i = (int) tag;
778     self->simcall.args[4].fp = (FPtr) match_fun;
779     self->simcall.args[5].dp = (void*) data;
780     if (self != simix_global->maestro_process) {
781       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
782                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
783       SIMIX_process_yield(self);
784     } else {
785       SIMIX_simcall_handle(&self->simcall, 0);
786     }    
787     return (smx_synchro_t) self->simcall.result.dp;
788   }
789   
790 inline static void simcall_BODY_comm_send(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
791     smx_process_t self = SIMIX_process_self();
792
793     /* Go to that function to follow the code flow through the simcall barrier */
794     if (0) simcall_HANDLER_comm_send(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
795     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
796
797     self->simcall.call = SIMCALL_COMM_SEND;
798     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
799     memset(self->simcall.args, 0, sizeof(self->simcall.args));
800     self->simcall.args[0].dp = (void*) sender;
801     self->simcall.args[1].dp = (void*) rdv;
802     self->simcall.args[2].d = (double) task_size;
803     self->simcall.args[3].d = (double) rate;
804     self->simcall.args[4].dp = (void*) src_buff;
805     self->simcall.args[5].sz = (size_t) src_buff_size;
806     self->simcall.args[6].fp = (FPtr) match_fun;
807     self->simcall.args[7].fp = (FPtr) copy_data_fun;
808     self->simcall.args[8].dp = (void*) data;
809     self->simcall.args[9].d = (double) timeout;
810     if (self != simix_global->maestro_process) {
811       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
812                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
813       SIMIX_process_yield(self);
814     } else {
815       SIMIX_simcall_handle(&self->simcall, 0);
816     }    
817     
818   }
819   
820 inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
821     smx_process_t self = SIMIX_process_self();
822
823     /* Go to that function to follow the code flow through the simcall barrier */
824     if (0) simcall_HANDLER_comm_isend(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
825     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
826
827     self->simcall.call = SIMCALL_COMM_ISEND;
828     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
829     memset(self->simcall.args, 0, sizeof(self->simcall.args));
830     self->simcall.args[0].dp = (void*) sender;
831     self->simcall.args[1].dp = (void*) rdv;
832     self->simcall.args[2].d = (double) task_size;
833     self->simcall.args[3].d = (double) rate;
834     self->simcall.args[4].dp = (void*) src_buff;
835     self->simcall.args[5].sz = (size_t) src_buff_size;
836     self->simcall.args[6].fp = (FPtr) match_fun;
837     self->simcall.args[7].fp = (FPtr) clean_fun;
838     self->simcall.args[8].fp = (FPtr) copy_data_fun;
839     self->simcall.args[9].dp = (void*) data;
840     self->simcall.args[10].i = (int) detached;
841     if (self != simix_global->maestro_process) {
842       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
843                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
844       SIMIX_process_yield(self);
845     } else {
846       SIMIX_simcall_handle(&self->simcall, 0);
847     }    
848     return (smx_synchro_t) self->simcall.result.dp;
849   }
850   
851 inline static void simcall_BODY_comm_recv(smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
852     smx_process_t self = SIMIX_process_self();
853
854     /* Go to that function to follow the code flow through the simcall barrier */
855     if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
856     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
857
858     self->simcall.call = SIMCALL_COMM_RECV;
859     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
860     memset(self->simcall.args, 0, sizeof(self->simcall.args));
861     self->simcall.args[0].dp = (void*) receiver;
862     self->simcall.args[1].dp = (void*) rdv;
863     self->simcall.args[2].dp = (void*) dst_buff;
864     self->simcall.args[3].dp = (void*) dst_buff_size;
865     self->simcall.args[4].fp = (FPtr) match_fun;
866     self->simcall.args[5].fp = (FPtr) copy_data_fun;
867     self->simcall.args[6].dp = (void*) data;
868     self->simcall.args[7].d = (double) timeout;
869     self->simcall.args[8].d = (double) rate;
870     if (self != simix_global->maestro_process) {
871       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
872                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
873       SIMIX_process_yield(self);
874     } else {
875       SIMIX_simcall_handle(&self->simcall, 0);
876     }    
877     
878   }
879   
880 inline static smx_synchro_t simcall_BODY_comm_irecv(smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
881     smx_process_t self = SIMIX_process_self();
882
883     /* Go to that function to follow the code flow through the simcall barrier */
884     if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
885     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
886
887     self->simcall.call = SIMCALL_COMM_IRECV;
888     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
889     memset(self->simcall.args, 0, sizeof(self->simcall.args));
890     self->simcall.args[0].dp = (void*) receiver;
891     self->simcall.args[1].dp = (void*) rdv;
892     self->simcall.args[2].dp = (void*) dst_buff;
893     self->simcall.args[3].dp = (void*) dst_buff_size;
894     self->simcall.args[4].fp = (FPtr) match_fun;
895     self->simcall.args[5].fp = (FPtr) copy_data_fun;
896     self->simcall.args[6].dp = (void*) data;
897     self->simcall.args[7].d = (double) rate;
898     if (self != simix_global->maestro_process) {
899       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
900                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
901       SIMIX_process_yield(self);
902     } else {
903       SIMIX_simcall_handle(&self->simcall, 0);
904     }    
905     return (smx_synchro_t) self->simcall.result.dp;
906   }
907   
908 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
909     smx_process_t self = SIMIX_process_self();
910
911     /* Go to that function to follow the code flow through the simcall barrier */
912     if (0) SIMIX_comm_cancel(comm);
913     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
914
915     self->simcall.call = SIMCALL_COMM_CANCEL;
916     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
917     memset(self->simcall.args, 0, sizeof(self->simcall.args));
918     self->simcall.args[0].dp = (void*) comm;
919     if (self != simix_global->maestro_process) {
920       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
921                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
922       SIMIX_process_yield(self);
923     } else {
924       SIMIX_simcall_handle(&self->simcall, 0);
925     }    
926     
927   }
928   
929 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
930     smx_process_t self = SIMIX_process_self();
931
932     /* Go to that function to follow the code flow through the simcall barrier */
933     if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
934     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
935
936     self->simcall.call = SIMCALL_COMM_WAITANY;
937     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
938     memset(self->simcall.args, 0, sizeof(self->simcall.args));
939     self->simcall.args[0].dp = (void*) comms;
940     if (self != simix_global->maestro_process) {
941       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
942                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
943       SIMIX_process_yield(self);
944     } else {
945       SIMIX_simcall_handle(&self->simcall, 0);
946     }    
947     return (int) self->simcall.result.i;
948   }
949   
950 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
951     smx_process_t self = SIMIX_process_self();
952
953     /* Go to that function to follow the code flow through the simcall barrier */
954     if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
955     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
956
957     self->simcall.call = SIMCALL_COMM_WAIT;
958     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
959     memset(self->simcall.args, 0, sizeof(self->simcall.args));
960     self->simcall.args[0].dp = (void*) comm;
961     self->simcall.args[1].d = (double) timeout;
962     if (self != simix_global->maestro_process) {
963       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
964                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
965       SIMIX_process_yield(self);
966     } else {
967       SIMIX_simcall_handle(&self->simcall, 0);
968     }    
969     
970   }
971   
972 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
973     smx_process_t self = SIMIX_process_self();
974
975     /* Go to that function to follow the code flow through the simcall barrier */
976     if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
977     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
978
979     self->simcall.call = SIMCALL_COMM_TEST;
980     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
981     memset(self->simcall.args, 0, sizeof(self->simcall.args));
982     self->simcall.args[0].dp = (void*) comm;
983     if (self != simix_global->maestro_process) {
984       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
985                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
986       SIMIX_process_yield(self);
987     } else {
988       SIMIX_simcall_handle(&self->simcall, 0);
989     }    
990     return (int) self->simcall.result.i;
991   }
992   
993 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
994     smx_process_t self = SIMIX_process_self();
995
996     /* Go to that function to follow the code flow through the simcall barrier */
997     if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
998     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
999
1000     self->simcall.call = SIMCALL_COMM_TESTANY;
1001     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1002     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1003     self->simcall.args[0].dp = (void*) comms;
1004     if (self != simix_global->maestro_process) {
1005       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1006                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1007       SIMIX_process_yield(self);
1008     } else {
1009       SIMIX_simcall_handle(&self->simcall, 0);
1010     }    
1011     return (int) self->simcall.result.i;
1012   }
1013   
1014 inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
1015     smx_process_t self = SIMIX_process_self();
1016
1017     /* Go to that function to follow the code flow through the simcall barrier */
1018     if (0) SIMIX_comm_get_remains(comm);
1019     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1020
1021     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1022     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1023     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1024     self->simcall.args[0].dp = (void*) comm;
1025     if (self != simix_global->maestro_process) {
1026       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1027                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1028       SIMIX_process_yield(self);
1029     } else {
1030       SIMIX_simcall_handle(&self->simcall, 0);
1031     }    
1032     return (double) self->simcall.result.d;
1033   }
1034   
1035 inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
1036     smx_process_t self = SIMIX_process_self();
1037
1038     /* Go to that function to follow the code flow through the simcall barrier */
1039     if (0) SIMIX_comm_get_state(comm);
1040     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1041
1042     self->simcall.call = SIMCALL_COMM_GET_STATE;
1043     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1044     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1045     self->simcall.args[0].dp = (void*) comm;
1046     if (self != simix_global->maestro_process) {
1047       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1048                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1049       SIMIX_process_yield(self);
1050     } else {
1051       SIMIX_simcall_handle(&self->simcall, 0);
1052     }    
1053     return (e_smx_state_t) self->simcall.result.i;
1054   }
1055   
1056 inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
1057     smx_process_t self = SIMIX_process_self();
1058
1059     /* Go to that function to follow the code flow through the simcall barrier */
1060     if (0) SIMIX_comm_get_src_data(comm);
1061     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1062
1063     self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1064     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1065     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1066     self->simcall.args[0].dp = (void*) comm;
1067     if (self != simix_global->maestro_process) {
1068       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1069                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1070       SIMIX_process_yield(self);
1071     } else {
1072       SIMIX_simcall_handle(&self->simcall, 0);
1073     }    
1074     return (void*) self->simcall.result.dp;
1075   }
1076   
1077 inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
1078     smx_process_t self = SIMIX_process_self();
1079
1080     /* Go to that function to follow the code flow through the simcall barrier */
1081     if (0) SIMIX_comm_get_dst_data(comm);
1082     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1083
1084     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1085     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1086     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1087     self->simcall.args[0].dp = (void*) comm;
1088     if (self != simix_global->maestro_process) {
1089       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1090                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1091       SIMIX_process_yield(self);
1092     } else {
1093       SIMIX_simcall_handle(&self->simcall, 0);
1094     }    
1095     return (void*) self->simcall.result.dp;
1096   }
1097   
1098 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_synchro_t comm) {
1099     smx_process_t self = SIMIX_process_self();
1100
1101     /* Go to that function to follow the code flow through the simcall barrier */
1102     if (0) SIMIX_comm_get_src_proc(comm);
1103     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1104
1105     self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1106     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1107     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1108     self->simcall.args[0].dp = (void*) comm;
1109     if (self != simix_global->maestro_process) {
1110       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1111                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1112       SIMIX_process_yield(self);
1113     } else {
1114       SIMIX_simcall_handle(&self->simcall, 0);
1115     }    
1116     return (smx_process_t) self->simcall.result.dp;
1117   }
1118   
1119 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_synchro_t comm) {
1120     smx_process_t self = SIMIX_process_self();
1121
1122     /* Go to that function to follow the code flow through the simcall barrier */
1123     if (0) SIMIX_comm_get_dst_proc(comm);
1124     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1125
1126     self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1127     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1128     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1129     self->simcall.args[0].dp = (void*) comm;
1130     if (self != simix_global->maestro_process) {
1131       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1132                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1133       SIMIX_process_yield(self);
1134     } else {
1135       SIMIX_simcall_handle(&self->simcall, 0);
1136     }    
1137     return (smx_process_t) self->simcall.result.dp;
1138   }
1139   
1140 inline static smx_mutex_t simcall_BODY_mutex_init() {
1141     smx_process_t self = SIMIX_process_self();
1142
1143     /* Go to that function to follow the code flow through the simcall barrier */
1144     if (0) simcall_HANDLER_mutex_init(&self->simcall);
1145     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1146
1147     self->simcall.call = SIMCALL_MUTEX_INIT;
1148     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1149     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1150
1151     if (self != simix_global->maestro_process) {
1152       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1153                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1154       SIMIX_process_yield(self);
1155     } else {
1156       SIMIX_simcall_handle(&self->simcall, 0);
1157     }    
1158     return (smx_mutex_t) self->simcall.result.dp;
1159   }
1160   
1161 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1162     smx_process_t self = SIMIX_process_self();
1163
1164     /* Go to that function to follow the code flow through the simcall barrier */
1165     if (0) SIMIX_mutex_destroy(mutex);
1166     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1167
1168     self->simcall.call = SIMCALL_MUTEX_DESTROY;
1169     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1170     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1171     self->simcall.args[0].dp = (void*) mutex;
1172     if (self != simix_global->maestro_process) {
1173       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1174                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1175       SIMIX_process_yield(self);
1176     } else {
1177       SIMIX_simcall_handle(&self->simcall, 0);
1178     }    
1179     
1180   }
1181   
1182 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1183     smx_process_t self = SIMIX_process_self();
1184
1185     /* Go to that function to follow the code flow through the simcall barrier */
1186     if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1187     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1188
1189     self->simcall.call = SIMCALL_MUTEX_LOCK;
1190     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1191     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1192     self->simcall.args[0].dp = (void*) mutex;
1193     if (self != simix_global->maestro_process) {
1194       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1195                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1196       SIMIX_process_yield(self);
1197     } else {
1198       SIMIX_simcall_handle(&self->simcall, 0);
1199     }    
1200     
1201   }
1202   
1203 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1204     smx_process_t self = SIMIX_process_self();
1205
1206     /* Go to that function to follow the code flow through the simcall barrier */
1207     if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
1208     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1209
1210     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1211     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1212     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1213     self->simcall.args[0].dp = (void*) mutex;
1214     if (self != simix_global->maestro_process) {
1215       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1216                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1217       SIMIX_process_yield(self);
1218     } else {
1219       SIMIX_simcall_handle(&self->simcall, 0);
1220     }    
1221     return (int) self->simcall.result.i;
1222   }
1223   
1224 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1225     smx_process_t self = SIMIX_process_self();
1226
1227     /* Go to that function to follow the code flow through the simcall barrier */
1228     if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
1229     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1230
1231     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1232     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1233     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1234     self->simcall.args[0].dp = (void*) mutex;
1235     if (self != simix_global->maestro_process) {
1236       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1237                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1238       SIMIX_process_yield(self);
1239     } else {
1240       SIMIX_simcall_handle(&self->simcall, 0);
1241     }    
1242     
1243   }
1244   
1245 inline static smx_cond_t simcall_BODY_cond_init() {
1246     smx_process_t self = SIMIX_process_self();
1247
1248     /* Go to that function to follow the code flow through the simcall barrier */
1249     if (0) SIMIX_cond_init();
1250     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1251
1252     self->simcall.call = SIMCALL_COND_INIT;
1253     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1254     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1255
1256     if (self != simix_global->maestro_process) {
1257       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1258                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1259       SIMIX_process_yield(self);
1260     } else {
1261       SIMIX_simcall_handle(&self->simcall, 0);
1262     }    
1263     return (smx_cond_t) self->simcall.result.dp;
1264   }
1265   
1266 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
1267     smx_process_t self = SIMIX_process_self();
1268
1269     /* Go to that function to follow the code flow through the simcall barrier */
1270     if (0) SIMIX_cond_destroy(cond);
1271     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1272
1273     self->simcall.call = SIMCALL_COND_DESTROY;
1274     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1275     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1276     self->simcall.args[0].dp = (void*) cond;
1277     if (self != simix_global->maestro_process) {
1278       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1279                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1280       SIMIX_process_yield(self);
1281     } else {
1282       SIMIX_simcall_handle(&self->simcall, 0);
1283     }    
1284     
1285   }
1286   
1287 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
1288     smx_process_t self = SIMIX_process_self();
1289
1290     /* Go to that function to follow the code flow through the simcall barrier */
1291     if (0) SIMIX_cond_signal(cond);
1292     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1293
1294     self->simcall.call = SIMCALL_COND_SIGNAL;
1295     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1296     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1297     self->simcall.args[0].dp = (void*) cond;
1298     if (self != simix_global->maestro_process) {
1299       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1300                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1301       SIMIX_process_yield(self);
1302     } else {
1303       SIMIX_simcall_handle(&self->simcall, 0);
1304     }    
1305     
1306   }
1307   
1308 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
1309     smx_process_t self = SIMIX_process_self();
1310
1311     /* Go to that function to follow the code flow through the simcall barrier */
1312     if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
1313     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1314
1315     self->simcall.call = SIMCALL_COND_WAIT;
1316     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1317     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1318     self->simcall.args[0].dp = (void*) cond;
1319     self->simcall.args[1].dp = (void*) mutex;
1320     if (self != simix_global->maestro_process) {
1321       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1322                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1323       SIMIX_process_yield(self);
1324     } else {
1325       SIMIX_simcall_handle(&self->simcall, 0);
1326     }    
1327     
1328   }
1329   
1330 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1331     smx_process_t self = SIMIX_process_self();
1332
1333     /* Go to that function to follow the code flow through the simcall barrier */
1334     if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
1335     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1336
1337     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
1338     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1339     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1340     self->simcall.args[0].dp = (void*) cond;
1341     self->simcall.args[1].dp = (void*) mutex;
1342     self->simcall.args[2].d = (double) timeout;
1343     if (self != simix_global->maestro_process) {
1344       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1345                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1346       SIMIX_process_yield(self);
1347     } else {
1348       SIMIX_simcall_handle(&self->simcall, 0);
1349     }    
1350     
1351   }
1352   
1353 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1354     smx_process_t self = SIMIX_process_self();
1355
1356     /* Go to that function to follow the code flow through the simcall barrier */
1357     if (0) SIMIX_cond_broadcast(cond);
1358     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1359
1360     self->simcall.call = SIMCALL_COND_BROADCAST;
1361     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1362     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1363     self->simcall.args[0].dp = (void*) cond;
1364     if (self != simix_global->maestro_process) {
1365       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1366                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1367       SIMIX_process_yield(self);
1368     } else {
1369       SIMIX_simcall_handle(&self->simcall, 0);
1370     }    
1371     
1372   }
1373   
1374 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
1375     smx_process_t self = SIMIX_process_self();
1376
1377     /* Go to that function to follow the code flow through the simcall barrier */
1378     if (0) SIMIX_sem_init(capacity);
1379     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1380
1381     self->simcall.call = SIMCALL_SEM_INIT;
1382     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1383     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1384     self->simcall.args[0].ui = (unsigned int) capacity;
1385     if (self != simix_global->maestro_process) {
1386       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1387                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1388       SIMIX_process_yield(self);
1389     } else {
1390       SIMIX_simcall_handle(&self->simcall, 0);
1391     }    
1392     return (smx_sem_t) self->simcall.result.dp;
1393   }
1394   
1395 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
1396     smx_process_t self = SIMIX_process_self();
1397
1398     /* Go to that function to follow the code flow through the simcall barrier */
1399     if (0) SIMIX_sem_destroy(sem);
1400     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1401
1402     self->simcall.call = SIMCALL_SEM_DESTROY;
1403     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1404     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1405     self->simcall.args[0].dp = (void*) sem;
1406     if (self != simix_global->maestro_process) {
1407       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1408                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1409       SIMIX_process_yield(self);
1410     } else {
1411       SIMIX_simcall_handle(&self->simcall, 0);
1412     }    
1413     
1414   }
1415   
1416 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
1417     smx_process_t self = SIMIX_process_self();
1418
1419     /* Go to that function to follow the code flow through the simcall barrier */
1420     if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
1421     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1422
1423     self->simcall.call = SIMCALL_SEM_RELEASE;
1424     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1425     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1426     self->simcall.args[0].dp = (void*) sem;
1427     if (self != simix_global->maestro_process) {
1428       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1429                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1430       SIMIX_process_yield(self);
1431     } else {
1432       SIMIX_simcall_handle(&self->simcall, 0);
1433     }    
1434     
1435   }
1436   
1437 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
1438     smx_process_t self = SIMIX_process_self();
1439
1440     /* Go to that function to follow the code flow through the simcall barrier */
1441     if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
1442     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1443
1444     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
1445     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1446     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1447     self->simcall.args[0].dp = (void*) sem;
1448     if (self != simix_global->maestro_process) {
1449       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1450                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1451       SIMIX_process_yield(self);
1452     } else {
1453       SIMIX_simcall_handle(&self->simcall, 0);
1454     }    
1455     return (int) self->simcall.result.i;
1456   }
1457   
1458 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
1459     smx_process_t self = SIMIX_process_self();
1460
1461     /* Go to that function to follow the code flow through the simcall barrier */
1462     if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
1463     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1464
1465     self->simcall.call = SIMCALL_SEM_ACQUIRE;
1466     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1467     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1468     self->simcall.args[0].dp = (void*) sem;
1469     if (self != simix_global->maestro_process) {
1470       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1471                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1472       SIMIX_process_yield(self);
1473     } else {
1474       SIMIX_simcall_handle(&self->simcall, 0);
1475     }    
1476     
1477   }
1478   
1479 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
1480     smx_process_t self = SIMIX_process_self();
1481
1482     /* Go to that function to follow the code flow through the simcall barrier */
1483     if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
1484     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1485
1486     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
1487     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1488     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1489     self->simcall.args[0].dp = (void*) sem;
1490     self->simcall.args[1].d = (double) timeout;
1491     if (self != simix_global->maestro_process) {
1492       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1493                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1494       SIMIX_process_yield(self);
1495     } else {
1496       SIMIX_simcall_handle(&self->simcall, 0);
1497     }    
1498     
1499   }
1500   
1501 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
1502     smx_process_t self = SIMIX_process_self();
1503
1504     /* Go to that function to follow the code flow through the simcall barrier */
1505     if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
1506     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1507
1508     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
1509     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1510     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1511     self->simcall.args[0].dp = (void*) sem;
1512     if (self != simix_global->maestro_process) {
1513       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1514                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1515       SIMIX_process_yield(self);
1516     } else {
1517       SIMIX_simcall_handle(&self->simcall, 0);
1518     }    
1519     return (int) self->simcall.result.i;
1520   }
1521   
1522 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
1523     smx_process_t self = SIMIX_process_self();
1524
1525     /* Go to that function to follow the code flow through the simcall barrier */
1526     if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
1527     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1528
1529     self->simcall.call = SIMCALL_FILE_READ;
1530     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1531     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1532     self->simcall.args[0].dp = (void*) fd;
1533     self->simcall.args[1].sgsz = (sg_size_t) size;
1534     self->simcall.args[2].dp = (void*) host;
1535     if (self != simix_global->maestro_process) {
1536       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1537                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1538       SIMIX_process_yield(self);
1539     } else {
1540       SIMIX_simcall_handle(&self->simcall, 0);
1541     }    
1542     return (sg_size_t) self->simcall.result.sgsz;
1543   }
1544   
1545 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
1546     smx_process_t self = SIMIX_process_self();
1547
1548     /* Go to that function to follow the code flow through the simcall barrier */
1549     if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
1550     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1551
1552     self->simcall.call = SIMCALL_FILE_WRITE;
1553     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1554     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1555     self->simcall.args[0].dp = (void*) fd;
1556     self->simcall.args[1].sgsz = (sg_size_t) size;
1557     self->simcall.args[2].dp = (void*) host;
1558     if (self != simix_global->maestro_process) {
1559       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1560                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1561       SIMIX_process_yield(self);
1562     } else {
1563       SIMIX_simcall_handle(&self->simcall, 0);
1564     }    
1565     return (sg_size_t) self->simcall.result.sgsz;
1566   }
1567   
1568 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
1569     smx_process_t self = SIMIX_process_self();
1570
1571     /* Go to that function to follow the code flow through the simcall barrier */
1572     if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
1573     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1574
1575     self->simcall.call = SIMCALL_FILE_OPEN;
1576     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1577     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1578     self->simcall.args[0].cc = (const char*) fullpath;
1579     self->simcall.args[1].dp = (void*) host;
1580     if (self != simix_global->maestro_process) {
1581       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1582                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1583       SIMIX_process_yield(self);
1584     } else {
1585       SIMIX_simcall_handle(&self->simcall, 0);
1586     }    
1587     return (smx_file_t) self->simcall.result.dp;
1588   }
1589   
1590 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
1591     smx_process_t self = SIMIX_process_self();
1592
1593     /* Go to that function to follow the code flow through the simcall barrier */
1594     if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
1595     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1596
1597     self->simcall.call = SIMCALL_FILE_CLOSE;
1598     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1599     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1600     self->simcall.args[0].dp = (void*) fd;
1601     self->simcall.args[1].dp = (void*) host;
1602     if (self != simix_global->maestro_process) {
1603       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1604                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1605       SIMIX_process_yield(self);
1606     } else {
1607       SIMIX_simcall_handle(&self->simcall, 0);
1608     }    
1609     return (int) self->simcall.result.i;
1610   }
1611   
1612 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
1613     smx_process_t self = SIMIX_process_self();
1614
1615     /* Go to that function to follow the code flow through the simcall barrier */
1616     if (0) SIMIX_file_unlink(fd, host);
1617     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1618
1619     self->simcall.call = SIMCALL_FILE_UNLINK;
1620     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1621     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1622     self->simcall.args[0].dp = (void*) fd;
1623     self->simcall.args[1].dp = (void*) host;
1624     if (self != simix_global->maestro_process) {
1625       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1626                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1627       SIMIX_process_yield(self);
1628     } else {
1629       SIMIX_simcall_handle(&self->simcall, 0);
1630     }    
1631     return (int) self->simcall.result.i;
1632   }
1633   
1634 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
1635     smx_process_t self = SIMIX_process_self();
1636
1637     /* Go to that function to follow the code flow through the simcall barrier */
1638     if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
1639     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1640
1641     self->simcall.call = SIMCALL_FILE_GET_SIZE;
1642     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1643     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1644     self->simcall.args[0].dp = (void*) fd;
1645     if (self != simix_global->maestro_process) {
1646       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1647                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1648       SIMIX_process_yield(self);
1649     } else {
1650       SIMIX_simcall_handle(&self->simcall, 0);
1651     }    
1652     return (sg_size_t) self->simcall.result.sgsz;
1653   }
1654   
1655 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
1656     smx_process_t self = SIMIX_process_self();
1657
1658     /* Go to that function to follow the code flow through the simcall barrier */
1659     if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
1660     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1661
1662     self->simcall.call = SIMCALL_FILE_TELL;
1663     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1664     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1665     self->simcall.args[0].dp = (void*) fd;
1666     if (self != simix_global->maestro_process) {
1667       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1668                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1669       SIMIX_process_yield(self);
1670     } else {
1671       SIMIX_simcall_handle(&self->simcall, 0);
1672     }    
1673     return (sg_size_t) self->simcall.result.sgsz;
1674   }
1675   
1676 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
1677     smx_process_t self = SIMIX_process_self();
1678
1679     /* Go to that function to follow the code flow through the simcall barrier */
1680     if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
1681     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1682
1683     self->simcall.call = SIMCALL_FILE_SEEK;
1684     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1685     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1686     self->simcall.args[0].dp = (void*) fd;
1687     self->simcall.args[1].sgoff = (sg_offset_t) offset;
1688     self->simcall.args[2].i = (int) origin;
1689     if (self != simix_global->maestro_process) {
1690       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1691                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1692       SIMIX_process_yield(self);
1693     } else {
1694       SIMIX_simcall_handle(&self->simcall, 0);
1695     }    
1696     return (int) self->simcall.result.i;
1697   }
1698   
1699 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
1700     smx_process_t self = SIMIX_process_self();
1701
1702     /* Go to that function to follow the code flow through the simcall barrier */
1703     if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
1704     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1705
1706     self->simcall.call = SIMCALL_FILE_GET_INFO;
1707     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1708     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1709     self->simcall.args[0].dp = (void*) fd;
1710     if (self != simix_global->maestro_process) {
1711       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1712                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1713       SIMIX_process_yield(self);
1714     } else {
1715       SIMIX_simcall_handle(&self->simcall, 0);
1716     }    
1717     return (xbt_dynar_t) self->simcall.result.dp;
1718   }
1719   
1720 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
1721     smx_process_t self = SIMIX_process_self();
1722
1723     /* Go to that function to follow the code flow through the simcall barrier */
1724     if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
1725     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1726
1727     self->simcall.call = SIMCALL_FILE_MOVE;
1728     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1729     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1730     self->simcall.args[0].dp = (void*) fd;
1731     self->simcall.args[1].cc = (const char*) fullpath;
1732     if (self != simix_global->maestro_process) {
1733       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1734                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1735       SIMIX_process_yield(self);
1736     } else {
1737       SIMIX_simcall_handle(&self->simcall, 0);
1738     }    
1739     return (int) self->simcall.result.i;
1740   }
1741   
1742 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
1743     smx_process_t self = SIMIX_process_self();
1744
1745     /* Go to that function to follow the code flow through the simcall barrier */
1746     if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
1747     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1748
1749     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
1750     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1751     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1752     self->simcall.args[0].dp = (void*) storage;
1753     if (self != simix_global->maestro_process) {
1754       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1755                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1756       SIMIX_process_yield(self);
1757     } else {
1758       SIMIX_simcall_handle(&self->simcall, 0);
1759     }    
1760     return (sg_size_t) self->simcall.result.sgsz;
1761   }
1762   
1763 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
1764     smx_process_t self = SIMIX_process_self();
1765
1766     /* Go to that function to follow the code flow through the simcall barrier */
1767     if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
1768     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1769
1770     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
1771     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1772     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1773     self->simcall.args[0].dp = (void*) name;
1774     if (self != simix_global->maestro_process) {
1775       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1776                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1777       SIMIX_process_yield(self);
1778     } else {
1779       SIMIX_simcall_handle(&self->simcall, 0);
1780     }    
1781     return (sg_size_t) self->simcall.result.sgsz;
1782   }
1783   
1784 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
1785     smx_process_t self = SIMIX_process_self();
1786
1787     /* Go to that function to follow the code flow through the simcall barrier */
1788     if (0) SIMIX_storage_get_properties(storage);
1789     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1790
1791     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
1792     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1793     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1794     self->simcall.args[0].dp = (void*) storage;
1795     if (self != simix_global->maestro_process) {
1796       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1797                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1798       SIMIX_process_yield(self);
1799     } else {
1800       SIMIX_simcall_handle(&self->simcall, 0);
1801     }    
1802     return (xbt_dict_t) self->simcall.result.dp;
1803   }
1804   
1805 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
1806     smx_process_t self = SIMIX_process_self();
1807
1808     /* Go to that function to follow the code flow through the simcall barrier */
1809     if (0) SIMIX_storage_get_content(storage);
1810     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1811
1812     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
1813     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1814     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1815     self->simcall.args[0].dp = (void*) storage;
1816     if (self != simix_global->maestro_process) {
1817       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1818                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1819       SIMIX_process_yield(self);
1820     } else {
1821       SIMIX_simcall_handle(&self->simcall, 0);
1822     }    
1823     return (xbt_dict_t) self->simcall.result.dp;
1824   }
1825   
1826 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
1827     smx_process_t self = SIMIX_process_self();
1828
1829     /* Go to that function to follow the code flow through the simcall barrier */
1830     if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
1831     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1832
1833     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
1834     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1835     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1836     self->simcall.args[0].cc = (const char*) name;
1837     if (self != simix_global->maestro_process) {
1838       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1839                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1840       SIMIX_process_yield(self);
1841     } else {
1842       SIMIX_simcall_handle(&self->simcall, 0);
1843     }    
1844     return (xbt_dict_t) self->simcall.result.dp;
1845   }
1846   
1847 inline static int simcall_BODY_mc_random(int min, int max) {
1848     smx_process_t self = SIMIX_process_self();
1849
1850     /* Go to that function to follow the code flow through the simcall barrier */
1851     if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
1852     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1853
1854     self->simcall.call = SIMCALL_MC_RANDOM;
1855     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1856     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1857     self->simcall.args[0].i = (int) min;
1858     self->simcall.args[1].i = (int) max;
1859     if (self != simix_global->maestro_process) {
1860       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1861                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1862       SIMIX_process_yield(self);
1863     } else {
1864       SIMIX_simcall_handle(&self->simcall, 0);
1865     }    
1866     return (int) self->simcall.result.i;
1867   }
1868   
1869 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
1870     smx_process_t self = SIMIX_process_self();
1871
1872     /* Go to that function to follow the code flow through the simcall barrier */
1873     if (0) SIMIX_set_category(synchro, category);
1874     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1875
1876     self->simcall.call = SIMCALL_SET_CATEGORY;
1877     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1878     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1879     self->simcall.args[0].dp = (void*) synchro;
1880     self->simcall.args[1].cc = (const char*) category;
1881     if (self != simix_global->maestro_process) {
1882       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1883                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1884       SIMIX_process_yield(self);
1885     } else {
1886       SIMIX_simcall_handle(&self->simcall, 0);
1887     }    
1888     
1889   }
1890   
1891 inline static void simcall_BODY_run_kernel(void* code) {
1892     smx_process_t self = SIMIX_process_self();
1893
1894     /* Go to that function to follow the code flow through the simcall barrier */
1895     if (0) SIMIX_run_kernel(code);
1896     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1897
1898     self->simcall.call = SIMCALL_RUN_KERNEL;
1899     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1900     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1901     self->simcall.args[0].dp = (void*) code;
1902     if (self != simix_global->maestro_process) {
1903       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1904                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1905       SIMIX_process_yield(self);
1906     } else {
1907       SIMIX_simcall_handle(&self->simcall, 0);
1908     }    
1909     
1910   }
1911 #ifdef HAVE_LATENCY_BOUND_TRACKING
1912   
1913 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
1914     smx_process_t self = SIMIX_process_self();
1915
1916     /* Go to that function to follow the code flow through the simcall barrier */
1917     if (0) SIMIX_comm_is_latency_bounded(comm);
1918     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1919
1920     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
1921     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1922     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1923     self->simcall.args[0].dp = (void*) comm;
1924     if (self != simix_global->maestro_process) {
1925       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1926                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1927       SIMIX_process_yield(self);
1928     } else {
1929       SIMIX_simcall_handle(&self->simcall, 0);
1930     }    
1931     return (int) self->simcall.result.i;
1932   }
1933 #endif
1934
1935 #ifdef HAVE_MC
1936   
1937 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
1938     smx_process_t self = SIMIX_process_self();
1939
1940     /* Go to that function to follow the code flow through the simcall barrier */
1941     if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
1942     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1943
1944     self->simcall.call = SIMCALL_MC_SNAPSHOT;
1945     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1946     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1947
1948     if (self != simix_global->maestro_process) {
1949       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1950                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1951       SIMIX_process_yield(self);
1952     } else {
1953       SIMIX_simcall_handle(&self->simcall, 0);
1954     }    
1955     return (mc_snapshot_t) self->simcall.result.dp;
1956   }
1957   
1958 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
1959     smx_process_t self = SIMIX_process_self();
1960
1961     /* Go to that function to follow the code flow through the simcall barrier */
1962     if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
1963     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1964
1965     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
1966     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1967     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1968     self->simcall.args[0].dp = (void*) s1;
1969     self->simcall.args[1].dp = (void*) s2;
1970     if (self != simix_global->maestro_process) {
1971       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1972                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1973       SIMIX_process_yield(self);
1974     } else {
1975       SIMIX_simcall_handle(&self->simcall, 0);
1976     }    
1977     return (int) self->simcall.result.i;
1978   }
1979 #endif