Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
94941814421e7c3b9c4b621a89277a71874aa3a2
[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 /** @cond */ // Please Doxygen, don't look at this
21   
22 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
23     smx_process_t self = SIMIX_process_self();
24
25     /* Go to that function to follow the code flow through the simcall barrier */
26     if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
27     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
28
29     self->simcall.call = SIMCALL_VM_SUSPEND;
30     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
31     memset(self->simcall.args, 0, sizeof(self->simcall.args));
32     self->simcall.args[0].dp = (void*) ind_vm;
33     if (self != simix_global->maestro_process) {
34       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
35                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
36       SIMIX_process_yield(self);
37     } else {
38       SIMIX_simcall_handle(&self->simcall, 0);
39     }    
40     
41   }
42   
43 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
44     smx_process_t self = SIMIX_process_self();
45
46     /* Go to that function to follow the code flow through the simcall barrier */
47     if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
48     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
49
50     self->simcall.call = SIMCALL_VM_RESUME;
51     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
52     memset(self->simcall.args, 0, sizeof(self->simcall.args));
53     self->simcall.args[0].dp = (void*) ind_vm;
54     if (self != simix_global->maestro_process) {
55       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
56                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
57       SIMIX_process_yield(self);
58     } else {
59       SIMIX_simcall_handle(&self->simcall, 0);
60     }    
61     
62   }
63   
64 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
65     smx_process_t self = SIMIX_process_self();
66
67     /* Go to that function to follow the code flow through the simcall barrier */
68     if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
69     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
70
71     self->simcall.call = SIMCALL_VM_SHUTDOWN;
72     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
73     memset(self->simcall.args, 0, sizeof(self->simcall.args));
74     self->simcall.args[0].dp = (void*) ind_vm;
75     if (self != simix_global->maestro_process) {
76       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
77                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
78       SIMIX_process_yield(self);
79     } else {
80       SIMIX_simcall_handle(&self->simcall, 0);
81     }    
82     
83   }
84   
85 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
86     smx_process_t self = SIMIX_process_self();
87
88     /* Go to that function to follow the code flow through the simcall barrier */
89     if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
90     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
91
92     self->simcall.call = SIMCALL_VM_SAVE;
93     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
94     memset(self->simcall.args, 0, sizeof(self->simcall.args));
95     self->simcall.args[0].dp = (void*) ind_vm;
96     if (self != simix_global->maestro_process) {
97       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
98                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
99       SIMIX_process_yield(self);
100     } else {
101       SIMIX_simcall_handle(&self->simcall, 0);
102     }    
103     
104   }
105   
106 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
107     smx_process_t self = SIMIX_process_self();
108
109     /* Go to that function to follow the code flow through the simcall barrier */
110     if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
111     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
112
113     self->simcall.call = SIMCALL_VM_RESTORE;
114     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
115     memset(self->simcall.args, 0, sizeof(self->simcall.args));
116     self->simcall.args[0].dp = (void*) ind_vm;
117     if (self != simix_global->maestro_process) {
118       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
119                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
120       SIMIX_process_yield(self);
121     } else {
122       SIMIX_simcall_handle(&self->simcall, 0);
123     }    
124     
125   }
126   
127 inline static void simcall_BODY_process_kill(smx_process_t process) {
128     smx_process_t self = SIMIX_process_self();
129
130     /* Go to that function to follow the code flow through the simcall barrier */
131     if (0) simcall_HANDLER_process_kill(&self->simcall, process);
132     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
133
134     self->simcall.call = SIMCALL_PROCESS_KILL;
135     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
136     memset(self->simcall.args, 0, sizeof(self->simcall.args));
137     self->simcall.args[0].dp = (void*) process;
138     if (self != simix_global->maestro_process) {
139       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
140                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
141       SIMIX_process_yield(self);
142     } else {
143       SIMIX_simcall_handle(&self->simcall, 0);
144     }    
145     
146   }
147   
148 inline static void simcall_BODY_process_killall(int reset_pid) {
149     smx_process_t self = SIMIX_process_self();
150
151     /* Go to that function to follow the code flow through the simcall barrier */
152     if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
153     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
154
155     self->simcall.call = SIMCALL_PROCESS_KILLALL;
156     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
157     memset(self->simcall.args, 0, sizeof(self->simcall.args));
158     self->simcall.args[0].i = (int) reset_pid;
159     if (self != simix_global->maestro_process) {
160       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
161                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
162       SIMIX_process_yield(self);
163     } else {
164       SIMIX_simcall_handle(&self->simcall, 0);
165     }    
166     
167   }
168   
169 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
170     smx_process_t self = SIMIX_process_self();
171
172     /* Go to that function to follow the code flow through the simcall barrier */
173     if (0) SIMIX_process_cleanup(process);
174     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
175
176     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
177     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
178     memset(self->simcall.args, 0, sizeof(self->simcall.args));
179     self->simcall.args[0].dp = (void*) process;
180     if (self != simix_global->maestro_process) {
181       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
182                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
183       SIMIX_process_yield(self);
184     } else {
185       SIMIX_simcall_handle(&self->simcall, 0);
186     }    
187     
188   }
189   
190 inline static void simcall_BODY_process_suspend(smx_process_t process) {
191     smx_process_t self = SIMIX_process_self();
192
193     /* Go to that function to follow the code flow through the simcall barrier */
194     if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
195     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
196
197     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
198     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
199     memset(self->simcall.args, 0, sizeof(self->simcall.args));
200     self->simcall.args[0].dp = (void*) process;
201     if (self != simix_global->maestro_process) {
202       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
203                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
204       SIMIX_process_yield(self);
205     } else {
206       SIMIX_simcall_handle(&self->simcall, 0);
207     }    
208     
209   }
210   
211 inline static void simcall_BODY_process_resume(smx_process_t process) {
212     smx_process_t self = SIMIX_process_self();
213
214     /* Go to that function to follow the code flow through the simcall barrier */
215     if (0) simcall_HANDLER_process_resume(&self->simcall, process);
216     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
217
218     self->simcall.call = SIMCALL_PROCESS_RESUME;
219     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
220     memset(self->simcall.args, 0, sizeof(self->simcall.args));
221     self->simcall.args[0].dp = (void*) process;
222     if (self != simix_global->maestro_process) {
223       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
224                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
225       SIMIX_process_yield(self);
226     } else {
227       SIMIX_simcall_handle(&self->simcall, 0);
228     }    
229     
230   }
231   
232 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
233     smx_process_t self = SIMIX_process_self();
234
235     /* Go to that function to follow the code flow through the simcall barrier */
236     if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
237     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
238
239     self->simcall.call = SIMCALL_PROCESS_SET_HOST;
240     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
241     memset(self->simcall.args, 0, sizeof(self->simcall.args));
242     self->simcall.args[0].dp = (void*) process;
243     self->simcall.args[1].dp = (void*) dest;
244     if (self != simix_global->maestro_process) {
245       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
246                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
247       SIMIX_process_yield(self);
248     } else {
249       SIMIX_simcall_handle(&self->simcall, 0);
250     }    
251     
252   }
253   
254 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
255     smx_process_t self = SIMIX_process_self();
256
257     /* Go to that function to follow the code flow through the simcall barrier */
258     if (0) SIMIX_process_is_suspended(process);
259     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
260
261     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
262     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
263     memset(self->simcall.args, 0, sizeof(self->simcall.args));
264     self->simcall.args[0].dp = (void*) process;
265     if (self != simix_global->maestro_process) {
266       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
267                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
268       SIMIX_process_yield(self);
269     } else {
270       SIMIX_simcall_handle(&self->simcall, 0);
271     }    
272     return (int) self->simcall.result.i;
273   }
274   
275 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
276     smx_process_t self = SIMIX_process_self();
277
278     /* Go to that function to follow the code flow through the simcall barrier */
279     if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
280     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
281
282     self->simcall.call = SIMCALL_PROCESS_JOIN;
283     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
284     memset(self->simcall.args, 0, sizeof(self->simcall.args));
285     self->simcall.args[0].dp = (void*) process;
286     self->simcall.args[1].d = (double) timeout;
287     if (self != simix_global->maestro_process) {
288       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
289                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
290       SIMIX_process_yield(self);
291     } else {
292       SIMIX_simcall_handle(&self->simcall, 0);
293     }    
294     return (int) self->simcall.result.i;
295   }
296   
297 inline static int simcall_BODY_process_sleep(double duration) {
298     smx_process_t self = SIMIX_process_self();
299
300     /* Go to that function to follow the code flow through the simcall barrier */
301     if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
302     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
303
304     self->simcall.call = SIMCALL_PROCESS_SLEEP;
305     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
306     memset(self->simcall.args, 0, sizeof(self->simcall.args));
307     self->simcall.args[0].d = (double) duration;
308     if (self != simix_global->maestro_process) {
309       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
310                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
311       SIMIX_process_yield(self);
312     } else {
313       SIMIX_simcall_handle(&self->simcall, 0);
314     }    
315     return (int) self->simcall.result.i;
316   }
317   
318 inline static smx_synchro_t simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
319     smx_process_t self = SIMIX_process_self();
320
321     /* Go to that function to follow the code flow through the simcall barrier */
322     if (0) simcall_HANDLER_execution_start(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
323     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
324
325     self->simcall.call = SIMCALL_EXECUTION_START;
326     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
327     memset(self->simcall.args, 0, sizeof(self->simcall.args));
328     self->simcall.args[0].cc = (const char*) name;
329     self->simcall.args[1].d = (double) flops_amount;
330     self->simcall.args[2].d = (double) priority;
331     self->simcall.args[3].d = (double) bound;
332     self->simcall.args[4].ul = (unsigned long) affinity_mask;
333     if (self != simix_global->maestro_process) {
334       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
335                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
336       SIMIX_process_yield(self);
337     } else {
338       SIMIX_simcall_handle(&self->simcall, 0);
339     }    
340     return (smx_synchro_t) self->simcall.result.dp;
341   }
342   
343 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) {
344     smx_process_t self = SIMIX_process_self();
345
346     /* Go to that function to follow the code flow through the simcall barrier */
347     if (0) SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
348     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
349
350     self->simcall.call = SIMCALL_EXECUTION_PARALLEL_START;
351     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
352     memset(self->simcall.args, 0, sizeof(self->simcall.args));
353     self->simcall.args[0].cc = (const char*) name;
354     self->simcall.args[1].i = (int) host_nb;
355     self->simcall.args[2].dp = (void*) host_list;
356     self->simcall.args[3].dp = (void*) flops_amount;
357     self->simcall.args[4].dp = (void*) bytes_amount;
358     self->simcall.args[5].d = (double) amount;
359     self->simcall.args[6].d = (double) rate;
360     if (self != simix_global->maestro_process) {
361       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
362                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
363       SIMIX_process_yield(self);
364     } else {
365       SIMIX_simcall_handle(&self->simcall, 0);
366     }    
367     return (smx_synchro_t) self->simcall.result.dp;
368   }
369   
370 inline static void simcall_BODY_execution_cancel(smx_synchro_t execution) {
371     smx_process_t self = SIMIX_process_self();
372
373     /* Go to that function to follow the code flow through the simcall barrier */
374     if (0) SIMIX_execution_cancel(execution);
375     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
376
377     self->simcall.call = SIMCALL_EXECUTION_CANCEL;
378     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
379     memset(self->simcall.args, 0, sizeof(self->simcall.args));
380     self->simcall.args[0].dp = (void*) execution;
381     if (self != simix_global->maestro_process) {
382       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
383                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
384       SIMIX_process_yield(self);
385     } else {
386       SIMIX_simcall_handle(&self->simcall, 0);
387     }    
388     
389   }
390   
391 inline static void simcall_BODY_execution_set_priority(smx_synchro_t execution, double priority) {
392     smx_process_t self = SIMIX_process_self();
393
394     /* Go to that function to follow the code flow through the simcall barrier */
395     if (0) SIMIX_execution_set_priority(execution, priority);
396     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
397
398     self->simcall.call = SIMCALL_EXECUTION_SET_PRIORITY;
399     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
400     memset(self->simcall.args, 0, sizeof(self->simcall.args));
401     self->simcall.args[0].dp = (void*) execution;
402     self->simcall.args[1].d = (double) priority;
403     if (self != simix_global->maestro_process) {
404       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
405                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
406       SIMIX_process_yield(self);
407     } else {
408       SIMIX_simcall_handle(&self->simcall, 0);
409     }    
410     
411   }
412   
413 inline static void simcall_BODY_execution_set_bound(smx_synchro_t execution, double bound) {
414     smx_process_t self = SIMIX_process_self();
415
416     /* Go to that function to follow the code flow through the simcall barrier */
417     if (0) SIMIX_execution_set_bound(execution, bound);
418     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
419
420     self->simcall.call = SIMCALL_EXECUTION_SET_BOUND;
421     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
422     memset(self->simcall.args, 0, sizeof(self->simcall.args));
423     self->simcall.args[0].dp = (void*) execution;
424     self->simcall.args[1].d = (double) bound;
425     if (self != simix_global->maestro_process) {
426       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
427                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
428       SIMIX_process_yield(self);
429     } else {
430       SIMIX_simcall_handle(&self->simcall, 0);
431     }    
432     
433   }
434   
435 inline static void simcall_BODY_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
436     smx_process_t self = SIMIX_process_self();
437
438     /* Go to that function to follow the code flow through the simcall barrier */
439     if (0) SIMIX_execution_set_affinity(execution, ws, mask);
440     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
441
442     self->simcall.call = SIMCALL_EXECUTION_SET_AFFINITY;
443     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
444     memset(self->simcall.args, 0, sizeof(self->simcall.args));
445     self->simcall.args[0].dp = (void*) execution;
446     self->simcall.args[1].dp = (void*) ws;
447     self->simcall.args[2].ul = (unsigned long) mask;
448     if (self != simix_global->maestro_process) {
449       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
450                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
451       SIMIX_process_yield(self);
452     } else {
453       SIMIX_simcall_handle(&self->simcall, 0);
454     }    
455     
456   }
457   
458 inline static int simcall_BODY_execution_wait(smx_synchro_t execution) {
459     smx_process_t self = SIMIX_process_self();
460
461     /* Go to that function to follow the code flow through the simcall barrier */
462     if (0) simcall_HANDLER_execution_wait(&self->simcall, execution);
463     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
464
465     self->simcall.call = SIMCALL_EXECUTION_WAIT;
466     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
467     memset(self->simcall.args, 0, sizeof(self->simcall.args));
468     self->simcall.args[0].dp = (void*) execution;
469     if (self != simix_global->maestro_process) {
470       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
471                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
472       SIMIX_process_yield(self);
473     } else {
474       SIMIX_simcall_handle(&self->simcall, 0);
475     }    
476     return (int) self->simcall.result.i;
477   }
478   
479 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
480     smx_process_t self = SIMIX_process_self();
481
482     /* Go to that function to follow the code flow through the simcall barrier */
483     if (0) SIMIX_process_on_exit(process, fun, data);
484     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
485
486     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
487     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
488     memset(self->simcall.args, 0, sizeof(self->simcall.args));
489     self->simcall.args[0].dp = (void*) process;
490     self->simcall.args[1].fp = (FPtr) fun;
491     self->simcall.args[2].dp = (void*) data;
492     if (self != simix_global->maestro_process) {
493       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
494                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
495       SIMIX_process_yield(self);
496     } else {
497       SIMIX_simcall_handle(&self->simcall, 0);
498     }    
499     
500   }
501   
502 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
503     smx_process_t self = SIMIX_process_self();
504
505     /* Go to that function to follow the code flow through the simcall barrier */
506     if (0) SIMIX_process_auto_restart_set(process, auto_restart);
507     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
508
509     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
510     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
511     memset(self->simcall.args, 0, sizeof(self->simcall.args));
512     self->simcall.args[0].dp = (void*) process;
513     self->simcall.args[1].i = (int) auto_restart;
514     if (self != simix_global->maestro_process) {
515       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
516                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
517       SIMIX_process_yield(self);
518     } else {
519       SIMIX_simcall_handle(&self->simcall, 0);
520     }    
521     
522   }
523   
524 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
525     smx_process_t self = SIMIX_process_self();
526
527     /* Go to that function to follow the code flow through the simcall barrier */
528     if (0) simcall_HANDLER_process_restart(&self->simcall, process);
529     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
530
531     self->simcall.call = SIMCALL_PROCESS_RESTART;
532     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
533     memset(self->simcall.args, 0, sizeof(self->simcall.args));
534     self->simcall.args[0].dp = (void*) process;
535     if (self != simix_global->maestro_process) {
536       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
537                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
538       SIMIX_process_yield(self);
539     } else {
540       SIMIX_simcall_handle(&self->simcall, 0);
541     }    
542     return (smx_process_t) self->simcall.result.dp;
543   }
544   
545 inline static smx_mailbox_t simcall_BODY_mbox_create(const char* name) {
546     smx_process_t self = SIMIX_process_self();
547
548     /* Go to that function to follow the code flow through the simcall barrier */
549     if (0) SIMIX_mbox_create(name);
550     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
551
552     self->simcall.call = SIMCALL_MBOX_CREATE;
553     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
554     memset(self->simcall.args, 0, sizeof(self->simcall.args));
555     self->simcall.args[0].cc = (const char*) name;
556     if (self != simix_global->maestro_process) {
557       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
558                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
559       SIMIX_process_yield(self);
560     } else {
561       SIMIX_simcall_handle(&self->simcall, 0);
562     }    
563     return (smx_mailbox_t) self->simcall.result.dp;
564   }
565   
566 inline static void simcall_BODY_mbox_set_receiver(smx_mailbox_t mbox, smx_process_t receiver) {
567     smx_process_t self = SIMIX_process_self();
568
569     /* Go to that function to follow the code flow through the simcall barrier */
570     if (0) SIMIX_mbox_set_receiver(mbox, receiver);
571     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
572
573     self->simcall.call = SIMCALL_MBOX_SET_RECEIVER;
574     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
575     memset(self->simcall.args, 0, sizeof(self->simcall.args));
576     self->simcall.args[0].dp = (void*) mbox;
577     self->simcall.args[1].dp = (void*) receiver;
578     if (self != simix_global->maestro_process) {
579       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
580                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
581       SIMIX_process_yield(self);
582     } else {
583       SIMIX_simcall_handle(&self->simcall, 0);
584     }    
585     
586   }
587   
588 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) {
589     smx_process_t self = SIMIX_process_self();
590
591     /* Go to that function to follow the code flow through the simcall barrier */
592     if (0) simcall_HANDLER_comm_iprobe(&self->simcall, mbox, type, src, tag, match_fun, data);
593     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
594
595     self->simcall.call = SIMCALL_COMM_IPROBE;
596     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
597     memset(self->simcall.args, 0, sizeof(self->simcall.args));
598     self->simcall.args[0].dp = (void*) mbox;
599     self->simcall.args[1].i = (int) type;
600     self->simcall.args[2].i = (int) src;
601     self->simcall.args[3].i = (int) tag;
602     self->simcall.args[4].fp = (FPtr) match_fun;
603     self->simcall.args[5].dp = (void*) data;
604     if (self != simix_global->maestro_process) {
605       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
606                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
607       SIMIX_process_yield(self);
608     } else {
609       SIMIX_simcall_handle(&self->simcall, 0);
610     }    
611     return (smx_synchro_t) self->simcall.result.dp;
612   }
613   
614 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) {
615     smx_process_t self = SIMIX_process_self();
616
617     /* Go to that function to follow the code flow through the simcall barrier */
618     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);
619     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
620
621     self->simcall.call = SIMCALL_COMM_SEND;
622     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
623     memset(self->simcall.args, 0, sizeof(self->simcall.args));
624     self->simcall.args[0].dp = (void*) sender;
625     self->simcall.args[1].dp = (void*) mbox;
626     self->simcall.args[2].d = (double) task_size;
627     self->simcall.args[3].d = (double) rate;
628     self->simcall.args[4].dp = (void*) src_buff;
629     self->simcall.args[5].sz = (size_t) src_buff_size;
630     self->simcall.args[6].fp = (FPtr) match_fun;
631     self->simcall.args[7].fp = (FPtr) copy_data_fun;
632     self->simcall.args[8].dp = (void*) data;
633     self->simcall.args[9].d = (double) timeout;
634     if (self != simix_global->maestro_process) {
635       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
636                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
637       SIMIX_process_yield(self);
638     } else {
639       SIMIX_simcall_handle(&self->simcall, 0);
640     }    
641     
642   }
643   
644 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) {
645     smx_process_t self = SIMIX_process_self();
646
647     /* Go to that function to follow the code flow through the simcall barrier */
648     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);
649     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
650
651     self->simcall.call = SIMCALL_COMM_ISEND;
652     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
653     memset(self->simcall.args, 0, sizeof(self->simcall.args));
654     self->simcall.args[0].dp = (void*) sender;
655     self->simcall.args[1].dp = (void*) mbox;
656     self->simcall.args[2].d = (double) task_size;
657     self->simcall.args[3].d = (double) rate;
658     self->simcall.args[4].dp = (void*) src_buff;
659     self->simcall.args[5].sz = (size_t) src_buff_size;
660     self->simcall.args[6].fp = (FPtr) match_fun;
661     self->simcall.args[7].fp = (FPtr) clean_fun;
662     self->simcall.args[8].fp = (FPtr) copy_data_fun;
663     self->simcall.args[9].dp = (void*) data;
664     self->simcall.args[10].i = (int) detached;
665     if (self != simix_global->maestro_process) {
666       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
667                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
668       SIMIX_process_yield(self);
669     } else {
670       SIMIX_simcall_handle(&self->simcall, 0);
671     }    
672     return (smx_synchro_t) self->simcall.result.dp;
673   }
674   
675 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) {
676     smx_process_t self = SIMIX_process_self();
677
678     /* Go to that function to follow the code flow through the simcall barrier */
679     if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
680     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
681
682     self->simcall.call = SIMCALL_COMM_RECV;
683     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
684     memset(self->simcall.args, 0, sizeof(self->simcall.args));
685     self->simcall.args[0].dp = (void*) receiver;
686     self->simcall.args[1].dp = (void*) mbox;
687     self->simcall.args[2].dp = (void*) dst_buff;
688     self->simcall.args[3].dp = (void*) dst_buff_size;
689     self->simcall.args[4].fp = (FPtr) match_fun;
690     self->simcall.args[5].fp = (FPtr) copy_data_fun;
691     self->simcall.args[6].dp = (void*) data;
692     self->simcall.args[7].d = (double) timeout;
693     self->simcall.args[8].d = (double) rate;
694     if (self != simix_global->maestro_process) {
695       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
696                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
697       SIMIX_process_yield(self);
698     } else {
699       SIMIX_simcall_handle(&self->simcall, 0);
700     }    
701     
702   }
703   
704 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) {
705     smx_process_t self = SIMIX_process_self();
706
707     /* Go to that function to follow the code flow through the simcall barrier */
708     if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
709     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
710
711     self->simcall.call = SIMCALL_COMM_IRECV;
712     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
713     memset(self->simcall.args, 0, sizeof(self->simcall.args));
714     self->simcall.args[0].dp = (void*) receiver;
715     self->simcall.args[1].dp = (void*) mbox;
716     self->simcall.args[2].dp = (void*) dst_buff;
717     self->simcall.args[3].dp = (void*) dst_buff_size;
718     self->simcall.args[4].fp = (FPtr) match_fun;
719     self->simcall.args[5].fp = (FPtr) copy_data_fun;
720     self->simcall.args[6].dp = (void*) data;
721     self->simcall.args[7].d = (double) rate;
722     if (self != simix_global->maestro_process) {
723       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
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     return (smx_synchro_t) self->simcall.result.dp;
730   }
731   
732 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
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_waitany(&self->simcall, comms);
737     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
738
739     self->simcall.call = SIMCALL_COMM_WAITANY;
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*) comms;
743     if (self != simix_global->maestro_process) {
744       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
745                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
746       SIMIX_process_yield(self);
747     } else {
748       SIMIX_simcall_handle(&self->simcall, 0);
749     }    
750     return (int) self->simcall.result.i;
751   }
752   
753 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
754     smx_process_t self = SIMIX_process_self();
755
756     /* Go to that function to follow the code flow through the simcall barrier */
757     if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
758     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
759
760     self->simcall.call = SIMCALL_COMM_WAIT;
761     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
762     memset(self->simcall.args, 0, sizeof(self->simcall.args));
763     self->simcall.args[0].dp = (void*) comm;
764     self->simcall.args[1].d = (double) timeout;
765     if (self != simix_global->maestro_process) {
766       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
767                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
768       SIMIX_process_yield(self);
769     } else {
770       SIMIX_simcall_handle(&self->simcall, 0);
771     }    
772     
773   }
774   
775 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
776     smx_process_t self = SIMIX_process_self();
777
778     /* Go to that function to follow the code flow through the simcall barrier */
779     if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
780     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
781
782     self->simcall.call = SIMCALL_COMM_TEST;
783     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
784     memset(self->simcall.args, 0, sizeof(self->simcall.args));
785     self->simcall.args[0].dp = (void*) comm;
786     if (self != simix_global->maestro_process) {
787       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
788                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
789       SIMIX_process_yield(self);
790     } else {
791       SIMIX_simcall_handle(&self->simcall, 0);
792     }    
793     return (int) self->simcall.result.i;
794   }
795   
796 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
797     smx_process_t self = SIMIX_process_self();
798
799     /* Go to that function to follow the code flow through the simcall barrier */
800     if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
801     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
802
803     self->simcall.call = SIMCALL_COMM_TESTANY;
804     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
805     memset(self->simcall.args, 0, sizeof(self->simcall.args));
806     self->simcall.args[0].dp = (void*) comms;
807     if (self != simix_global->maestro_process) {
808       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
809                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
810       SIMIX_process_yield(self);
811     } else {
812       SIMIX_simcall_handle(&self->simcall, 0);
813     }    
814     return (int) self->simcall.result.i;
815   }
816   
817 inline static smx_mutex_t simcall_BODY_mutex_init() {
818     smx_process_t self = SIMIX_process_self();
819
820     /* Go to that function to follow the code flow through the simcall barrier */
821     if (0) simcall_HANDLER_mutex_init(&self->simcall);
822     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
823
824     self->simcall.call = SIMCALL_MUTEX_INIT;
825     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
826     memset(self->simcall.args, 0, sizeof(self->simcall.args));
827
828     if (self != simix_global->maestro_process) {
829       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
830                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
831       SIMIX_process_yield(self);
832     } else {
833       SIMIX_simcall_handle(&self->simcall, 0);
834     }    
835     return (smx_mutex_t) self->simcall.result.dp;
836   }
837   
838 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
839     smx_process_t self = SIMIX_process_self();
840
841     /* Go to that function to follow the code flow through the simcall barrier */
842     if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
843     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
844
845     self->simcall.call = SIMCALL_MUTEX_LOCK;
846     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
847     memset(self->simcall.args, 0, sizeof(self->simcall.args));
848     self->simcall.args[0].dp = (void*) mutex;
849     if (self != simix_global->maestro_process) {
850       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
851                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
852       SIMIX_process_yield(self);
853     } else {
854       SIMIX_simcall_handle(&self->simcall, 0);
855     }    
856     
857   }
858   
859 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
860     smx_process_t self = SIMIX_process_self();
861
862     /* Go to that function to follow the code flow through the simcall barrier */
863     if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
864     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
865
866     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
867     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
868     memset(self->simcall.args, 0, sizeof(self->simcall.args));
869     self->simcall.args[0].dp = (void*) mutex;
870     if (self != simix_global->maestro_process) {
871       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
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     return (int) self->simcall.result.i;
878   }
879   
880 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
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_mutex_unlock(&self->simcall, mutex);
885     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
886
887     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
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*) mutex;
891     if (self != simix_global->maestro_process) {
892       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
893                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
894       SIMIX_process_yield(self);
895     } else {
896       SIMIX_simcall_handle(&self->simcall, 0);
897     }    
898     
899   }
900   
901 inline static smx_cond_t simcall_BODY_cond_init() {
902     smx_process_t self = SIMIX_process_self();
903
904     /* Go to that function to follow the code flow through the simcall barrier */
905     if (0) SIMIX_cond_init();
906     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
907
908     self->simcall.call = SIMCALL_COND_INIT;
909     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
910     memset(self->simcall.args, 0, sizeof(self->simcall.args));
911
912     if (self != simix_global->maestro_process) {
913       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
914                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
915       SIMIX_process_yield(self);
916     } else {
917       SIMIX_simcall_handle(&self->simcall, 0);
918     }    
919     return (smx_cond_t) self->simcall.result.dp;
920   }
921   
922 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
923     smx_process_t self = SIMIX_process_self();
924
925     /* Go to that function to follow the code flow through the simcall barrier */
926     if (0) SIMIX_cond_signal(cond);
927     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
928
929     self->simcall.call = SIMCALL_COND_SIGNAL;
930     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
931     memset(self->simcall.args, 0, sizeof(self->simcall.args));
932     self->simcall.args[0].dp = (void*) cond;
933     if (self != simix_global->maestro_process) {
934       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
935                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
936       SIMIX_process_yield(self);
937     } else {
938       SIMIX_simcall_handle(&self->simcall, 0);
939     }    
940     
941   }
942   
943 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
944     smx_process_t self = SIMIX_process_self();
945
946     /* Go to that function to follow the code flow through the simcall barrier */
947     if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
948     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
949
950     self->simcall.call = SIMCALL_COND_WAIT;
951     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
952     memset(self->simcall.args, 0, sizeof(self->simcall.args));
953     self->simcall.args[0].dp = (void*) cond;
954     self->simcall.args[1].dp = (void*) mutex;
955     if (self != simix_global->maestro_process) {
956       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
957                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
958       SIMIX_process_yield(self);
959     } else {
960       SIMIX_simcall_handle(&self->simcall, 0);
961     }    
962     
963   }
964   
965 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
966     smx_process_t self = SIMIX_process_self();
967
968     /* Go to that function to follow the code flow through the simcall barrier */
969     if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
970     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
971
972     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
973     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
974     memset(self->simcall.args, 0, sizeof(self->simcall.args));
975     self->simcall.args[0].dp = (void*) cond;
976     self->simcall.args[1].dp = (void*) mutex;
977     self->simcall.args[2].d = (double) timeout;
978     if (self != simix_global->maestro_process) {
979       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
980                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
981       SIMIX_process_yield(self);
982     } else {
983       SIMIX_simcall_handle(&self->simcall, 0);
984     }    
985     
986   }
987   
988 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
989     smx_process_t self = SIMIX_process_self();
990
991     /* Go to that function to follow the code flow through the simcall barrier */
992     if (0) SIMIX_cond_broadcast(cond);
993     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
994
995     self->simcall.call = SIMCALL_COND_BROADCAST;
996     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
997     memset(self->simcall.args, 0, sizeof(self->simcall.args));
998     self->simcall.args[0].dp = (void*) cond;
999     if (self != simix_global->maestro_process) {
1000       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1001                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1002       SIMIX_process_yield(self);
1003     } else {
1004       SIMIX_simcall_handle(&self->simcall, 0);
1005     }    
1006     
1007   }
1008   
1009 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
1010     smx_process_t self = SIMIX_process_self();
1011
1012     /* Go to that function to follow the code flow through the simcall barrier */
1013     if (0) SIMIX_sem_init(capacity);
1014     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1015
1016     self->simcall.call = SIMCALL_SEM_INIT;
1017     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1018     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1019     self->simcall.args[0].ui = (unsigned int) capacity;
1020     if (self != simix_global->maestro_process) {
1021       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1022                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1023       SIMIX_process_yield(self);
1024     } else {
1025       SIMIX_simcall_handle(&self->simcall, 0);
1026     }    
1027     return (smx_sem_t) self->simcall.result.dp;
1028   }
1029   
1030 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
1031     smx_process_t self = SIMIX_process_self();
1032
1033     /* Go to that function to follow the code flow through the simcall barrier */
1034     if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
1035     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1036
1037     self->simcall.call = SIMCALL_SEM_RELEASE;
1038     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1039     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1040     self->simcall.args[0].dp = (void*) sem;
1041     if (self != simix_global->maestro_process) {
1042       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1043                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1044       SIMIX_process_yield(self);
1045     } else {
1046       SIMIX_simcall_handle(&self->simcall, 0);
1047     }    
1048     
1049   }
1050   
1051 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
1052     smx_process_t self = SIMIX_process_self();
1053
1054     /* Go to that function to follow the code flow through the simcall barrier */
1055     if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
1056     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1057
1058     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
1059     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1060     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1061     self->simcall.args[0].dp = (void*) sem;
1062     if (self != simix_global->maestro_process) {
1063       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1064                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1065       SIMIX_process_yield(self);
1066     } else {
1067       SIMIX_simcall_handle(&self->simcall, 0);
1068     }    
1069     return (int) self->simcall.result.i;
1070   }
1071   
1072 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
1073     smx_process_t self = SIMIX_process_self();
1074
1075     /* Go to that function to follow the code flow through the simcall barrier */
1076     if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
1077     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1078
1079     self->simcall.call = SIMCALL_SEM_ACQUIRE;
1080     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1081     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1082     self->simcall.args[0].dp = (void*) sem;
1083     if (self != simix_global->maestro_process) {
1084       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1085                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1086       SIMIX_process_yield(self);
1087     } else {
1088       SIMIX_simcall_handle(&self->simcall, 0);
1089     }    
1090     
1091   }
1092   
1093 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
1094     smx_process_t self = SIMIX_process_self();
1095
1096     /* Go to that function to follow the code flow through the simcall barrier */
1097     if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
1098     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1099
1100     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
1101     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1102     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1103     self->simcall.args[0].dp = (void*) sem;
1104     self->simcall.args[1].d = (double) timeout;
1105     if (self != simix_global->maestro_process) {
1106       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1107                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1108       SIMIX_process_yield(self);
1109     } else {
1110       SIMIX_simcall_handle(&self->simcall, 0);
1111     }    
1112     
1113   }
1114   
1115 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
1116     smx_process_t self = SIMIX_process_self();
1117
1118     /* Go to that function to follow the code flow through the simcall barrier */
1119     if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
1120     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1121
1122     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
1123     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1124     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1125     self->simcall.args[0].dp = (void*) sem;
1126     if (self != simix_global->maestro_process) {
1127       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1128                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1129       SIMIX_process_yield(self);
1130     } else {
1131       SIMIX_simcall_handle(&self->simcall, 0);
1132     }    
1133     return (int) self->simcall.result.i;
1134   }
1135   
1136 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
1137     smx_process_t self = SIMIX_process_self();
1138
1139     /* Go to that function to follow the code flow through the simcall barrier */
1140     if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
1141     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1142
1143     self->simcall.call = SIMCALL_FILE_READ;
1144     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1145     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1146     self->simcall.args[0].dp = (void*) fd;
1147     self->simcall.args[1].sgsz = (sg_size_t) size;
1148     self->simcall.args[2].dp = (void*) host;
1149     if (self != simix_global->maestro_process) {
1150       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1151                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1152       SIMIX_process_yield(self);
1153     } else {
1154       SIMIX_simcall_handle(&self->simcall, 0);
1155     }    
1156     return (sg_size_t) self->simcall.result.sgsz;
1157   }
1158   
1159 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
1160     smx_process_t self = SIMIX_process_self();
1161
1162     /* Go to that function to follow the code flow through the simcall barrier */
1163     if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
1164     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1165
1166     self->simcall.call = SIMCALL_FILE_WRITE;
1167     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1168     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1169     self->simcall.args[0].dp = (void*) fd;
1170     self->simcall.args[1].sgsz = (sg_size_t) size;
1171     self->simcall.args[2].dp = (void*) host;
1172     if (self != simix_global->maestro_process) {
1173       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
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     return (sg_size_t) self->simcall.result.sgsz;
1180   }
1181   
1182 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
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_file_open(&self->simcall, fullpath, host);
1187     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1188
1189     self->simcall.call = SIMCALL_FILE_OPEN;
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].cc = (const char*) fullpath;
1193     self->simcall.args[1].dp = (void*) host;
1194     if (self != simix_global->maestro_process) {
1195       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1196                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1197       SIMIX_process_yield(self);
1198     } else {
1199       SIMIX_simcall_handle(&self->simcall, 0);
1200     }    
1201     return (smx_file_t) self->simcall.result.dp;
1202   }
1203   
1204 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
1205     smx_process_t self = SIMIX_process_self();
1206
1207     /* Go to that function to follow the code flow through the simcall barrier */
1208     if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
1209     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1210
1211     self->simcall.call = SIMCALL_FILE_CLOSE;
1212     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1213     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1214     self->simcall.args[0].dp = (void*) fd;
1215     self->simcall.args[1].dp = (void*) host;
1216     if (self != simix_global->maestro_process) {
1217       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1218                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1219       SIMIX_process_yield(self);
1220     } else {
1221       SIMIX_simcall_handle(&self->simcall, 0);
1222     }    
1223     return (int) self->simcall.result.i;
1224   }
1225   
1226 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
1227     smx_process_t self = SIMIX_process_self();
1228
1229     /* Go to that function to follow the code flow through the simcall barrier */
1230     if (0) SIMIX_file_unlink(fd, host);
1231     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1232
1233     self->simcall.call = SIMCALL_FILE_UNLINK;
1234     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1235     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1236     self->simcall.args[0].dp = (void*) fd;
1237     self->simcall.args[1].dp = (void*) host;
1238     if (self != simix_global->maestro_process) {
1239       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1240                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1241       SIMIX_process_yield(self);
1242     } else {
1243       SIMIX_simcall_handle(&self->simcall, 0);
1244     }    
1245     return (int) self->simcall.result.i;
1246   }
1247   
1248 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
1249     smx_process_t self = SIMIX_process_self();
1250
1251     /* Go to that function to follow the code flow through the simcall barrier */
1252     if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
1253     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1254
1255     self->simcall.call = SIMCALL_FILE_GET_SIZE;
1256     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1257     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1258     self->simcall.args[0].dp = (void*) fd;
1259     if (self != simix_global->maestro_process) {
1260       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1261                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1262       SIMIX_process_yield(self);
1263     } else {
1264       SIMIX_simcall_handle(&self->simcall, 0);
1265     }    
1266     return (sg_size_t) self->simcall.result.sgsz;
1267   }
1268   
1269 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
1270     smx_process_t self = SIMIX_process_self();
1271
1272     /* Go to that function to follow the code flow through the simcall barrier */
1273     if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
1274     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1275
1276     self->simcall.call = SIMCALL_FILE_TELL;
1277     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1278     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1279     self->simcall.args[0].dp = (void*) fd;
1280     if (self != simix_global->maestro_process) {
1281       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1282                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1283       SIMIX_process_yield(self);
1284     } else {
1285       SIMIX_simcall_handle(&self->simcall, 0);
1286     }    
1287     return (sg_size_t) self->simcall.result.sgsz;
1288   }
1289   
1290 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
1291     smx_process_t self = SIMIX_process_self();
1292
1293     /* Go to that function to follow the code flow through the simcall barrier */
1294     if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
1295     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1296
1297     self->simcall.call = SIMCALL_FILE_SEEK;
1298     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1299     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1300     self->simcall.args[0].dp = (void*) fd;
1301     self->simcall.args[1].sgoff = (sg_offset_t) offset;
1302     self->simcall.args[2].i = (int) origin;
1303     if (self != simix_global->maestro_process) {
1304       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1305                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1306       SIMIX_process_yield(self);
1307     } else {
1308       SIMIX_simcall_handle(&self->simcall, 0);
1309     }    
1310     return (int) self->simcall.result.i;
1311   }
1312   
1313 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
1314     smx_process_t self = SIMIX_process_self();
1315
1316     /* Go to that function to follow the code flow through the simcall barrier */
1317     if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
1318     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1319
1320     self->simcall.call = SIMCALL_FILE_GET_INFO;
1321     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1322     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1323     self->simcall.args[0].dp = (void*) fd;
1324     if (self != simix_global->maestro_process) {
1325       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1326                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1327       SIMIX_process_yield(self);
1328     } else {
1329       SIMIX_simcall_handle(&self->simcall, 0);
1330     }    
1331     return (xbt_dynar_t) self->simcall.result.dp;
1332   }
1333   
1334 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
1335     smx_process_t self = SIMIX_process_self();
1336
1337     /* Go to that function to follow the code flow through the simcall barrier */
1338     if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
1339     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1340
1341     self->simcall.call = SIMCALL_FILE_MOVE;
1342     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1343     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1344     self->simcall.args[0].dp = (void*) fd;
1345     self->simcall.args[1].cc = (const char*) fullpath;
1346     if (self != simix_global->maestro_process) {
1347       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1348                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1349       SIMIX_process_yield(self);
1350     } else {
1351       SIMIX_simcall_handle(&self->simcall, 0);
1352     }    
1353     return (int) self->simcall.result.i;
1354   }
1355   
1356 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
1357     smx_process_t self = SIMIX_process_self();
1358
1359     /* Go to that function to follow the code flow through the simcall barrier */
1360     if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
1361     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1362
1363     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
1364     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1365     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1366     self->simcall.args[0].dp = (void*) storage;
1367     if (self != simix_global->maestro_process) {
1368       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1369                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1370       SIMIX_process_yield(self);
1371     } else {
1372       SIMIX_simcall_handle(&self->simcall, 0);
1373     }    
1374     return (sg_size_t) self->simcall.result.sgsz;
1375   }
1376   
1377 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
1378     smx_process_t self = SIMIX_process_self();
1379
1380     /* Go to that function to follow the code flow through the simcall barrier */
1381     if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
1382     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1383
1384     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
1385     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1386     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1387     self->simcall.args[0].dp = (void*) name;
1388     if (self != simix_global->maestro_process) {
1389       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1390                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1391       SIMIX_process_yield(self);
1392     } else {
1393       SIMIX_simcall_handle(&self->simcall, 0);
1394     }    
1395     return (sg_size_t) self->simcall.result.sgsz;
1396   }
1397   
1398 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
1399     smx_process_t self = SIMIX_process_self();
1400
1401     /* Go to that function to follow the code flow through the simcall barrier */
1402     if (0) SIMIX_storage_get_properties(storage);
1403     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1404
1405     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
1406     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1407     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1408     self->simcall.args[0].dp = (void*) storage;
1409     if (self != simix_global->maestro_process) {
1410       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1411                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1412       SIMIX_process_yield(self);
1413     } else {
1414       SIMIX_simcall_handle(&self->simcall, 0);
1415     }    
1416     return (xbt_dict_t) self->simcall.result.dp;
1417   }
1418   
1419 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
1420     smx_process_t self = SIMIX_process_self();
1421
1422     /* Go to that function to follow the code flow through the simcall barrier */
1423     if (0) SIMIX_storage_get_content(storage);
1424     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1425
1426     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
1427     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1428     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1429     self->simcall.args[0].dp = (void*) storage;
1430     if (self != simix_global->maestro_process) {
1431       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1432                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1433       SIMIX_process_yield(self);
1434     } else {
1435       SIMIX_simcall_handle(&self->simcall, 0);
1436     }    
1437     return (xbt_dict_t) self->simcall.result.dp;
1438   }
1439   
1440 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
1441     smx_process_t self = SIMIX_process_self();
1442
1443     /* Go to that function to follow the code flow through the simcall barrier */
1444     if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
1445     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1446
1447     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
1448     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1449     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1450     self->simcall.args[0].cc = (const char*) name;
1451     if (self != simix_global->maestro_process) {
1452       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1453                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1454       SIMIX_process_yield(self);
1455     } else {
1456       SIMIX_simcall_handle(&self->simcall, 0);
1457     }    
1458     return (xbt_dict_t) self->simcall.result.dp;
1459   }
1460   
1461 inline static int simcall_BODY_mc_random(int min, int max) {
1462     smx_process_t self = SIMIX_process_self();
1463
1464     /* Go to that function to follow the code flow through the simcall barrier */
1465     if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
1466     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1467
1468     self->simcall.call = SIMCALL_MC_RANDOM;
1469     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1470     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1471     self->simcall.args[0].i = (int) min;
1472     self->simcall.args[1].i = (int) max;
1473     if (self != simix_global->maestro_process) {
1474       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1475                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1476       SIMIX_process_yield(self);
1477     } else {
1478       SIMIX_simcall_handle(&self->simcall, 0);
1479     }    
1480     return (int) self->simcall.result.i;
1481   }
1482   
1483 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
1484     smx_process_t self = SIMIX_process_self();
1485
1486     /* Go to that function to follow the code flow through the simcall barrier */
1487     if (0) SIMIX_set_category(synchro, category);
1488     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1489
1490     self->simcall.call = SIMCALL_SET_CATEGORY;
1491     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1492     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1493     self->simcall.args[0].dp = (void*) synchro;
1494     self->simcall.args[1].cc = (const char*) category;
1495     if (self != simix_global->maestro_process) {
1496       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1497                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1498       SIMIX_process_yield(self);
1499     } else {
1500       SIMIX_simcall_handle(&self->simcall, 0);
1501     }    
1502     
1503   }
1504   
1505 inline static void simcall_BODY_run_kernel(void* code) {
1506     smx_process_t self = SIMIX_process_self();
1507
1508     /* Go to that function to follow the code flow through the simcall barrier */
1509     if (0) SIMIX_run_kernel(code);
1510     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1511
1512     self->simcall.call = SIMCALL_RUN_KERNEL;
1513     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1514     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1515     self->simcall.args[0].dp = (void*) code;
1516     if (self != simix_global->maestro_process) {
1517       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
1518                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1519       SIMIX_process_yield(self);
1520     } else {
1521       SIMIX_simcall_handle(&self->simcall, 0);
1522     }    
1523     
1524   }/** @endcond */