Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use only the C++ dtor for Synchro::Raw
[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.hpp"
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_cancel(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_cancel(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_CANCEL;
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_set_priority(smx_synchro_t execution, double priority) {
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_set_priority(execution, priority);
424     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
425
426     self->simcall.call = SIMCALL_EXECUTION_SET_PRIORITY;
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     self->simcall.args[1].d = (double) priority;
431     if (self != simix_global->maestro_process) {
432       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
433                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
434       SIMIX_process_yield(self);
435     } else {
436       SIMIX_simcall_handle(&self->simcall, 0);
437     }    
438     
439   }
440   
441 inline static void simcall_BODY_execution_set_bound(smx_synchro_t execution, double bound) {
442     smx_process_t self = SIMIX_process_self();
443
444     /* Go to that function to follow the code flow through the simcall barrier */
445     if (0) SIMIX_execution_set_bound(execution, bound);
446     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
447
448     self->simcall.call = SIMCALL_EXECUTION_SET_BOUND;
449     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
450     memset(self->simcall.args, 0, sizeof(self->simcall.args));
451     self->simcall.args[0].dp = (void*) execution;
452     self->simcall.args[1].d = (double) bound;
453     if (self != simix_global->maestro_process) {
454       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
455                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
456       SIMIX_process_yield(self);
457     } else {
458       SIMIX_simcall_handle(&self->simcall, 0);
459     }    
460     
461   }
462   
463 inline static void simcall_BODY_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
464     smx_process_t self = SIMIX_process_self();
465
466     /* Go to that function to follow the code flow through the simcall barrier */
467     if (0) SIMIX_execution_set_affinity(execution, ws, mask);
468     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
469
470     self->simcall.call = SIMCALL_EXECUTION_SET_AFFINITY;
471     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
472     memset(self->simcall.args, 0, sizeof(self->simcall.args));
473     self->simcall.args[0].dp = (void*) execution;
474     self->simcall.args[1].dp = (void*) ws;
475     self->simcall.args[2].ul = (unsigned long) mask;
476     if (self != simix_global->maestro_process) {
477       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
478                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
479       SIMIX_process_yield(self);
480     } else {
481       SIMIX_simcall_handle(&self->simcall, 0);
482     }    
483     
484   }
485   
486 inline static int simcall_BODY_execution_wait(smx_synchro_t execution) {
487     smx_process_t self = SIMIX_process_self();
488
489     /* Go to that function to follow the code flow through the simcall barrier */
490     if (0) simcall_HANDLER_execution_wait(&self->simcall, execution);
491     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
492
493     self->simcall.call = SIMCALL_EXECUTION_WAIT;
494     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
495     memset(self->simcall.args, 0, sizeof(self->simcall.args));
496     self->simcall.args[0].dp = (void*) execution;
497     if (self != simix_global->maestro_process) {
498       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
499                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
500       SIMIX_process_yield(self);
501     } else {
502       SIMIX_simcall_handle(&self->simcall, 0);
503     }    
504     return (int) self->simcall.result.i;
505   }
506   
507 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
508     smx_process_t self = SIMIX_process_self();
509
510     /* Go to that function to follow the code flow through the simcall barrier */
511     if (0) SIMIX_process_on_exit(process, fun, data);
512     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
513
514     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
515     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
516     memset(self->simcall.args, 0, sizeof(self->simcall.args));
517     self->simcall.args[0].dp = (void*) process;
518     self->simcall.args[1].fp = (FPtr) fun;
519     self->simcall.args[2].dp = (void*) data;
520     if (self != simix_global->maestro_process) {
521       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
522                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
523       SIMIX_process_yield(self);
524     } else {
525       SIMIX_simcall_handle(&self->simcall, 0);
526     }    
527     
528   }
529   
530 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
531     smx_process_t self = SIMIX_process_self();
532
533     /* Go to that function to follow the code flow through the simcall barrier */
534     if (0) SIMIX_process_auto_restart_set(process, auto_restart);
535     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
536
537     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
538     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
539     memset(self->simcall.args, 0, sizeof(self->simcall.args));
540     self->simcall.args[0].dp = (void*) process;
541     self->simcall.args[1].i = (int) auto_restart;
542     if (self != simix_global->maestro_process) {
543       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
544                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
545       SIMIX_process_yield(self);
546     } else {
547       SIMIX_simcall_handle(&self->simcall, 0);
548     }    
549     
550   }
551   
552 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
553     smx_process_t self = SIMIX_process_self();
554
555     /* Go to that function to follow the code flow through the simcall barrier */
556     if (0) simcall_HANDLER_process_restart(&self->simcall, process);
557     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
558
559     self->simcall.call = SIMCALL_PROCESS_RESTART;
560     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
561     memset(self->simcall.args, 0, sizeof(self->simcall.args));
562     self->simcall.args[0].dp = (void*) process;
563     if (self != simix_global->maestro_process) {
564       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
565                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
566       SIMIX_process_yield(self);
567     } else {
568       SIMIX_simcall_handle(&self->simcall, 0);
569     }    
570     return (smx_process_t) self->simcall.result.dp;
571   }
572   
573 inline static smx_mailbox_t simcall_BODY_mbox_create(const char* name) {
574     smx_process_t self = SIMIX_process_self();
575
576     /* Go to that function to follow the code flow through the simcall barrier */
577     if (0) SIMIX_mbox_create(name);
578     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
579
580     self->simcall.call = SIMCALL_MBOX_CREATE;
581     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
582     memset(self->simcall.args, 0, sizeof(self->simcall.args));
583     self->simcall.args[0].cc = (const char*) name;
584     if (self != simix_global->maestro_process) {
585       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
586                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
587       SIMIX_process_yield(self);
588     } else {
589       SIMIX_simcall_handle(&self->simcall, 0);
590     }    
591     return (smx_mailbox_t) self->simcall.result.dp;
592   }
593   
594 inline static void simcall_BODY_mbox_set_receiver(smx_mailbox_t mbox, smx_process_t receiver) {
595     smx_process_t self = SIMIX_process_self();
596
597     /* Go to that function to follow the code flow through the simcall barrier */
598     if (0) SIMIX_mbox_set_receiver(mbox, receiver);
599     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
600
601     self->simcall.call = SIMCALL_MBOX_SET_RECEIVER;
602     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
603     memset(self->simcall.args, 0, sizeof(self->simcall.args));
604     self->simcall.args[0].dp = (void*) mbox;
605     self->simcall.args[1].dp = (void*) receiver;
606     if (self != simix_global->maestro_process) {
607       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
608                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
609       SIMIX_process_yield(self);
610     } else {
611       SIMIX_simcall_handle(&self->simcall, 0);
612     }    
613     
614   }
615   
616 inline static smx_synchro_t simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
617     smx_process_t self = SIMIX_process_self();
618
619     /* Go to that function to follow the code flow through the simcall barrier */
620     if (0) simcall_HANDLER_comm_iprobe(&self->simcall, mbox, type, src, tag, match_fun, data);
621     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
622
623     self->simcall.call = SIMCALL_COMM_IPROBE;
624     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
625     memset(self->simcall.args, 0, sizeof(self->simcall.args));
626     self->simcall.args[0].dp = (void*) mbox;
627     self->simcall.args[1].i = (int) type;
628     self->simcall.args[2].i = (int) src;
629     self->simcall.args[3].i = (int) tag;
630     self->simcall.args[4].fp = (FPtr) match_fun;
631     self->simcall.args[5].dp = (void*) data;
632     if (self != simix_global->maestro_process) {
633       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
634                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
635       SIMIX_process_yield(self);
636     } else {
637       SIMIX_simcall_handle(&self->simcall, 0);
638     }    
639     return (smx_synchro_t) self->simcall.result.dp;
640   }
641   
642 inline static void simcall_BODY_comm_send(smx_process_t sender, smx_mailbox_t mbox, 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) {
643     smx_process_t self = SIMIX_process_self();
644
645     /* Go to that function to follow the code flow through the simcall barrier */
646     if (0) simcall_HANDLER_comm_send(&self->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
647     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
648
649     self->simcall.call = SIMCALL_COMM_SEND;
650     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
651     memset(self->simcall.args, 0, sizeof(self->simcall.args));
652     self->simcall.args[0].dp = (void*) sender;
653     self->simcall.args[1].dp = (void*) mbox;
654     self->simcall.args[2].d = (double) task_size;
655     self->simcall.args[3].d = (double) rate;
656     self->simcall.args[4].dp = (void*) src_buff;
657     self->simcall.args[5].sz = (size_t) src_buff_size;
658     self->simcall.args[6].fp = (FPtr) match_fun;
659     self->simcall.args[7].fp = (FPtr) copy_data_fun;
660     self->simcall.args[8].dp = (void*) data;
661     self->simcall.args[9].d = (double) timeout;
662     if (self != simix_global->maestro_process) {
663       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
664                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
665       SIMIX_process_yield(self);
666     } else {
667       SIMIX_simcall_handle(&self->simcall, 0);
668     }    
669     
670   }
671   
672 inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t sender, smx_mailbox_t mbox, 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) {
673     smx_process_t self = SIMIX_process_self();
674
675     /* Go to that function to follow the code flow through the simcall barrier */
676     if (0) simcall_HANDLER_comm_isend(&self->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
677     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
678
679     self->simcall.call = SIMCALL_COMM_ISEND;
680     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
681     memset(self->simcall.args, 0, sizeof(self->simcall.args));
682     self->simcall.args[0].dp = (void*) sender;
683     self->simcall.args[1].dp = (void*) mbox;
684     self->simcall.args[2].d = (double) task_size;
685     self->simcall.args[3].d = (double) rate;
686     self->simcall.args[4].dp = (void*) src_buff;
687     self->simcall.args[5].sz = (size_t) src_buff_size;
688     self->simcall.args[6].fp = (FPtr) match_fun;
689     self->simcall.args[7].fp = (FPtr) clean_fun;
690     self->simcall.args[8].fp = (FPtr) copy_data_fun;
691     self->simcall.args[9].dp = (void*) data;
692     self->simcall.args[10].i = (int) detached;
693     if (self != simix_global->maestro_process) {
694       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
695                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
696       SIMIX_process_yield(self);
697     } else {
698       SIMIX_simcall_handle(&self->simcall, 0);
699     }    
700     return (smx_synchro_t) self->simcall.result.dp;
701   }
702   
703 inline static void simcall_BODY_comm_recv(smx_process_t receiver, smx_mailbox_t mbox, 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) {
704     smx_process_t self = SIMIX_process_self();
705
706     /* Go to that function to follow the code flow through the simcall barrier */
707     if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
708     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
709
710     self->simcall.call = SIMCALL_COMM_RECV;
711     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
712     memset(self->simcall.args, 0, sizeof(self->simcall.args));
713     self->simcall.args[0].dp = (void*) receiver;
714     self->simcall.args[1].dp = (void*) mbox;
715     self->simcall.args[2].dp = (void*) dst_buff;
716     self->simcall.args[3].dp = (void*) dst_buff_size;
717     self->simcall.args[4].fp = (FPtr) match_fun;
718     self->simcall.args[5].fp = (FPtr) copy_data_fun;
719     self->simcall.args[6].dp = (void*) data;
720     self->simcall.args[7].d = (double) timeout;
721     self->simcall.args[8].d = (double) rate;
722     if (self != simix_global->maestro_process) {
723       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
724                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
725       SIMIX_process_yield(self);
726     } else {
727       SIMIX_simcall_handle(&self->simcall, 0);
728     }    
729     
730   }
731   
732 inline static smx_synchro_t simcall_BODY_comm_irecv(smx_process_t receiver, smx_mailbox_t mbox, 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) {
733     smx_process_t self = SIMIX_process_self();
734
735     /* Go to that function to follow the code flow through the simcall barrier */
736     if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
737     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
738
739     self->simcall.call = SIMCALL_COMM_IRECV;
740     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
741     memset(self->simcall.args, 0, sizeof(self->simcall.args));
742     self->simcall.args[0].dp = (void*) receiver;
743     self->simcall.args[1].dp = (void*) mbox;
744     self->simcall.args[2].dp = (void*) dst_buff;
745     self->simcall.args[3].dp = (void*) dst_buff_size;
746     self->simcall.args[4].fp = (FPtr) match_fun;
747     self->simcall.args[5].fp = (FPtr) copy_data_fun;
748     self->simcall.args[6].dp = (void*) data;
749     self->simcall.args[7].d = (double) rate;
750     if (self != simix_global->maestro_process) {
751       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
752                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
753       SIMIX_process_yield(self);
754     } else {
755       SIMIX_simcall_handle(&self->simcall, 0);
756     }    
757     return (smx_synchro_t) self->simcall.result.dp;
758   }
759   
760 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
761     smx_process_t self = SIMIX_process_self();
762
763     /* Go to that function to follow the code flow through the simcall barrier */
764     if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
765     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
766
767     self->simcall.call = SIMCALL_COMM_WAITANY;
768     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
769     memset(self->simcall.args, 0, sizeof(self->simcall.args));
770     self->simcall.args[0].dp = (void*) comms;
771     if (self != simix_global->maestro_process) {
772       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
773                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
774       SIMIX_process_yield(self);
775     } else {
776       SIMIX_simcall_handle(&self->simcall, 0);
777     }    
778     return (int) self->simcall.result.i;
779   }
780   
781 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
782     smx_process_t self = SIMIX_process_self();
783
784     /* Go to that function to follow the code flow through the simcall barrier */
785     if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
786     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
787
788     self->simcall.call = SIMCALL_COMM_WAIT;
789     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
790     memset(self->simcall.args, 0, sizeof(self->simcall.args));
791     self->simcall.args[0].dp = (void*) comm;
792     self->simcall.args[1].d = (double) timeout;
793     if (self != simix_global->maestro_process) {
794       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
795                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
796       SIMIX_process_yield(self);
797     } else {
798       SIMIX_simcall_handle(&self->simcall, 0);
799     }    
800     
801   }
802   
803 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
804     smx_process_t self = SIMIX_process_self();
805
806     /* Go to that function to follow the code flow through the simcall barrier */
807     if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
808     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
809
810     self->simcall.call = SIMCALL_COMM_TEST;
811     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
812     memset(self->simcall.args, 0, sizeof(self->simcall.args));
813     self->simcall.args[0].dp = (void*) comm;
814     if (self != simix_global->maestro_process) {
815       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
816                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
817       SIMIX_process_yield(self);
818     } else {
819       SIMIX_simcall_handle(&self->simcall, 0);
820     }    
821     return (int) self->simcall.result.i;
822   }
823   
824 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
825     smx_process_t self = SIMIX_process_self();
826
827     /* Go to that function to follow the code flow through the simcall barrier */
828     if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
829     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
830
831     self->simcall.call = SIMCALL_COMM_TESTANY;
832     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
833     memset(self->simcall.args, 0, sizeof(self->simcall.args));
834     self->simcall.args[0].dp = (void*) comms;
835     if (self != simix_global->maestro_process) {
836       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
837                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
838       SIMIX_process_yield(self);
839     } else {
840       SIMIX_simcall_handle(&self->simcall, 0);
841     }    
842     return (int) self->simcall.result.i;
843   }
844   
845 inline static smx_mutex_t simcall_BODY_mutex_init() {
846     smx_process_t self = SIMIX_process_self();
847
848     /* Go to that function to follow the code flow through the simcall barrier */
849     if (0) simcall_HANDLER_mutex_init(&self->simcall);
850     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
851
852     self->simcall.call = SIMCALL_MUTEX_INIT;
853     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
854     memset(self->simcall.args, 0, sizeof(self->simcall.args));
855
856     if (self != simix_global->maestro_process) {
857       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
858                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
859       SIMIX_process_yield(self);
860     } else {
861       SIMIX_simcall_handle(&self->simcall, 0);
862     }    
863     return (smx_mutex_t) self->simcall.result.dp;
864   }
865   
866 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
867     smx_process_t self = SIMIX_process_self();
868
869     /* Go to that function to follow the code flow through the simcall barrier */
870     if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
871     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
872
873     self->simcall.call = SIMCALL_MUTEX_LOCK;
874     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
875     memset(self->simcall.args, 0, sizeof(self->simcall.args));
876     self->simcall.args[0].dp = (void*) mutex;
877     if (self != simix_global->maestro_process) {
878       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
879                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
880       SIMIX_process_yield(self);
881     } else {
882       SIMIX_simcall_handle(&self->simcall, 0);
883     }    
884     
885   }
886   
887 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
888     smx_process_t self = SIMIX_process_self();
889
890     /* Go to that function to follow the code flow through the simcall barrier */
891     if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
892     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
893
894     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
895     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
896     memset(self->simcall.args, 0, sizeof(self->simcall.args));
897     self->simcall.args[0].dp = (void*) mutex;
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 (int) self->simcall.result.i;
906   }
907   
908 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
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) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
913     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
914
915     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
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*) mutex;
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 smx_cond_t simcall_BODY_cond_init() {
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) SIMIX_cond_init();
934     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
935
936     self->simcall.call = SIMCALL_COND_INIT;
937     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
938     memset(self->simcall.args, 0, sizeof(self->simcall.args));
939
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 (smx_cond_t) self->simcall.result.dp;
948   }
949   
950 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
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) SIMIX_cond_signal(cond);
955     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
956
957     self->simcall.call = SIMCALL_COND_SIGNAL;
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*) cond;
961     if (self != simix_global->maestro_process) {
962       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
963                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
964       SIMIX_process_yield(self);
965     } else {
966       SIMIX_simcall_handle(&self->simcall, 0);
967     }    
968     
969   }
970   
971 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
972     smx_process_t self = SIMIX_process_self();
973
974     /* Go to that function to follow the code flow through the simcall barrier */
975     if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
976     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
977
978     self->simcall.call = SIMCALL_COND_WAIT;
979     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
980     memset(self->simcall.args, 0, sizeof(self->simcall.args));
981     self->simcall.args[0].dp = (void*) cond;
982     self->simcall.args[1].dp = (void*) mutex;
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     
991   }
992   
993 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
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_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
998     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
999
1000     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
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*) cond;
1004     self->simcall.args[1].dp = (void*) mutex;
1005     self->simcall.args[2].d = (double) timeout;
1006     if (self != simix_global->maestro_process) {
1007       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1008                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1009       SIMIX_process_yield(self);
1010     } else {
1011       SIMIX_simcall_handle(&self->simcall, 0);
1012     }    
1013     
1014   }
1015   
1016 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1017     smx_process_t self = SIMIX_process_self();
1018
1019     /* Go to that function to follow the code flow through the simcall barrier */
1020     if (0) SIMIX_cond_broadcast(cond);
1021     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1022
1023     self->simcall.call = SIMCALL_COND_BROADCAST;
1024     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1025     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1026     self->simcall.args[0].dp = (void*) cond;
1027     if (self != simix_global->maestro_process) {
1028       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1029                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1030       SIMIX_process_yield(self);
1031     } else {
1032       SIMIX_simcall_handle(&self->simcall, 0);
1033     }    
1034     
1035   }
1036   
1037 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
1038     smx_process_t self = SIMIX_process_self();
1039
1040     /* Go to that function to follow the code flow through the simcall barrier */
1041     if (0) SIMIX_sem_init(capacity);
1042     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1043
1044     self->simcall.call = SIMCALL_SEM_INIT;
1045     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1046     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1047     self->simcall.args[0].ui = (unsigned int) capacity;
1048     if (self != simix_global->maestro_process) {
1049       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1050                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1051       SIMIX_process_yield(self);
1052     } else {
1053       SIMIX_simcall_handle(&self->simcall, 0);
1054     }    
1055     return (smx_sem_t) self->simcall.result.dp;
1056   }
1057   
1058 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
1059     smx_process_t self = SIMIX_process_self();
1060
1061     /* Go to that function to follow the code flow through the simcall barrier */
1062     if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
1063     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1064
1065     self->simcall.call = SIMCALL_SEM_RELEASE;
1066     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1067     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1068     self->simcall.args[0].dp = (void*) sem;
1069     if (self != simix_global->maestro_process) {
1070       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1071                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1072       SIMIX_process_yield(self);
1073     } else {
1074       SIMIX_simcall_handle(&self->simcall, 0);
1075     }    
1076     
1077   }
1078   
1079 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
1080     smx_process_t self = SIMIX_process_self();
1081
1082     /* Go to that function to follow the code flow through the simcall barrier */
1083     if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
1084     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1085
1086     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
1087     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1088     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1089     self->simcall.args[0].dp = (void*) sem;
1090     if (self != simix_global->maestro_process) {
1091       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1092                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1093       SIMIX_process_yield(self);
1094     } else {
1095       SIMIX_simcall_handle(&self->simcall, 0);
1096     }    
1097     return (int) self->simcall.result.i;
1098   }
1099   
1100 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
1101     smx_process_t self = SIMIX_process_self();
1102
1103     /* Go to that function to follow the code flow through the simcall barrier */
1104     if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
1105     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1106
1107     self->simcall.call = SIMCALL_SEM_ACQUIRE;
1108     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1109     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1110     self->simcall.args[0].dp = (void*) sem;
1111     if (self != simix_global->maestro_process) {
1112       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1113                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1114       SIMIX_process_yield(self);
1115     } else {
1116       SIMIX_simcall_handle(&self->simcall, 0);
1117     }    
1118     
1119   }
1120   
1121 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
1122     smx_process_t self = SIMIX_process_self();
1123
1124     /* Go to that function to follow the code flow through the simcall barrier */
1125     if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
1126     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1127
1128     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
1129     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1130     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1131     self->simcall.args[0].dp = (void*) sem;
1132     self->simcall.args[1].d = (double) timeout;
1133     if (self != simix_global->maestro_process) {
1134       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1135                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1136       SIMIX_process_yield(self);
1137     } else {
1138       SIMIX_simcall_handle(&self->simcall, 0);
1139     }    
1140     
1141   }
1142   
1143 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
1144     smx_process_t self = SIMIX_process_self();
1145
1146     /* Go to that function to follow the code flow through the simcall barrier */
1147     if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
1148     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1149
1150     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
1151     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1152     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1153     self->simcall.args[0].dp = (void*) sem;
1154     if (self != simix_global->maestro_process) {
1155       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1156                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1157       SIMIX_process_yield(self);
1158     } else {
1159       SIMIX_simcall_handle(&self->simcall, 0);
1160     }    
1161     return (int) self->simcall.result.i;
1162   }
1163   
1164 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
1165     smx_process_t self = SIMIX_process_self();
1166
1167     /* Go to that function to follow the code flow through the simcall barrier */
1168     if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
1169     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1170
1171     self->simcall.call = SIMCALL_FILE_READ;
1172     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1173     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1174     self->simcall.args[0].dp = (void*) fd;
1175     self->simcall.args[1].sgsz = (sg_size_t) size;
1176     self->simcall.args[2].dp = (void*) host;
1177     if (self != simix_global->maestro_process) {
1178       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1179                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1180       SIMIX_process_yield(self);
1181     } else {
1182       SIMIX_simcall_handle(&self->simcall, 0);
1183     }    
1184     return (sg_size_t) self->simcall.result.sgsz;
1185   }
1186   
1187 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
1188     smx_process_t self = SIMIX_process_self();
1189
1190     /* Go to that function to follow the code flow through the simcall barrier */
1191     if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
1192     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1193
1194     self->simcall.call = SIMCALL_FILE_WRITE;
1195     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1196     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1197     self->simcall.args[0].dp = (void*) fd;
1198     self->simcall.args[1].sgsz = (sg_size_t) size;
1199     self->simcall.args[2].dp = (void*) host;
1200     if (self != simix_global->maestro_process) {
1201       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1202                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1203       SIMIX_process_yield(self);
1204     } else {
1205       SIMIX_simcall_handle(&self->simcall, 0);
1206     }    
1207     return (sg_size_t) self->simcall.result.sgsz;
1208   }
1209   
1210 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
1211     smx_process_t self = SIMIX_process_self();
1212
1213     /* Go to that function to follow the code flow through the simcall barrier */
1214     if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
1215     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1216
1217     self->simcall.call = SIMCALL_FILE_OPEN;
1218     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1219     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1220     self->simcall.args[0].cc = (const char*) fullpath;
1221     self->simcall.args[1].dp = (void*) host;
1222     if (self != simix_global->maestro_process) {
1223       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1224                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1225       SIMIX_process_yield(self);
1226     } else {
1227       SIMIX_simcall_handle(&self->simcall, 0);
1228     }    
1229     return (smx_file_t) self->simcall.result.dp;
1230   }
1231   
1232 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
1233     smx_process_t self = SIMIX_process_self();
1234
1235     /* Go to that function to follow the code flow through the simcall barrier */
1236     if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
1237     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1238
1239     self->simcall.call = SIMCALL_FILE_CLOSE;
1240     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1241     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1242     self->simcall.args[0].dp = (void*) fd;
1243     self->simcall.args[1].dp = (void*) host;
1244     if (self != simix_global->maestro_process) {
1245       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1246                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1247       SIMIX_process_yield(self);
1248     } else {
1249       SIMIX_simcall_handle(&self->simcall, 0);
1250     }    
1251     return (int) self->simcall.result.i;
1252   }
1253   
1254 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
1255     smx_process_t self = SIMIX_process_self();
1256
1257     /* Go to that function to follow the code flow through the simcall barrier */
1258     if (0) SIMIX_file_unlink(fd, host);
1259     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1260
1261     self->simcall.call = SIMCALL_FILE_UNLINK;
1262     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1263     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1264     self->simcall.args[0].dp = (void*) fd;
1265     self->simcall.args[1].dp = (void*) host;
1266     if (self != simix_global->maestro_process) {
1267       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1268                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1269       SIMIX_process_yield(self);
1270     } else {
1271       SIMIX_simcall_handle(&self->simcall, 0);
1272     }    
1273     return (int) self->simcall.result.i;
1274   }
1275   
1276 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
1277     smx_process_t self = SIMIX_process_self();
1278
1279     /* Go to that function to follow the code flow through the simcall barrier */
1280     if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
1281     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1282
1283     self->simcall.call = SIMCALL_FILE_GET_SIZE;
1284     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1285     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1286     self->simcall.args[0].dp = (void*) fd;
1287     if (self != simix_global->maestro_process) {
1288       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1289                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1290       SIMIX_process_yield(self);
1291     } else {
1292       SIMIX_simcall_handle(&self->simcall, 0);
1293     }    
1294     return (sg_size_t) self->simcall.result.sgsz;
1295   }
1296   
1297 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
1298     smx_process_t self = SIMIX_process_self();
1299
1300     /* Go to that function to follow the code flow through the simcall barrier */
1301     if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
1302     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1303
1304     self->simcall.call = SIMCALL_FILE_TELL;
1305     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1306     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1307     self->simcall.args[0].dp = (void*) fd;
1308     if (self != simix_global->maestro_process) {
1309       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1310                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1311       SIMIX_process_yield(self);
1312     } else {
1313       SIMIX_simcall_handle(&self->simcall, 0);
1314     }    
1315     return (sg_size_t) self->simcall.result.sgsz;
1316   }
1317   
1318 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
1319     smx_process_t self = SIMIX_process_self();
1320
1321     /* Go to that function to follow the code flow through the simcall barrier */
1322     if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
1323     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1324
1325     self->simcall.call = SIMCALL_FILE_SEEK;
1326     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1327     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1328     self->simcall.args[0].dp = (void*) fd;
1329     self->simcall.args[1].sgoff = (sg_offset_t) offset;
1330     self->simcall.args[2].i = (int) origin;
1331     if (self != simix_global->maestro_process) {
1332       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1333                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1334       SIMIX_process_yield(self);
1335     } else {
1336       SIMIX_simcall_handle(&self->simcall, 0);
1337     }    
1338     return (int) self->simcall.result.i;
1339   }
1340   
1341 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
1342     smx_process_t self = SIMIX_process_self();
1343
1344     /* Go to that function to follow the code flow through the simcall barrier */
1345     if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
1346     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1347
1348     self->simcall.call = SIMCALL_FILE_GET_INFO;
1349     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1350     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1351     self->simcall.args[0].dp = (void*) fd;
1352     if (self != simix_global->maestro_process) {
1353       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1354                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1355       SIMIX_process_yield(self);
1356     } else {
1357       SIMIX_simcall_handle(&self->simcall, 0);
1358     }    
1359     return (xbt_dynar_t) self->simcall.result.dp;
1360   }
1361   
1362 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
1363     smx_process_t self = SIMIX_process_self();
1364
1365     /* Go to that function to follow the code flow through the simcall barrier */
1366     if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
1367     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1368
1369     self->simcall.call = SIMCALL_FILE_MOVE;
1370     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1371     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1372     self->simcall.args[0].dp = (void*) fd;
1373     self->simcall.args[1].cc = (const char*) fullpath;
1374     if (self != simix_global->maestro_process) {
1375       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1376                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1377       SIMIX_process_yield(self);
1378     } else {
1379       SIMIX_simcall_handle(&self->simcall, 0);
1380     }    
1381     return (int) self->simcall.result.i;
1382   }
1383   
1384 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
1385     smx_process_t self = SIMIX_process_self();
1386
1387     /* Go to that function to follow the code flow through the simcall barrier */
1388     if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
1389     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1390
1391     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
1392     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1393     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1394     self->simcall.args[0].dp = (void*) storage;
1395     if (self != simix_global->maestro_process) {
1396       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1397                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1398       SIMIX_process_yield(self);
1399     } else {
1400       SIMIX_simcall_handle(&self->simcall, 0);
1401     }    
1402     return (sg_size_t) self->simcall.result.sgsz;
1403   }
1404   
1405 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
1406     smx_process_t self = SIMIX_process_self();
1407
1408     /* Go to that function to follow the code flow through the simcall barrier */
1409     if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
1410     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1411
1412     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
1413     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1414     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1415     self->simcall.args[0].dp = (void*) name;
1416     if (self != simix_global->maestro_process) {
1417       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1418                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1419       SIMIX_process_yield(self);
1420     } else {
1421       SIMIX_simcall_handle(&self->simcall, 0);
1422     }    
1423     return (sg_size_t) self->simcall.result.sgsz;
1424   }
1425   
1426 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
1427     smx_process_t self = SIMIX_process_self();
1428
1429     /* Go to that function to follow the code flow through the simcall barrier */
1430     if (0) SIMIX_storage_get_properties(storage);
1431     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1432
1433     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
1434     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1435     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1436     self->simcall.args[0].dp = (void*) storage;
1437     if (self != simix_global->maestro_process) {
1438       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1439                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1440       SIMIX_process_yield(self);
1441     } else {
1442       SIMIX_simcall_handle(&self->simcall, 0);
1443     }    
1444     return (xbt_dict_t) self->simcall.result.dp;
1445   }
1446   
1447 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
1448     smx_process_t self = SIMIX_process_self();
1449
1450     /* Go to that function to follow the code flow through the simcall barrier */
1451     if (0) SIMIX_storage_get_content(storage);
1452     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1453
1454     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
1455     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1456     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1457     self->simcall.args[0].dp = (void*) storage;
1458     if (self != simix_global->maestro_process) {
1459       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1460                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1461       SIMIX_process_yield(self);
1462     } else {
1463       SIMIX_simcall_handle(&self->simcall, 0);
1464     }    
1465     return (xbt_dict_t) self->simcall.result.dp;
1466   }
1467   
1468 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
1469     smx_process_t self = SIMIX_process_self();
1470
1471     /* Go to that function to follow the code flow through the simcall barrier */
1472     if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
1473     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1474
1475     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
1476     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1477     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1478     self->simcall.args[0].cc = (const char*) name;
1479     if (self != simix_global->maestro_process) {
1480       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1481                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1482       SIMIX_process_yield(self);
1483     } else {
1484       SIMIX_simcall_handle(&self->simcall, 0);
1485     }    
1486     return (xbt_dict_t) self->simcall.result.dp;
1487   }
1488   
1489 inline static int simcall_BODY_mc_random(int min, int max) {
1490     smx_process_t self = SIMIX_process_self();
1491
1492     /* Go to that function to follow the code flow through the simcall barrier */
1493     if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
1494     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1495
1496     self->simcall.call = SIMCALL_MC_RANDOM;
1497     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1498     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1499     self->simcall.args[0].i = (int) min;
1500     self->simcall.args[1].i = (int) max;
1501     if (self != simix_global->maestro_process) {
1502       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1503                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1504       SIMIX_process_yield(self);
1505     } else {
1506       SIMIX_simcall_handle(&self->simcall, 0);
1507     }    
1508     return (int) self->simcall.result.i;
1509   }
1510   
1511 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
1512     smx_process_t self = SIMIX_process_self();
1513
1514     /* Go to that function to follow the code flow through the simcall barrier */
1515     if (0) SIMIX_set_category(synchro, category);
1516     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1517
1518     self->simcall.call = SIMCALL_SET_CATEGORY;
1519     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1520     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1521     self->simcall.args[0].dp = (void*) synchro;
1522     self->simcall.args[1].cc = (const char*) category;
1523     if (self != simix_global->maestro_process) {
1524       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1525                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1526       SIMIX_process_yield(self);
1527     } else {
1528       SIMIX_simcall_handle(&self->simcall, 0);
1529     }    
1530     
1531   }
1532   
1533 inline static void simcall_BODY_run_kernel(void* code) {
1534     smx_process_t self = SIMIX_process_self();
1535
1536     /* Go to that function to follow the code flow through the simcall barrier */
1537     if (0) SIMIX_run_kernel(code);
1538     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1539
1540     self->simcall.call = SIMCALL_RUN_KERNEL;
1541     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1542     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1543     self->simcall.args[0].dp = (void*) code;
1544     if (self != simix_global->maestro_process) {
1545       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1546                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1547       SIMIX_process_yield(self);
1548     } else {
1549       SIMIX_simcall_handle(&self->simcall, 0);
1550     }    
1551     
1552   }