Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix a test that got broken when I suppressed some simcalls
[simgrid.git] / src / simix / popping_bodies.c
1 /**********************************************************************/
2 /* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
3 /*                                                                    */
4 /*                    DO NOT EVER CHANGE THIS FILE                    */
5 /*                                                                    */
6 /* change simcalls specification in src/simix/simcalls.in             */
7 /**********************************************************************/
8
9 /*
10  * Note that the name comes from http://en.wikipedia.org/wiki/Popping
11  * Indeed, the control flow is doing a strange dance in there.
12  *
13  * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
14  */
15
16 #include "smx_private.h"
17 #include "src/mc/mc_forward.h"
18 #include "xbt/ex.h"
19   
20 inline static void simcall_BODY_host_on(sg_host_t host) {
21     smx_process_t self = SIMIX_process_self();
22
23     /* Go to that function to follow the code flow through the simcall barrier */
24     if (0) SIMIX_host_on(host);
25     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
26
27     self->simcall.call = SIMCALL_HOST_ON;
28     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
29     memset(self->simcall.args, 0, sizeof(self->simcall.args));
30     self->simcall.args[0].dp = (void*) host;
31     if (self != simix_global->maestro_process) {
32       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
33                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
34       SIMIX_process_yield(self);
35     } else {
36       SIMIX_simcall_handle(&self->simcall, 0);
37     }    
38     
39   }
40   
41 inline static void simcall_BODY_host_off(sg_host_t host) {
42     smx_process_t self = SIMIX_process_self();
43
44     /* Go to that function to follow the code flow through the simcall barrier */
45     if (0) simcall_HANDLER_host_off(&self->simcall, host);
46     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
47
48     self->simcall.call = SIMCALL_HOST_OFF;
49     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
50     memset(self->simcall.args, 0, sizeof(self->simcall.args));
51     self->simcall.args[0].dp = (void*) host;
52     if (self != simix_global->maestro_process) {
53       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
54                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
55       SIMIX_process_yield(self);
56     } else {
57       SIMIX_simcall_handle(&self->simcall, 0);
58     }    
59     
60   }
61   
62 inline static xbt_dict_t simcall_BODY_host_get_properties(sg_host_t host) {
63     smx_process_t self = SIMIX_process_self();
64
65     /* Go to that function to follow the code flow through the simcall barrier */
66     if (0) SIMIX_host_get_properties(host);
67     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
68
69     self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
70     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
71     memset(self->simcall.args, 0, sizeof(self->simcall.args));
72     self->simcall.args[0].dp = (void*) host;
73     if (self != simix_global->maestro_process) {
74       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
75                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
76       SIMIX_process_yield(self);
77     } else {
78       SIMIX_simcall_handle(&self->simcall, 0);
79     }    
80     return self->simcall.result.dp;
81   }
82   
83 inline static int simcall_BODY_host_get_core(sg_host_t host) {
84     smx_process_t self = SIMIX_process_self();
85
86     /* Go to that function to follow the code flow through the simcall barrier */
87     if (0) SIMIX_host_get_core(host);
88     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
89
90     self->simcall.call = SIMCALL_HOST_GET_CORE;
91     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
92     memset(self->simcall.args, 0, sizeof(self->simcall.args));
93     self->simcall.args[0].dp = (void*) host;
94     if (self != simix_global->maestro_process) {
95       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
96                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
97       SIMIX_process_yield(self);
98     } else {
99       SIMIX_simcall_handle(&self->simcall, 0);
100     }    
101     return self->simcall.result.i;
102   }
103   
104 inline static xbt_swag_t simcall_BODY_host_get_process_list(sg_host_t host) {
105     smx_process_t self = SIMIX_process_self();
106
107     /* Go to that function to follow the code flow through the simcall barrier */
108     if (0) SIMIX_host_get_process_list(host);
109     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
110
111     self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
112     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
113     memset(self->simcall.args, 0, sizeof(self->simcall.args));
114     self->simcall.args[0].dp = (void*) host;
115     if (self != simix_global->maestro_process) {
116       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
117                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
118       SIMIX_process_yield(self);
119     } else {
120       SIMIX_simcall_handle(&self->simcall, 0);
121     }    
122     return self->simcall.result.dp;
123   }
124   
125 inline static int simcall_BODY_host_get_state(sg_host_t host) {
126     smx_process_t self = SIMIX_process_self();
127
128     /* Go to that function to follow the code flow through the simcall barrier */
129     if (0) SIMIX_host_get_state(host);
130     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
131
132     self->simcall.call = SIMCALL_HOST_GET_STATE;
133     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
134     memset(self->simcall.args, 0, sizeof(self->simcall.args));
135     self->simcall.args[0].dp = (void*) host;
136     if (self != simix_global->maestro_process) {
137       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
138                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
139       SIMIX_process_yield(self);
140     } else {
141       SIMIX_simcall_handle(&self->simcall, 0);
142     }    
143     return self->simcall.result.i;
144   }
145   
146 inline static double simcall_BODY_host_get_current_power_peak(sg_host_t host) {
147     smx_process_t self = SIMIX_process_self();
148
149     /* Go to that function to follow the code flow through the simcall barrier */
150     if (0) SIMIX_host_get_current_power_peak(host);
151     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
152
153     self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
154     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
155     memset(self->simcall.args, 0, sizeof(self->simcall.args));
156     self->simcall.args[0].dp = (void*) host;
157     if (self != simix_global->maestro_process) {
158       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
159                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
160       SIMIX_process_yield(self);
161     } else {
162       SIMIX_simcall_handle(&self->simcall, 0);
163     }    
164     return self->simcall.result.d;
165   }
166   
167 inline static double simcall_BODY_host_get_power_peak_at(sg_host_t host, int pstate_index) {
168     smx_process_t self = SIMIX_process_self();
169
170     /* Go to that function to follow the code flow through the simcall barrier */
171     if (0) SIMIX_host_get_power_peak_at(host, pstate_index);
172     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
173
174     self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
175     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
176     memset(self->simcall.args, 0, sizeof(self->simcall.args));
177     self->simcall.args[0].dp = (void*) host;
178     self->simcall.args[1].i = (int) pstate_index;
179     if (self != simix_global->maestro_process) {
180       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
181                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
182       SIMIX_process_yield(self);
183     } else {
184       SIMIX_simcall_handle(&self->simcall, 0);
185     }    
186     return self->simcall.result.d;
187   }
188   
189 inline static int simcall_BODY_host_get_nb_pstates(sg_host_t host) {
190     smx_process_t self = SIMIX_process_self();
191
192     /* Go to that function to follow the code flow through the simcall barrier */
193     if (0) SIMIX_host_get_nb_pstates(host);
194     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
195
196     self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
197     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
198     memset(self->simcall.args, 0, sizeof(self->simcall.args));
199     self->simcall.args[0].dp = (void*) host;
200     if (self != simix_global->maestro_process) {
201       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
202                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
203       SIMIX_process_yield(self);
204     } else {
205       SIMIX_simcall_handle(&self->simcall, 0);
206     }    
207     return self->simcall.result.i;
208   }
209   
210 inline static double simcall_BODY_host_get_wattmin_at(sg_host_t host, int pstate_index) {
211     smx_process_t self = SIMIX_process_self();
212
213     /* Go to that function to follow the code flow through the simcall barrier */
214     if (0) SIMIX_host_get_wattmin_at(host, pstate_index);
215     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
216
217     self->simcall.call = SIMCALL_HOST_GET_WATTMIN_AT;
218     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
219     memset(self->simcall.args, 0, sizeof(self->simcall.args));
220     self->simcall.args[0].dp = (void*) host;
221     self->simcall.args[1].i = (int) pstate_index;
222     if (self != simix_global->maestro_process) {
223       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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     return self->simcall.result.d;
230   }
231   
232 inline static double simcall_BODY_host_get_wattmax_at(sg_host_t host, int pstate_index) {
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) SIMIX_host_get_wattmax_at(host, pstate_index);
237     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
238
239     self->simcall.call = SIMCALL_HOST_GET_WATTMAX_AT;
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*) host;
243     self->simcall.args[1].i = (int) pstate_index;
244     if (self != simix_global->maestro_process) {
245       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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     return self->simcall.result.d;
252   }
253   
254 inline static void simcall_BODY_host_set_pstate(sg_host_t host, int pstate_index) {
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_host_set_pstate(host, pstate_index);
259     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
260
261     self->simcall.call = SIMCALL_HOST_SET_PSTATE;
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*) host;
265     self->simcall.args[1].i = (int) pstate_index;
266     if (self != simix_global->maestro_process) {
267       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
268                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
269       SIMIX_process_yield(self);
270     } else {
271       SIMIX_simcall_handle(&self->simcall, 0);
272     }    
273     
274   }
275   
276 inline static int simcall_BODY_host_get_pstate(sg_host_t host) {
277     smx_process_t self = SIMIX_process_self();
278
279     /* Go to that function to follow the code flow through the simcall barrier */
280     if (0) SIMIX_host_get_pstate(host);
281     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
282
283     self->simcall.call = SIMCALL_HOST_GET_PSTATE;
284     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
285     memset(self->simcall.args, 0, sizeof(self->simcall.args));
286     self->simcall.args[0].dp = (void*) host;
287     if (self != simix_global->maestro_process) {
288       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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 self->simcall.result.i;
295   }
296   
297 inline static double simcall_BODY_host_get_consumed_energy(sg_host_t host) {
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) SIMIX_host_get_consumed_energy(host);
302     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
303
304     self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
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].dp = (void*) host;
308     if (self != simix_global->maestro_process) {
309       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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 self->simcall.result.d;
316   }
317   
318 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(sg_host_t host) {
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) SIMIX_host_get_mounted_storage_list(host);
323     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
324
325     self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
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].dp = (void*) host;
329     if (self != simix_global->maestro_process) {
330       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
331                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
332       SIMIX_process_yield(self);
333     } else {
334       SIMIX_simcall_handle(&self->simcall, 0);
335     }    
336     return self->simcall.result.dp;
337   }
338   
339 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(sg_host_t host) {
340     smx_process_t self = SIMIX_process_self();
341
342     /* Go to that function to follow the code flow through the simcall barrier */
343     if (0) SIMIX_host_get_attached_storage_list(host);
344     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
345
346     self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
347     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
348     memset(self->simcall.args, 0, sizeof(self->simcall.args));
349     self->simcall.args[0].dp = (void*) host;
350     if (self != simix_global->maestro_process) {
351       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
352                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
353       SIMIX_process_yield(self);
354     } else {
355       SIMIX_simcall_handle(&self->simcall, 0);
356     }    
357     return self->simcall.result.dp;
358   }
359   
360 inline static void simcall_BODY_host_get_params(sg_host_t ind_vm, vm_params_t params) {
361     smx_process_t self = SIMIX_process_self();
362
363     /* Go to that function to follow the code flow through the simcall barrier */
364     if (0) SIMIX_host_get_params(ind_vm, params);
365     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
366
367     self->simcall.call = SIMCALL_HOST_GET_PARAMS;
368     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
369     memset(self->simcall.args, 0, sizeof(self->simcall.args));
370     self->simcall.args[0].dp = (void*) ind_vm;
371     self->simcall.args[1].dp = (void*) params;
372     if (self != simix_global->maestro_process) {
373       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
374                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
375       SIMIX_process_yield(self);
376     } else {
377       SIMIX_simcall_handle(&self->simcall, 0);
378     }    
379     
380   }
381   
382 inline static void simcall_BODY_host_set_params(sg_host_t ind_vm, vm_params_t params) {
383     smx_process_t self = SIMIX_process_self();
384
385     /* Go to that function to follow the code flow through the simcall barrier */
386     if (0) SIMIX_host_set_params(ind_vm, params);
387     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
388
389     self->simcall.call = SIMCALL_HOST_SET_PARAMS;
390     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
391     memset(self->simcall.args, 0, sizeof(self->simcall.args));
392     self->simcall.args[0].dp = (void*) ind_vm;
393     self->simcall.args[1].dp = (void*) params;
394     if (self != simix_global->maestro_process) {
395       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
396                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
397       SIMIX_process_yield(self);
398     } else {
399       SIMIX_simcall_handle(&self->simcall, 0);
400     }    
401     
402   }
403   
404 inline static sg_host_t simcall_BODY_vm_create(const char* name, sg_host_t ind_pm) {
405     smx_process_t self = SIMIX_process_self();
406
407     /* Go to that function to follow the code flow through the simcall barrier */
408     if (0) SIMIX_vm_create(name, ind_pm);
409     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
410
411     self->simcall.call = SIMCALL_VM_CREATE;
412     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
413     memset(self->simcall.args, 0, sizeof(self->simcall.args));
414     self->simcall.args[0].cc = (const char*) name;
415     self->simcall.args[1].dp = (void*) ind_pm;
416     if (self != simix_global->maestro_process) {
417       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
418                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
419       SIMIX_process_yield(self);
420     } else {
421       SIMIX_simcall_handle(&self->simcall, 0);
422     }    
423     return self->simcall.result.dp;
424   }
425   
426 inline static void simcall_BODY_vm_start(sg_host_t ind_vm) {
427     smx_process_t self = SIMIX_process_self();
428
429     /* Go to that function to follow the code flow through the simcall barrier */
430     if (0) SIMIX_vm_start(ind_vm);
431     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
432
433     self->simcall.call = SIMCALL_VM_START;
434     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
435     memset(self->simcall.args, 0, sizeof(self->simcall.args));
436     self->simcall.args[0].dp = (void*) ind_vm;
437     if (self != simix_global->maestro_process) {
438       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
439                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
440       SIMIX_process_yield(self);
441     } else {
442       SIMIX_simcall_handle(&self->simcall, 0);
443     }    
444     
445   }
446   
447 inline static int simcall_BODY_vm_get_state(sg_host_t ind_vm) {
448     smx_process_t self = SIMIX_process_self();
449
450     /* Go to that function to follow the code flow through the simcall barrier */
451     if (0) SIMIX_vm_get_state(ind_vm);
452     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
453
454     self->simcall.call = SIMCALL_VM_GET_STATE;
455     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
456     memset(self->simcall.args, 0, sizeof(self->simcall.args));
457     self->simcall.args[0].dp = (void*) ind_vm;
458     if (self != simix_global->maestro_process) {
459       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
460                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
461       SIMIX_process_yield(self);
462     } else {
463       SIMIX_simcall_handle(&self->simcall, 0);
464     }    
465     return self->simcall.result.i;
466   }
467   
468 inline static void simcall_BODY_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) {
469     smx_process_t self = SIMIX_process_self();
470
471     /* Go to that function to follow the code flow through the simcall barrier */
472     if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
473     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
474
475     self->simcall.call = SIMCALL_VM_MIGRATE;
476     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
477     memset(self->simcall.args, 0, sizeof(self->simcall.args));
478     self->simcall.args[0].dp = (void*) ind_vm;
479     self->simcall.args[1].dp = (void*) ind_dst_pm;
480     if (self != simix_global->maestro_process) {
481       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
482                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
483       SIMIX_process_yield(self);
484     } else {
485       SIMIX_simcall_handle(&self->simcall, 0);
486     }    
487     
488   }
489   
490 inline static void* simcall_BODY_vm_get_pm(sg_host_t ind_vm) {
491     smx_process_t self = SIMIX_process_self();
492
493     /* Go to that function to follow the code flow through the simcall barrier */
494     if (0) SIMIX_vm_get_pm(ind_vm);
495     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
496
497     self->simcall.call = SIMCALL_VM_GET_PM;
498     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
499     memset(self->simcall.args, 0, sizeof(self->simcall.args));
500     self->simcall.args[0].dp = (void*) ind_vm;
501     if (self != simix_global->maestro_process) {
502       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
503                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
504       SIMIX_process_yield(self);
505     } else {
506       SIMIX_simcall_handle(&self->simcall, 0);
507     }    
508     return self->simcall.result.dp;
509   }
510   
511 inline static void simcall_BODY_vm_set_bound(sg_host_t ind_vm, double bound) {
512     smx_process_t self = SIMIX_process_self();
513
514     /* Go to that function to follow the code flow through the simcall barrier */
515     if (0) SIMIX_vm_set_bound(ind_vm, bound);
516     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
517
518     self->simcall.call = SIMCALL_VM_SET_BOUND;
519     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
520     memset(self->simcall.args, 0, sizeof(self->simcall.args));
521     self->simcall.args[0].dp = (void*) ind_vm;
522     self->simcall.args[1].d = (double) bound;
523     if (self != simix_global->maestro_process) {
524       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
525                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
526       SIMIX_process_yield(self);
527     } else {
528       SIMIX_simcall_handle(&self->simcall, 0);
529     }    
530     
531   }
532   
533 inline static void simcall_BODY_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) {
534     smx_process_t self = SIMIX_process_self();
535
536     /* Go to that function to follow the code flow through the simcall barrier */
537     if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
538     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
539
540     self->simcall.call = SIMCALL_VM_SET_AFFINITY;
541     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
542     memset(self->simcall.args, 0, sizeof(self->simcall.args));
543     self->simcall.args[0].dp = (void*) ind_vm;
544     self->simcall.args[1].dp = (void*) ind_pm;
545     self->simcall.args[2].ul = (unsigned long) mask;
546     if (self != simix_global->maestro_process) {
547       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
548                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
549       SIMIX_process_yield(self);
550     } else {
551       SIMIX_simcall_handle(&self->simcall, 0);
552     }    
553     
554   }
555   
556 inline static void simcall_BODY_vm_destroy(sg_host_t ind_vm) {
557     smx_process_t self = SIMIX_process_self();
558
559     /* Go to that function to follow the code flow through the simcall barrier */
560     if (0) SIMIX_vm_destroy(ind_vm);
561     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
562
563     self->simcall.call = SIMCALL_VM_DESTROY;
564     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
565     memset(self->simcall.args, 0, sizeof(self->simcall.args));
566     self->simcall.args[0].dp = (void*) ind_vm;
567     if (self != simix_global->maestro_process) {
568       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
569                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
570       SIMIX_process_yield(self);
571     } else {
572       SIMIX_simcall_handle(&self->simcall, 0);
573     }    
574     
575   }
576   
577 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
578     smx_process_t self = SIMIX_process_self();
579
580     /* Go to that function to follow the code flow through the simcall barrier */
581     if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
582     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
583
584     self->simcall.call = SIMCALL_VM_SUSPEND;
585     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
586     memset(self->simcall.args, 0, sizeof(self->simcall.args));
587     self->simcall.args[0].dp = (void*) ind_vm;
588     if (self != simix_global->maestro_process) {
589       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
590                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
591       SIMIX_process_yield(self);
592     } else {
593       SIMIX_simcall_handle(&self->simcall, 0);
594     }    
595     
596   }
597   
598 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
599     smx_process_t self = SIMIX_process_self();
600
601     /* Go to that function to follow the code flow through the simcall barrier */
602     if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
603     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
604
605     self->simcall.call = SIMCALL_VM_RESUME;
606     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
607     memset(self->simcall.args, 0, sizeof(self->simcall.args));
608     self->simcall.args[0].dp = (void*) ind_vm;
609     if (self != simix_global->maestro_process) {
610       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
611                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
612       SIMIX_process_yield(self);
613     } else {
614       SIMIX_simcall_handle(&self->simcall, 0);
615     }    
616     
617   }
618   
619 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
620     smx_process_t self = SIMIX_process_self();
621
622     /* Go to that function to follow the code flow through the simcall barrier */
623     if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
624     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
625
626     self->simcall.call = SIMCALL_VM_SHUTDOWN;
627     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
628     memset(self->simcall.args, 0, sizeof(self->simcall.args));
629     self->simcall.args[0].dp = (void*) ind_vm;
630     if (self != simix_global->maestro_process) {
631       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
632                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
633       SIMIX_process_yield(self);
634     } else {
635       SIMIX_simcall_handle(&self->simcall, 0);
636     }    
637     
638   }
639   
640 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
641     smx_process_t self = SIMIX_process_self();
642
643     /* Go to that function to follow the code flow through the simcall barrier */
644     if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
645     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
646
647     self->simcall.call = SIMCALL_VM_SAVE;
648     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
649     memset(self->simcall.args, 0, sizeof(self->simcall.args));
650     self->simcall.args[0].dp = (void*) ind_vm;
651     if (self != simix_global->maestro_process) {
652       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
653                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
654       SIMIX_process_yield(self);
655     } else {
656       SIMIX_simcall_handle(&self->simcall, 0);
657     }    
658     
659   }
660   
661 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
662     smx_process_t self = SIMIX_process_self();
663
664     /* Go to that function to follow the code flow through the simcall barrier */
665     if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
666     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
667
668     self->simcall.call = SIMCALL_VM_RESTORE;
669     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
670     memset(self->simcall.args, 0, sizeof(self->simcall.args));
671     self->simcall.args[0].dp = (void*) ind_vm;
672     if (self != simix_global->maestro_process) {
673       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
674                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
675       SIMIX_process_yield(self);
676     } else {
677       SIMIX_simcall_handle(&self->simcall, 0);
678     }    
679     
680   }
681   
682 inline static void simcall_BODY_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) {
683     smx_process_t self = SIMIX_process_self();
684
685     /* Go to that function to follow the code flow through the simcall barrier */
686     if (0) SIMIX_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
687     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
688
689     self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO;
690     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
691     memset(self->simcall.args, 0, sizeof(self->simcall.args));
692     self->simcall.args[0].dp = (void*) vm;
693     self->simcall.args[1].dp = (void*) src_pm;
694     self->simcall.args[2].dp = (void*) dst_pm;
695     if (self != simix_global->maestro_process) {
696       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
697                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
698       SIMIX_process_yield(self);
699     } else {
700       SIMIX_simcall_handle(&self->simcall, 0);
701     }    
702     
703   }
704   
705 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) {
706     smx_process_t self = SIMIX_process_self();
707
708     /* Go to that function to follow the code flow through the simcall barrier */
709     if (0) simcall_HANDLER_process_create(&self->simcall, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
710     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
711
712     self->simcall.call = SIMCALL_PROCESS_CREATE;
713     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
714     memset(self->simcall.args, 0, sizeof(self->simcall.args));
715     self->simcall.args[0].cc = (const char*) name;
716     self->simcall.args[1].fp = (FPtr) code;
717     self->simcall.args[2].dp = (void*) data;
718     self->simcall.args[3].cc = (const char*) hostname;
719     self->simcall.args[4].d = (double) kill_time;
720     self->simcall.args[5].i = (int) argc;
721     self->simcall.args[6].dp = (void*) argv;
722     self->simcall.args[7].dp = (void*) properties;
723     self->simcall.args[8].i = (int) auto_restart;
724     if (self != simix_global->maestro_process) {
725       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
726                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
727       SIMIX_process_yield(self);
728     } else {
729       SIMIX_simcall_handle(&self->simcall, 0);
730     }    
731     return self->simcall.result.dp;
732   }
733   
734 inline static void simcall_BODY_process_kill(smx_process_t process) {
735     smx_process_t self = SIMIX_process_self();
736
737     /* Go to that function to follow the code flow through the simcall barrier */
738     if (0) simcall_HANDLER_process_kill(&self->simcall, process);
739     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
740
741     self->simcall.call = SIMCALL_PROCESS_KILL;
742     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
743     memset(self->simcall.args, 0, sizeof(self->simcall.args));
744     self->simcall.args[0].dp = (void*) process;
745     if (self != simix_global->maestro_process) {
746       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
747                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
748       SIMIX_process_yield(self);
749     } else {
750       SIMIX_simcall_handle(&self->simcall, 0);
751     }    
752     
753   }
754   
755 inline static void simcall_BODY_process_killall(int reset_pid) {
756     smx_process_t self = SIMIX_process_self();
757
758     /* Go to that function to follow the code flow through the simcall barrier */
759     if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
760     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
761
762     self->simcall.call = SIMCALL_PROCESS_KILLALL;
763     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
764     memset(self->simcall.args, 0, sizeof(self->simcall.args));
765     self->simcall.args[0].i = (int) reset_pid;
766     if (self != simix_global->maestro_process) {
767       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
768                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
769       SIMIX_process_yield(self);
770     } else {
771       SIMIX_simcall_handle(&self->simcall, 0);
772     }    
773     
774   }
775   
776 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
777     smx_process_t self = SIMIX_process_self();
778
779     /* Go to that function to follow the code flow through the simcall barrier */
780     if (0) SIMIX_process_cleanup(process);
781     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
782
783     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
784     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
785     memset(self->simcall.args, 0, sizeof(self->simcall.args));
786     self->simcall.args[0].dp = (void*) process;
787     if (self != simix_global->maestro_process) {
788       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
789                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
790       SIMIX_process_yield(self);
791     } else {
792       SIMIX_simcall_handle(&self->simcall, 0);
793     }    
794     
795   }
796   
797 inline static void simcall_BODY_process_suspend(smx_process_t process) {
798     smx_process_t self = SIMIX_process_self();
799
800     /* Go to that function to follow the code flow through the simcall barrier */
801     if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
802     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
803
804     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
805     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
806     memset(self->simcall.args, 0, sizeof(self->simcall.args));
807     self->simcall.args[0].dp = (void*) process;
808     if (self != simix_global->maestro_process) {
809       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
810                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
811       SIMIX_process_yield(self);
812     } else {
813       SIMIX_simcall_handle(&self->simcall, 0);
814     }    
815     
816   }
817   
818 inline static void simcall_BODY_process_resume(smx_process_t process) {
819     smx_process_t self = SIMIX_process_self();
820
821     /* Go to that function to follow the code flow through the simcall barrier */
822     if (0) simcall_HANDLER_process_resume(&self->simcall, process);
823     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
824
825     self->simcall.call = SIMCALL_PROCESS_RESUME;
826     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
827     memset(self->simcall.args, 0, sizeof(self->simcall.args));
828     self->simcall.args[0].dp = (void*) process;
829     if (self != simix_global->maestro_process) {
830       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
831                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
832       SIMIX_process_yield(self);
833     } else {
834       SIMIX_simcall_handle(&self->simcall, 0);
835     }    
836     
837   }
838   
839 inline static int simcall_BODY_process_count() {
840     smx_process_t self = SIMIX_process_self();
841
842     /* Go to that function to follow the code flow through the simcall barrier */
843     if (0) SIMIX_process_count();
844     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
845
846     self->simcall.call = SIMCALL_PROCESS_COUNT;
847     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
848     memset(self->simcall.args, 0, sizeof(self->simcall.args));
849
850     if (self != simix_global->maestro_process) {
851       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
852                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
853       SIMIX_process_yield(self);
854     } else {
855       SIMIX_simcall_handle(&self->simcall, 0);
856     }    
857     return self->simcall.result.i;
858   }
859   
860 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
861     smx_process_t self = SIMIX_process_self();
862
863     /* Go to that function to follow the code flow through the simcall barrier */
864     if (0) SIMIX_process_get_PID(process);
865     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
866
867     self->simcall.call = SIMCALL_PROCESS_GET_PID;
868     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
869     memset(self->simcall.args, 0, sizeof(self->simcall.args));
870     self->simcall.args[0].dp = (void*) process;
871     if (self != simix_global->maestro_process) {
872       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
873                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
874       SIMIX_process_yield(self);
875     } else {
876       SIMIX_simcall_handle(&self->simcall, 0);
877     }    
878     return self->simcall.result.i;
879   }
880   
881 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
882     smx_process_t self = SIMIX_process_self();
883
884     /* Go to that function to follow the code flow through the simcall barrier */
885     if (0) SIMIX_process_get_PPID(process);
886     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
887
888     self->simcall.call = SIMCALL_PROCESS_GET_PPID;
889     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
890     memset(self->simcall.args, 0, sizeof(self->simcall.args));
891     self->simcall.args[0].dp = (void*) process;
892     if (self != simix_global->maestro_process) {
893       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
894                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
895       SIMIX_process_yield(self);
896     } else {
897       SIMIX_simcall_handle(&self->simcall, 0);
898     }    
899     return self->simcall.result.i;
900   }
901   
902 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
903     smx_process_t self = SIMIX_process_self();
904
905     /* Go to that function to follow the code flow through the simcall barrier */
906     if (0) SIMIX_process_get_data(process);
907     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
908
909     self->simcall.call = SIMCALL_PROCESS_GET_DATA;
910     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
911     memset(self->simcall.args, 0, sizeof(self->simcall.args));
912     self->simcall.args[0].dp = (void*) process;
913     if (self != simix_global->maestro_process) {
914       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
915                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
916       SIMIX_process_yield(self);
917     } else {
918       SIMIX_simcall_handle(&self->simcall, 0);
919     }    
920     return self->simcall.result.dp;
921   }
922   
923 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
924     smx_process_t self = SIMIX_process_self();
925
926     /* Go to that function to follow the code flow through the simcall barrier */
927     if (0) SIMIX_process_set_data(process, data);
928     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
929
930     self->simcall.call = SIMCALL_PROCESS_SET_DATA;
931     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
932     memset(self->simcall.args, 0, sizeof(self->simcall.args));
933     self->simcall.args[0].dp = (void*) process;
934     self->simcall.args[1].dp = (void*) data;
935     if (self != simix_global->maestro_process) {
936       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
937                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
938       SIMIX_process_yield(self);
939     } else {
940       SIMIX_simcall_handle(&self->simcall, 0);
941     }    
942     
943   }
944   
945 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
946     smx_process_t self = SIMIX_process_self();
947
948     /* Go to that function to follow the code flow through the simcall barrier */
949     if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
950     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
951
952     self->simcall.call = SIMCALL_PROCESS_SET_HOST;
953     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
954     memset(self->simcall.args, 0, sizeof(self->simcall.args));
955     self->simcall.args[0].dp = (void*) process;
956     self->simcall.args[1].dp = (void*) dest;
957     if (self != simix_global->maestro_process) {
958       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
959                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
960       SIMIX_process_yield(self);
961     } else {
962       SIMIX_simcall_handle(&self->simcall, 0);
963     }    
964     
965   }
966   
967 inline static sg_host_t simcall_BODY_process_get_host(smx_process_t process) {
968     smx_process_t self = SIMIX_process_self();
969
970     /* Go to that function to follow the code flow through the simcall barrier */
971     if (0) SIMIX_process_get_host(process);
972     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
973
974     self->simcall.call = SIMCALL_PROCESS_GET_HOST;
975     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
976     memset(self->simcall.args, 0, sizeof(self->simcall.args));
977     self->simcall.args[0].dp = (void*) process;
978     if (self != simix_global->maestro_process) {
979       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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     return self->simcall.result.dp;
986   }
987   
988 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
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_process_get_name(process);
993     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
994
995     self->simcall.call = SIMCALL_PROCESS_GET_NAME;
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*) process;
999     if (self != simix_global->maestro_process) {
1000       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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     return self->simcall.result.cc;
1007   }
1008   
1009 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
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_process_is_suspended(process);
1014     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1015
1016     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
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].dp = (void*) process;
1020     if (self != simix_global->maestro_process) {
1021       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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 self->simcall.result.i;
1028   }
1029   
1030 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
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) SIMIX_process_get_properties(process);
1035     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1036
1037     self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
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*) process;
1041     if (self != simix_global->maestro_process) {
1042       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
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     return self->simcall.result.dp;
1049   }
1050   
1051 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
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_process_join(&self->simcall, process, timeout);
1056     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1057
1058     self->simcall.call = SIMCALL_PROCESS_JOIN;
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*) process;
1062     self->simcall.args[1].d = (double) timeout;
1063     if (self != simix_global->maestro_process) {
1064       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1065                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1066       SIMIX_process_yield(self);
1067     } else {
1068       SIMIX_simcall_handle(&self->simcall, 0);
1069     }    
1070     return self->simcall.result.i;
1071   }
1072   
1073 inline static int simcall_BODY_process_sleep(double duration) {
1074     smx_process_t self = SIMIX_process_self();
1075
1076     /* Go to that function to follow the code flow through the simcall barrier */
1077     if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
1078     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1079
1080     self->simcall.call = SIMCALL_PROCESS_SLEEP;
1081     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1082     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1083     self->simcall.args[0].d = (double) duration;
1084     if (self != simix_global->maestro_process) {
1085       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1086                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1087       SIMIX_process_yield(self);
1088     } else {
1089       SIMIX_simcall_handle(&self->simcall, 0);
1090     }    
1091     return self->simcall.result.i;
1092   }
1093   
1094 inline static smx_synchro_t simcall_BODY_process_execute(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
1095     smx_process_t self = SIMIX_process_self();
1096
1097     /* Go to that function to follow the code flow through the simcall barrier */
1098     if (0) simcall_HANDLER_process_execute(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
1099     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1100
1101     self->simcall.call = SIMCALL_PROCESS_EXECUTE;
1102     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1103     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1104     self->simcall.args[0].cc = (const char*) name;
1105     self->simcall.args[1].d = (double) flops_amount;
1106     self->simcall.args[2].d = (double) priority;
1107     self->simcall.args[3].d = (double) bound;
1108     self->simcall.args[4].ul = (unsigned long) affinity_mask;
1109     if (self != simix_global->maestro_process) {
1110       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1111                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1112       SIMIX_process_yield(self);
1113     } else {
1114       SIMIX_simcall_handle(&self->simcall, 0);
1115     }    
1116     return self->simcall.result.dp;
1117   }
1118   
1119 inline static smx_synchro_t simcall_BODY_process_parallel_execute(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
1120     smx_process_t self = SIMIX_process_self();
1121
1122     /* Go to that function to follow the code flow through the simcall barrier */
1123     if (0) SIMIX_process_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
1124     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1125
1126     self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
1127     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1128     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1129     self->simcall.args[0].cc = (const char*) name;
1130     self->simcall.args[1].i = (int) host_nb;
1131     self->simcall.args[2].dp = (void*) host_list;
1132     self->simcall.args[3].dp = (void*) flops_amount;
1133     self->simcall.args[4].dp = (void*) bytes_amount;
1134     self->simcall.args[5].d = (double) amount;
1135     self->simcall.args[6].d = (double) rate;
1136     if (self != simix_global->maestro_process) {
1137       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1138                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1139       SIMIX_process_yield(self);
1140     } else {
1141       SIMIX_simcall_handle(&self->simcall, 0);
1142     }    
1143     return self->simcall.result.dp;
1144   }
1145   
1146 inline static void simcall_BODY_process_execution_destroy(smx_synchro_t execution) {
1147     smx_process_t self = SIMIX_process_self();
1148
1149     /* Go to that function to follow the code flow through the simcall barrier */
1150     if (0) SIMIX_process_execution_destroy(execution);
1151     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1152
1153     self->simcall.call = SIMCALL_PROCESS_EXECUTION_DESTROY;
1154     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1155     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1156     self->simcall.args[0].dp = (void*) execution;
1157     if (self != simix_global->maestro_process) {
1158       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1159                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1160       SIMIX_process_yield(self);
1161     } else {
1162       SIMIX_simcall_handle(&self->simcall, 0);
1163     }    
1164     
1165   }
1166   
1167 inline static void simcall_BODY_process_execution_cancel(smx_synchro_t execution) {
1168     smx_process_t self = SIMIX_process_self();
1169
1170     /* Go to that function to follow the code flow through the simcall barrier */
1171     if (0) SIMIX_process_execution_cancel(execution);
1172     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1173
1174     self->simcall.call = SIMCALL_PROCESS_EXECUTION_CANCEL;
1175     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1176     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1177     self->simcall.args[0].dp = (void*) execution;
1178     if (self != simix_global->maestro_process) {
1179       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1180                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1181       SIMIX_process_yield(self);
1182     } else {
1183       SIMIX_simcall_handle(&self->simcall, 0);
1184     }    
1185     
1186   }
1187   
1188 inline static double simcall_BODY_process_execution_get_remains(smx_synchro_t execution) {
1189     smx_process_t self = SIMIX_process_self();
1190
1191     /* Go to that function to follow the code flow through the simcall barrier */
1192     if (0) SIMIX_process_execution_get_remains(execution);
1193     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1194
1195     self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_REMAINS;
1196     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1197     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1198     self->simcall.args[0].dp = (void*) execution;
1199     if (self != simix_global->maestro_process) {
1200       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1201                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1202       SIMIX_process_yield(self);
1203     } else {
1204       SIMIX_simcall_handle(&self->simcall, 0);
1205     }    
1206     return self->simcall.result.d;
1207   }
1208   
1209 inline static e_smx_state_t simcall_BODY_process_execution_get_state(smx_synchro_t execution) {
1210     smx_process_t self = SIMIX_process_self();
1211
1212     /* Go to that function to follow the code flow through the simcall barrier */
1213     if (0) SIMIX_process_execution_get_state(execution);
1214     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1215
1216     self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_STATE;
1217     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1218     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1219     self->simcall.args[0].dp = (void*) execution;
1220     if (self != simix_global->maestro_process) {
1221       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1222                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1223       SIMIX_process_yield(self);
1224     } else {
1225       SIMIX_simcall_handle(&self->simcall, 0);
1226     }    
1227     return self->simcall.result.i;
1228   }
1229   
1230 inline static void simcall_BODY_process_execution_set_priority(smx_synchro_t execution, double priority) {
1231     smx_process_t self = SIMIX_process_self();
1232
1233     /* Go to that function to follow the code flow through the simcall barrier */
1234     if (0) SIMIX_process_execution_set_priority(execution, priority);
1235     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1236
1237     self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_PRIORITY;
1238     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1239     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1240     self->simcall.args[0].dp = (void*) execution;
1241     self->simcall.args[1].d = (double) priority;
1242     if (self != simix_global->maestro_process) {
1243       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1244                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1245       SIMIX_process_yield(self);
1246     } else {
1247       SIMIX_simcall_handle(&self->simcall, 0);
1248     }    
1249     
1250   }
1251   
1252 inline static void simcall_BODY_process_execution_set_bound(smx_synchro_t execution, double bound) {
1253     smx_process_t self = SIMIX_process_self();
1254
1255     /* Go to that function to follow the code flow through the simcall barrier */
1256     if (0) SIMIX_process_execution_set_bound(execution, bound);
1257     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1258
1259     self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_BOUND;
1260     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1261     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1262     self->simcall.args[0].dp = (void*) execution;
1263     self->simcall.args[1].d = (double) bound;
1264     if (self != simix_global->maestro_process) {
1265       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1266                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1267       SIMIX_process_yield(self);
1268     } else {
1269       SIMIX_simcall_handle(&self->simcall, 0);
1270     }    
1271     
1272   }
1273   
1274 inline static void simcall_BODY_process_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
1275     smx_process_t self = SIMIX_process_self();
1276
1277     /* Go to that function to follow the code flow through the simcall barrier */
1278     if (0) SIMIX_process_execution_set_affinity(execution, ws, mask);
1279     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1280
1281     self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_AFFINITY;
1282     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1283     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1284     self->simcall.args[0].dp = (void*) execution;
1285     self->simcall.args[1].dp = (void*) ws;
1286     self->simcall.args[2].ul = (unsigned long) mask;
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     
1295   }
1296   
1297 inline static int simcall_BODY_process_execution_wait(smx_synchro_t execution) {
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_process_execution_wait(&self->simcall, execution);
1302     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1303
1304     self->simcall.call = SIMCALL_PROCESS_EXECUTION_WAIT;
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*) execution;
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 self->simcall.result.i;
1316   }
1317   
1318 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
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) SIMIX_process_on_exit(process, fun, data);
1323     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1324
1325     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
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*) process;
1329     self->simcall.args[1].fp = (FPtr) fun;
1330     self->simcall.args[2].dp = (void*) data;
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     
1339   }
1340   
1341 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
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) SIMIX_process_auto_restart_set(process, auto_restart);
1346     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1347
1348     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
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*) process;
1352     self->simcall.args[1].i = (int) auto_restart;
1353     if (self != simix_global->maestro_process) {
1354       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1355                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1356       SIMIX_process_yield(self);
1357     } else {
1358       SIMIX_simcall_handle(&self->simcall, 0);
1359     }    
1360     
1361   }
1362   
1363 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1364     smx_process_t self = SIMIX_process_self();
1365
1366     /* Go to that function to follow the code flow through the simcall barrier */
1367     if (0) simcall_HANDLER_process_restart(&self->simcall, process);
1368     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1369
1370     self->simcall.call = SIMCALL_PROCESS_RESTART;
1371     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1372     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1373     self->simcall.args[0].dp = (void*) process;
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 self->simcall.result.dp;
1382   }
1383   
1384 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
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) SIMIX_rdv_create(name);
1389     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1390
1391     self->simcall.call = SIMCALL_RDV_CREATE;
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].cc = (const char*) name;
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 self->simcall.result.dp;
1403   }
1404   
1405 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
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) SIMIX_rdv_destroy(rdv);
1410     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1411
1412     self->simcall.call = SIMCALL_RDV_DESTROY;
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*) rdv;
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     
1424   }
1425   
1426 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) {
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_rdv_comm_count_by_host(rdv, host);
1431     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1432
1433     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
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*) rdv;
1437     self->simcall.args[1].dp = (void*) host;
1438     if (self != simix_global->maestro_process) {
1439       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1440                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1441       SIMIX_process_yield(self);
1442     } else {
1443       SIMIX_simcall_handle(&self->simcall, 0);
1444     }    
1445     return self->simcall.result.ui;
1446   }
1447   
1448 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1449     smx_process_t self = SIMIX_process_self();
1450
1451     /* Go to that function to follow the code flow through the simcall barrier */
1452     if (0) SIMIX_rdv_get_head(rdv);
1453     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1454
1455     self->simcall.call = SIMCALL_RDV_GET_HEAD;
1456     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1457     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1458     self->simcall.args[0].dp = (void*) rdv;
1459     if (self != simix_global->maestro_process) {
1460       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1461                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1462       SIMIX_process_yield(self);
1463     } else {
1464       SIMIX_simcall_handle(&self->simcall, 0);
1465     }    
1466     return self->simcall.result.dp;
1467   }
1468   
1469 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1470     smx_process_t self = SIMIX_process_self();
1471
1472     /* Go to that function to follow the code flow through the simcall barrier */
1473     if (0) SIMIX_rdv_set_receiver(rdv, receiver);
1474     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1475
1476     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1477     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1478     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1479     self->simcall.args[0].dp = (void*) rdv;
1480     self->simcall.args[1].dp = (void*) receiver;
1481     if (self != simix_global->maestro_process) {
1482       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1483                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1484       SIMIX_process_yield(self);
1485     } else {
1486       SIMIX_simcall_handle(&self->simcall, 0);
1487     }    
1488     
1489   }
1490   
1491 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1492     smx_process_t self = SIMIX_process_self();
1493
1494     /* Go to that function to follow the code flow through the simcall barrier */
1495     if (0) SIMIX_rdv_get_receiver(rdv);
1496     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1497
1498     self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1499     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1500     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1501     self->simcall.args[0].dp = (void*) rdv;
1502     if (self != simix_global->maestro_process) {
1503       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1504                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1505       SIMIX_process_yield(self);
1506     } else {
1507       SIMIX_simcall_handle(&self->simcall, 0);
1508     }    
1509     return self->simcall.result.dp;
1510   }
1511   
1512 inline static smx_synchro_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
1513     smx_process_t self = SIMIX_process_self();
1514
1515     /* Go to that function to follow the code flow through the simcall barrier */
1516     if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1517     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1518
1519     self->simcall.call = SIMCALL_COMM_IPROBE;
1520     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1521     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1522     self->simcall.args[0].dp = (void*) rdv;
1523     self->simcall.args[1].i = (int) type;
1524     self->simcall.args[2].i = (int) src;
1525     self->simcall.args[3].i = (int) tag;
1526     self->simcall.args[4].fp = (FPtr) match_fun;
1527     self->simcall.args[5].dp = (void*) data;
1528     if (self != simix_global->maestro_process) {
1529       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1530                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1531       SIMIX_process_yield(self);
1532     } else {
1533       SIMIX_simcall_handle(&self->simcall, 0);
1534     }    
1535     return self->simcall.result.dp;
1536   }
1537   
1538 inline static void simcall_BODY_comm_send(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
1539     smx_process_t self = SIMIX_process_self();
1540
1541     /* Go to that function to follow the code flow through the simcall barrier */
1542     if (0) simcall_HANDLER_comm_send(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
1543     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1544
1545     self->simcall.call = SIMCALL_COMM_SEND;
1546     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1547     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1548     self->simcall.args[0].dp = (void*) sender;
1549     self->simcall.args[1].dp = (void*) rdv;
1550     self->simcall.args[2].d = (double) task_size;
1551     self->simcall.args[3].d = (double) rate;
1552     self->simcall.args[4].dp = (void*) src_buff;
1553     self->simcall.args[5].sz = (size_t) src_buff_size;
1554     self->simcall.args[6].fp = (FPtr) match_fun;
1555     self->simcall.args[7].fp = (FPtr) copy_data_fun;
1556     self->simcall.args[8].dp = (void*) data;
1557     self->simcall.args[9].d = (double) timeout;
1558     if (self != simix_global->maestro_process) {
1559       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1560                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1561       SIMIX_process_yield(self);
1562     } else {
1563       SIMIX_simcall_handle(&self->simcall, 0);
1564     }    
1565     
1566   }
1567   
1568 inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
1569     smx_process_t self = SIMIX_process_self();
1570
1571     /* Go to that function to follow the code flow through the simcall barrier */
1572     if (0) simcall_HANDLER_comm_isend(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
1573     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1574
1575     self->simcall.call = SIMCALL_COMM_ISEND;
1576     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1577     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1578     self->simcall.args[0].dp = (void*) sender;
1579     self->simcall.args[1].dp = (void*) rdv;
1580     self->simcall.args[2].d = (double) task_size;
1581     self->simcall.args[3].d = (double) rate;
1582     self->simcall.args[4].dp = (void*) src_buff;
1583     self->simcall.args[5].sz = (size_t) src_buff_size;
1584     self->simcall.args[6].fp = (FPtr) match_fun;
1585     self->simcall.args[7].fp = (FPtr) clean_fun;
1586     self->simcall.args[8].fp = (FPtr) copy_data_fun;
1587     self->simcall.args[9].dp = (void*) data;
1588     self->simcall.args[10].i = (int) detached;
1589     if (self != simix_global->maestro_process) {
1590       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1591                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1592       SIMIX_process_yield(self);
1593     } else {
1594       SIMIX_simcall_handle(&self->simcall, 0);
1595     }    
1596     return self->simcall.result.dp;
1597   }
1598   
1599 inline static void simcall_BODY_comm_recv(smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
1600     smx_process_t self = SIMIX_process_self();
1601
1602     /* Go to that function to follow the code flow through the simcall barrier */
1603     if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1604     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1605
1606     self->simcall.call = SIMCALL_COMM_RECV;
1607     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1608     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1609     self->simcall.args[0].dp = (void*) receiver;
1610     self->simcall.args[1].dp = (void*) rdv;
1611     self->simcall.args[2].dp = (void*) dst_buff;
1612     self->simcall.args[3].dp = (void*) dst_buff_size;
1613     self->simcall.args[4].fp = (FPtr) match_fun;
1614     self->simcall.args[5].fp = (FPtr) copy_data_fun;
1615     self->simcall.args[6].dp = (void*) data;
1616     self->simcall.args[7].d = (double) timeout;
1617     self->simcall.args[8].d = (double) rate;
1618     if (self != simix_global->maestro_process) {
1619       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1620                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1621       SIMIX_process_yield(self);
1622     } else {
1623       SIMIX_simcall_handle(&self->simcall, 0);
1624     }    
1625     
1626   }
1627   
1628 inline static smx_synchro_t simcall_BODY_comm_irecv(smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
1629     smx_process_t self = SIMIX_process_self();
1630
1631     /* Go to that function to follow the code flow through the simcall barrier */
1632     if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1633     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1634
1635     self->simcall.call = SIMCALL_COMM_IRECV;
1636     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1637     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1638     self->simcall.args[0].dp = (void*) receiver;
1639     self->simcall.args[1].dp = (void*) rdv;
1640     self->simcall.args[2].dp = (void*) dst_buff;
1641     self->simcall.args[3].dp = (void*) dst_buff_size;
1642     self->simcall.args[4].fp = (FPtr) match_fun;
1643     self->simcall.args[5].fp = (FPtr) copy_data_fun;
1644     self->simcall.args[6].dp = (void*) data;
1645     self->simcall.args[7].d = (double) rate;
1646     if (self != simix_global->maestro_process) {
1647       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1648                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1649       SIMIX_process_yield(self);
1650     } else {
1651       SIMIX_simcall_handle(&self->simcall, 0);
1652     }    
1653     return self->simcall.result.dp;
1654   }
1655   
1656 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
1657     smx_process_t self = SIMIX_process_self();
1658
1659     /* Go to that function to follow the code flow through the simcall barrier */
1660     if (0) SIMIX_comm_cancel(comm);
1661     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1662
1663     self->simcall.call = SIMCALL_COMM_CANCEL;
1664     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1665     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1666     self->simcall.args[0].dp = (void*) comm;
1667     if (self != simix_global->maestro_process) {
1668       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1669                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1670       SIMIX_process_yield(self);
1671     } else {
1672       SIMIX_simcall_handle(&self->simcall, 0);
1673     }    
1674     
1675   }
1676   
1677 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1678     smx_process_t self = SIMIX_process_self();
1679
1680     /* Go to that function to follow the code flow through the simcall barrier */
1681     if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
1682     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1683
1684     self->simcall.call = SIMCALL_COMM_WAITANY;
1685     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1686     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1687     self->simcall.args[0].dp = (void*) comms;
1688     if (self != simix_global->maestro_process) {
1689       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1690                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1691       SIMIX_process_yield(self);
1692     } else {
1693       SIMIX_simcall_handle(&self->simcall, 0);
1694     }    
1695     return self->simcall.result.i;
1696   }
1697   
1698 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
1699     smx_process_t self = SIMIX_process_self();
1700
1701     /* Go to that function to follow the code flow through the simcall barrier */
1702     if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
1703     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1704
1705     self->simcall.call = SIMCALL_COMM_WAIT;
1706     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1707     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1708     self->simcall.args[0].dp = (void*) comm;
1709     self->simcall.args[1].d = (double) timeout;
1710     if (self != simix_global->maestro_process) {
1711       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1712                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1713       SIMIX_process_yield(self);
1714     } else {
1715       SIMIX_simcall_handle(&self->simcall, 0);
1716     }    
1717     
1718   }
1719   
1720 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
1721     smx_process_t self = SIMIX_process_self();
1722
1723     /* Go to that function to follow the code flow through the simcall barrier */
1724     if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
1725     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1726
1727     self->simcall.call = SIMCALL_COMM_TEST;
1728     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1729     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1730     self->simcall.args[0].dp = (void*) comm;
1731     if (self != simix_global->maestro_process) {
1732       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1733                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1734       SIMIX_process_yield(self);
1735     } else {
1736       SIMIX_simcall_handle(&self->simcall, 0);
1737     }    
1738     return self->simcall.result.i;
1739   }
1740   
1741 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1742     smx_process_t self = SIMIX_process_self();
1743
1744     /* Go to that function to follow the code flow through the simcall barrier */
1745     if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
1746     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1747
1748     self->simcall.call = SIMCALL_COMM_TESTANY;
1749     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1750     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1751     self->simcall.args[0].dp = (void*) comms;
1752     if (self != simix_global->maestro_process) {
1753       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1754                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1755       SIMIX_process_yield(self);
1756     } else {
1757       SIMIX_simcall_handle(&self->simcall, 0);
1758     }    
1759     return self->simcall.result.i;
1760   }
1761   
1762 inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
1763     smx_process_t self = SIMIX_process_self();
1764
1765     /* Go to that function to follow the code flow through the simcall barrier */
1766     if (0) SIMIX_comm_get_remains(comm);
1767     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1768
1769     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1770     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1771     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1772     self->simcall.args[0].dp = (void*) comm;
1773     if (self != simix_global->maestro_process) {
1774       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1775                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1776       SIMIX_process_yield(self);
1777     } else {
1778       SIMIX_simcall_handle(&self->simcall, 0);
1779     }    
1780     return self->simcall.result.d;
1781   }
1782   
1783 inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
1784     smx_process_t self = SIMIX_process_self();
1785
1786     /* Go to that function to follow the code flow through the simcall barrier */
1787     if (0) SIMIX_comm_get_state(comm);
1788     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1789
1790     self->simcall.call = SIMCALL_COMM_GET_STATE;
1791     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1792     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1793     self->simcall.args[0].dp = (void*) comm;
1794     if (self != simix_global->maestro_process) {
1795       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1796                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1797       SIMIX_process_yield(self);
1798     } else {
1799       SIMIX_simcall_handle(&self->simcall, 0);
1800     }    
1801     return self->simcall.result.i;
1802   }
1803   
1804 inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
1805     smx_process_t self = SIMIX_process_self();
1806
1807     /* Go to that function to follow the code flow through the simcall barrier */
1808     if (0) SIMIX_comm_get_src_data(comm);
1809     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1810
1811     self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1812     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1813     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1814     self->simcall.args[0].dp = (void*) comm;
1815     if (self != simix_global->maestro_process) {
1816       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1817                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1818       SIMIX_process_yield(self);
1819     } else {
1820       SIMIX_simcall_handle(&self->simcall, 0);
1821     }    
1822     return self->simcall.result.dp;
1823   }
1824   
1825 inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
1826     smx_process_t self = SIMIX_process_self();
1827
1828     /* Go to that function to follow the code flow through the simcall barrier */
1829     if (0) SIMIX_comm_get_dst_data(comm);
1830     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1831
1832     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1833     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1834     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1835     self->simcall.args[0].dp = (void*) comm;
1836     if (self != simix_global->maestro_process) {
1837       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1838                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1839       SIMIX_process_yield(self);
1840     } else {
1841       SIMIX_simcall_handle(&self->simcall, 0);
1842     }    
1843     return self->simcall.result.dp;
1844   }
1845   
1846 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_synchro_t comm) {
1847     smx_process_t self = SIMIX_process_self();
1848
1849     /* Go to that function to follow the code flow through the simcall barrier */
1850     if (0) SIMIX_comm_get_src_proc(comm);
1851     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1852
1853     self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1854     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1855     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1856     self->simcall.args[0].dp = (void*) comm;
1857     if (self != simix_global->maestro_process) {
1858       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1859                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1860       SIMIX_process_yield(self);
1861     } else {
1862       SIMIX_simcall_handle(&self->simcall, 0);
1863     }    
1864     return self->simcall.result.dp;
1865   }
1866   
1867 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_synchro_t comm) {
1868     smx_process_t self = SIMIX_process_self();
1869
1870     /* Go to that function to follow the code flow through the simcall barrier */
1871     if (0) SIMIX_comm_get_dst_proc(comm);
1872     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1873
1874     self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1875     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1876     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1877     self->simcall.args[0].dp = (void*) comm;
1878     if (self != simix_global->maestro_process) {
1879       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1880                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1881       SIMIX_process_yield(self);
1882     } else {
1883       SIMIX_simcall_handle(&self->simcall, 0);
1884     }    
1885     return self->simcall.result.dp;
1886   }
1887   
1888 inline static smx_mutex_t simcall_BODY_mutex_init() {
1889     smx_process_t self = SIMIX_process_self();
1890
1891     /* Go to that function to follow the code flow through the simcall barrier */
1892     if (0) simcall_HANDLER_mutex_init(&self->simcall);
1893     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1894
1895     self->simcall.call = SIMCALL_MUTEX_INIT;
1896     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1897     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1898
1899     if (self != simix_global->maestro_process) {
1900       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1901                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1902       SIMIX_process_yield(self);
1903     } else {
1904       SIMIX_simcall_handle(&self->simcall, 0);
1905     }    
1906     return self->simcall.result.dp;
1907   }
1908   
1909 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1910     smx_process_t self = SIMIX_process_self();
1911
1912     /* Go to that function to follow the code flow through the simcall barrier */
1913     if (0) SIMIX_mutex_destroy(mutex);
1914     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1915
1916     self->simcall.call = SIMCALL_MUTEX_DESTROY;
1917     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1918     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1919     self->simcall.args[0].dp = (void*) mutex;
1920     if (self != simix_global->maestro_process) {
1921       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1922                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1923       SIMIX_process_yield(self);
1924     } else {
1925       SIMIX_simcall_handle(&self->simcall, 0);
1926     }    
1927     
1928   }
1929   
1930 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1931     smx_process_t self = SIMIX_process_self();
1932
1933     /* Go to that function to follow the code flow through the simcall barrier */
1934     if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1935     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1936
1937     self->simcall.call = SIMCALL_MUTEX_LOCK;
1938     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1939     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1940     self->simcall.args[0].dp = (void*) mutex;
1941     if (self != simix_global->maestro_process) {
1942       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1943                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1944       SIMIX_process_yield(self);
1945     } else {
1946       SIMIX_simcall_handle(&self->simcall, 0);
1947     }    
1948     
1949   }
1950   
1951 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1952     smx_process_t self = SIMIX_process_self();
1953
1954     /* Go to that function to follow the code flow through the simcall barrier */
1955     if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
1956     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1957
1958     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1959     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1960     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1961     self->simcall.args[0].dp = (void*) mutex;
1962     if (self != simix_global->maestro_process) {
1963       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1964                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1965       SIMIX_process_yield(self);
1966     } else {
1967       SIMIX_simcall_handle(&self->simcall, 0);
1968     }    
1969     return self->simcall.result.i;
1970   }
1971   
1972 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1973     smx_process_t self = SIMIX_process_self();
1974
1975     /* Go to that function to follow the code flow through the simcall barrier */
1976     if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
1977     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1978
1979     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1980     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1981     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1982     self->simcall.args[0].dp = (void*) mutex;
1983     if (self != simix_global->maestro_process) {
1984       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1985                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1986       SIMIX_process_yield(self);
1987     } else {
1988       SIMIX_simcall_handle(&self->simcall, 0);
1989     }    
1990     
1991   }
1992   
1993 inline static smx_cond_t simcall_BODY_cond_init() {
1994     smx_process_t self = SIMIX_process_self();
1995
1996     /* Go to that function to follow the code flow through the simcall barrier */
1997     if (0) SIMIX_cond_init();
1998     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1999
2000     self->simcall.call = SIMCALL_COND_INIT;
2001     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2002     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2003
2004     if (self != simix_global->maestro_process) {
2005       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2006                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2007       SIMIX_process_yield(self);
2008     } else {
2009       SIMIX_simcall_handle(&self->simcall, 0);
2010     }    
2011     return self->simcall.result.dp;
2012   }
2013   
2014 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
2015     smx_process_t self = SIMIX_process_self();
2016
2017     /* Go to that function to follow the code flow through the simcall barrier */
2018     if (0) SIMIX_cond_destroy(cond);
2019     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2020
2021     self->simcall.call = SIMCALL_COND_DESTROY;
2022     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2023     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2024     self->simcall.args[0].dp = (void*) cond;
2025     if (self != simix_global->maestro_process) {
2026       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2027                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2028       SIMIX_process_yield(self);
2029     } else {
2030       SIMIX_simcall_handle(&self->simcall, 0);
2031     }    
2032     
2033   }
2034   
2035 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
2036     smx_process_t self = SIMIX_process_self();
2037
2038     /* Go to that function to follow the code flow through the simcall barrier */
2039     if (0) SIMIX_cond_signal(cond);
2040     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2041
2042     self->simcall.call = SIMCALL_COND_SIGNAL;
2043     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2044     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2045     self->simcall.args[0].dp = (void*) cond;
2046     if (self != simix_global->maestro_process) {
2047       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2048                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2049       SIMIX_process_yield(self);
2050     } else {
2051       SIMIX_simcall_handle(&self->simcall, 0);
2052     }    
2053     
2054   }
2055   
2056 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
2057     smx_process_t self = SIMIX_process_self();
2058
2059     /* Go to that function to follow the code flow through the simcall barrier */
2060     if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
2061     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2062
2063     self->simcall.call = SIMCALL_COND_WAIT;
2064     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2065     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2066     self->simcall.args[0].dp = (void*) cond;
2067     self->simcall.args[1].dp = (void*) mutex;
2068     if (self != simix_global->maestro_process) {
2069       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2070                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2071       SIMIX_process_yield(self);
2072     } else {
2073       SIMIX_simcall_handle(&self->simcall, 0);
2074     }    
2075     
2076   }
2077   
2078 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
2079     smx_process_t self = SIMIX_process_self();
2080
2081     /* Go to that function to follow the code flow through the simcall barrier */
2082     if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
2083     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2084
2085     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
2086     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2087     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2088     self->simcall.args[0].dp = (void*) cond;
2089     self->simcall.args[1].dp = (void*) mutex;
2090     self->simcall.args[2].d = (double) timeout;
2091     if (self != simix_global->maestro_process) {
2092       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2093                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2094       SIMIX_process_yield(self);
2095     } else {
2096       SIMIX_simcall_handle(&self->simcall, 0);
2097     }    
2098     
2099   }
2100   
2101 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
2102     smx_process_t self = SIMIX_process_self();
2103
2104     /* Go to that function to follow the code flow through the simcall barrier */
2105     if (0) SIMIX_cond_broadcast(cond);
2106     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2107
2108     self->simcall.call = SIMCALL_COND_BROADCAST;
2109     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2110     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2111     self->simcall.args[0].dp = (void*) cond;
2112     if (self != simix_global->maestro_process) {
2113       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2114                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2115       SIMIX_process_yield(self);
2116     } else {
2117       SIMIX_simcall_handle(&self->simcall, 0);
2118     }    
2119     
2120   }
2121   
2122 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
2123     smx_process_t self = SIMIX_process_self();
2124
2125     /* Go to that function to follow the code flow through the simcall barrier */
2126     if (0) SIMIX_sem_init(capacity);
2127     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2128
2129     self->simcall.call = SIMCALL_SEM_INIT;
2130     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2131     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2132     self->simcall.args[0].ui = (unsigned int) capacity;
2133     if (self != simix_global->maestro_process) {
2134       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2135                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2136       SIMIX_process_yield(self);
2137     } else {
2138       SIMIX_simcall_handle(&self->simcall, 0);
2139     }    
2140     return self->simcall.result.dp;
2141   }
2142   
2143 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2144     smx_process_t self = SIMIX_process_self();
2145
2146     /* Go to that function to follow the code flow through the simcall barrier */
2147     if (0) SIMIX_sem_destroy(sem);
2148     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2149
2150     self->simcall.call = SIMCALL_SEM_DESTROY;
2151     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2152     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2153     self->simcall.args[0].dp = (void*) sem;
2154     if (self != simix_global->maestro_process) {
2155       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2156                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2157       SIMIX_process_yield(self);
2158     } else {
2159       SIMIX_simcall_handle(&self->simcall, 0);
2160     }    
2161     
2162   }
2163   
2164 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2165     smx_process_t self = SIMIX_process_self();
2166
2167     /* Go to that function to follow the code flow through the simcall barrier */
2168     if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
2169     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2170
2171     self->simcall.call = SIMCALL_SEM_RELEASE;
2172     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2173     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2174     self->simcall.args[0].dp = (void*) sem;
2175     if (self != simix_global->maestro_process) {
2176       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2177                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2178       SIMIX_process_yield(self);
2179     } else {
2180       SIMIX_simcall_handle(&self->simcall, 0);
2181     }    
2182     
2183   }
2184   
2185 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2186     smx_process_t self = SIMIX_process_self();
2187
2188     /* Go to that function to follow the code flow through the simcall barrier */
2189     if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
2190     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2191
2192     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2193     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2194     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2195     self->simcall.args[0].dp = (void*) sem;
2196     if (self != simix_global->maestro_process) {
2197       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2198                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2199       SIMIX_process_yield(self);
2200     } else {
2201       SIMIX_simcall_handle(&self->simcall, 0);
2202     }    
2203     return self->simcall.result.i;
2204   }
2205   
2206 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2207     smx_process_t self = SIMIX_process_self();
2208
2209     /* Go to that function to follow the code flow through the simcall barrier */
2210     if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
2211     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2212
2213     self->simcall.call = SIMCALL_SEM_ACQUIRE;
2214     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2215     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2216     self->simcall.args[0].dp = (void*) sem;
2217     if (self != simix_global->maestro_process) {
2218       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2219                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2220       SIMIX_process_yield(self);
2221     } else {
2222       SIMIX_simcall_handle(&self->simcall, 0);
2223     }    
2224     
2225   }
2226   
2227 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2228     smx_process_t self = SIMIX_process_self();
2229
2230     /* Go to that function to follow the code flow through the simcall barrier */
2231     if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
2232     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2233
2234     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2235     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2236     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2237     self->simcall.args[0].dp = (void*) sem;
2238     self->simcall.args[1].d = (double) timeout;
2239     if (self != simix_global->maestro_process) {
2240       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2241                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2242       SIMIX_process_yield(self);
2243     } else {
2244       SIMIX_simcall_handle(&self->simcall, 0);
2245     }    
2246     
2247   }
2248   
2249 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2250     smx_process_t self = SIMIX_process_self();
2251
2252     /* Go to that function to follow the code flow through the simcall barrier */
2253     if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
2254     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2255
2256     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2257     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2258     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2259     self->simcall.args[0].dp = (void*) sem;
2260     if (self != simix_global->maestro_process) {
2261       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2262                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2263       SIMIX_process_yield(self);
2264     } else {
2265       SIMIX_simcall_handle(&self->simcall, 0);
2266     }    
2267     return self->simcall.result.i;
2268   }
2269   
2270 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
2271     smx_process_t self = SIMIX_process_self();
2272
2273     /* Go to that function to follow the code flow through the simcall barrier */
2274     if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
2275     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2276
2277     self->simcall.call = SIMCALL_FILE_READ;
2278     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2279     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2280     self->simcall.args[0].dp = (void*) fd;
2281     self->simcall.args[1].sgsz = (sg_size_t) size;
2282     self->simcall.args[2].dp = (void*) host;
2283     if (self != simix_global->maestro_process) {
2284       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2285                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2286       SIMIX_process_yield(self);
2287     } else {
2288       SIMIX_simcall_handle(&self->simcall, 0);
2289     }    
2290     return self->simcall.result.sgsz;
2291   }
2292   
2293 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
2294     smx_process_t self = SIMIX_process_self();
2295
2296     /* Go to that function to follow the code flow through the simcall barrier */
2297     if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
2298     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2299
2300     self->simcall.call = SIMCALL_FILE_WRITE;
2301     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2302     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2303     self->simcall.args[0].dp = (void*) fd;
2304     self->simcall.args[1].sgsz = (sg_size_t) size;
2305     self->simcall.args[2].dp = (void*) host;
2306     if (self != simix_global->maestro_process) {
2307       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2308                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2309       SIMIX_process_yield(self);
2310     } else {
2311       SIMIX_simcall_handle(&self->simcall, 0);
2312     }    
2313     return self->simcall.result.sgsz;
2314   }
2315   
2316 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
2317     smx_process_t self = SIMIX_process_self();
2318
2319     /* Go to that function to follow the code flow through the simcall barrier */
2320     if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
2321     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2322
2323     self->simcall.call = SIMCALL_FILE_OPEN;
2324     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2325     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2326     self->simcall.args[0].cc = (const char*) fullpath;
2327     self->simcall.args[1].dp = (void*) host;
2328     if (self != simix_global->maestro_process) {
2329       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2330                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2331       SIMIX_process_yield(self);
2332     } else {
2333       SIMIX_simcall_handle(&self->simcall, 0);
2334     }    
2335     return self->simcall.result.dp;
2336   }
2337   
2338 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
2339     smx_process_t self = SIMIX_process_self();
2340
2341     /* Go to that function to follow the code flow through the simcall barrier */
2342     if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
2343     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2344
2345     self->simcall.call = SIMCALL_FILE_CLOSE;
2346     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2347     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2348     self->simcall.args[0].dp = (void*) fd;
2349     self->simcall.args[1].dp = (void*) host;
2350     if (self != simix_global->maestro_process) {
2351       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2352                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2353       SIMIX_process_yield(self);
2354     } else {
2355       SIMIX_simcall_handle(&self->simcall, 0);
2356     }    
2357     return self->simcall.result.i;
2358   }
2359   
2360 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
2361     smx_process_t self = SIMIX_process_self();
2362
2363     /* Go to that function to follow the code flow through the simcall barrier */
2364     if (0) SIMIX_file_unlink(fd, host);
2365     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2366
2367     self->simcall.call = SIMCALL_FILE_UNLINK;
2368     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2369     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2370     self->simcall.args[0].dp = (void*) fd;
2371     self->simcall.args[1].dp = (void*) host;
2372     if (self != simix_global->maestro_process) {
2373       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2374                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2375       SIMIX_process_yield(self);
2376     } else {
2377       SIMIX_simcall_handle(&self->simcall, 0);
2378     }    
2379     return self->simcall.result.i;
2380   }
2381   
2382 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2383     smx_process_t self = SIMIX_process_self();
2384
2385     /* Go to that function to follow the code flow through the simcall barrier */
2386     if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
2387     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2388
2389     self->simcall.call = SIMCALL_FILE_GET_SIZE;
2390     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2391     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2392     self->simcall.args[0].dp = (void*) fd;
2393     if (self != simix_global->maestro_process) {
2394       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2395                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2396       SIMIX_process_yield(self);
2397     } else {
2398       SIMIX_simcall_handle(&self->simcall, 0);
2399     }    
2400     return self->simcall.result.sgsz;
2401   }
2402   
2403 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2404     smx_process_t self = SIMIX_process_self();
2405
2406     /* Go to that function to follow the code flow through the simcall barrier */
2407     if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
2408     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2409
2410     self->simcall.call = SIMCALL_FILE_TELL;
2411     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2412     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2413     self->simcall.args[0].dp = (void*) fd;
2414     if (self != simix_global->maestro_process) {
2415       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2416                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2417       SIMIX_process_yield(self);
2418     } else {
2419       SIMIX_simcall_handle(&self->simcall, 0);
2420     }    
2421     return self->simcall.result.sgsz;
2422   }
2423   
2424 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2425     smx_process_t self = SIMIX_process_self();
2426
2427     /* Go to that function to follow the code flow through the simcall barrier */
2428     if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
2429     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2430
2431     self->simcall.call = SIMCALL_FILE_SEEK;
2432     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2433     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2434     self->simcall.args[0].dp = (void*) fd;
2435     self->simcall.args[1].sgoff = (sg_offset_t) offset;
2436     self->simcall.args[2].i = (int) origin;
2437     if (self != simix_global->maestro_process) {
2438       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2439                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2440       SIMIX_process_yield(self);
2441     } else {
2442       SIMIX_simcall_handle(&self->simcall, 0);
2443     }    
2444     return self->simcall.result.i;
2445   }
2446   
2447 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2448     smx_process_t self = SIMIX_process_self();
2449
2450     /* Go to that function to follow the code flow through the simcall barrier */
2451     if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
2452     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2453
2454     self->simcall.call = SIMCALL_FILE_GET_INFO;
2455     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2456     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2457     self->simcall.args[0].dp = (void*) fd;
2458     if (self != simix_global->maestro_process) {
2459       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2460                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2461       SIMIX_process_yield(self);
2462     } else {
2463       SIMIX_simcall_handle(&self->simcall, 0);
2464     }    
2465     return self->simcall.result.dp;
2466   }
2467   
2468 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2469     smx_process_t self = SIMIX_process_self();
2470
2471     /* Go to that function to follow the code flow through the simcall barrier */
2472     if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
2473     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2474
2475     self->simcall.call = SIMCALL_FILE_MOVE;
2476     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2477     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2478     self->simcall.args[0].dp = (void*) fd;
2479     self->simcall.args[1].cc = (const char*) fullpath;
2480     if (self != simix_global->maestro_process) {
2481       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2482                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2483       SIMIX_process_yield(self);
2484     } else {
2485       SIMIX_simcall_handle(&self->simcall, 0);
2486     }    
2487     return self->simcall.result.i;
2488   }
2489   
2490 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2491     smx_process_t self = SIMIX_process_self();
2492
2493     /* Go to that function to follow the code flow through the simcall barrier */
2494     if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
2495     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2496
2497     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2498     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2499     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2500     self->simcall.args[0].dp = (void*) storage;
2501     if (self != simix_global->maestro_process) {
2502       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2503                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2504       SIMIX_process_yield(self);
2505     } else {
2506       SIMIX_simcall_handle(&self->simcall, 0);
2507     }    
2508     return self->simcall.result.sgsz;
2509   }
2510   
2511 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2512     smx_process_t self = SIMIX_process_self();
2513
2514     /* Go to that function to follow the code flow through the simcall barrier */
2515     if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
2516     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2517
2518     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2519     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2520     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2521     self->simcall.args[0].dp = (void*) name;
2522     if (self != simix_global->maestro_process) {
2523       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2524                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2525       SIMIX_process_yield(self);
2526     } else {
2527       SIMIX_simcall_handle(&self->simcall, 0);
2528     }    
2529     return self->simcall.result.sgsz;
2530   }
2531   
2532 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2533     smx_process_t self = SIMIX_process_self();
2534
2535     /* Go to that function to follow the code flow through the simcall barrier */
2536     if (0) SIMIX_storage_get_properties(storage);
2537     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2538
2539     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2540     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2541     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2542     self->simcall.args[0].dp = (void*) storage;
2543     if (self != simix_global->maestro_process) {
2544       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2545                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2546       SIMIX_process_yield(self);
2547     } else {
2548       SIMIX_simcall_handle(&self->simcall, 0);
2549     }    
2550     return self->simcall.result.dp;
2551   }
2552   
2553 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2554     smx_process_t self = SIMIX_process_self();
2555
2556     /* Go to that function to follow the code flow through the simcall barrier */
2557     if (0) SIMIX_storage_get_content(storage);
2558     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2559
2560     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2561     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2562     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2563     self->simcall.args[0].dp = (void*) storage;
2564     if (self != simix_global->maestro_process) {
2565       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2566                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2567       SIMIX_process_yield(self);
2568     } else {
2569       SIMIX_simcall_handle(&self->simcall, 0);
2570     }    
2571     return self->simcall.result.dp;
2572   }
2573   
2574 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2575     smx_process_t self = SIMIX_process_self();
2576
2577     /* Go to that function to follow the code flow through the simcall barrier */
2578     if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
2579     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2580
2581     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2582     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2583     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2584     self->simcall.args[0].cc = (const char*) name;
2585     if (self != simix_global->maestro_process) {
2586       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2587                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2588       SIMIX_process_yield(self);
2589     } else {
2590       SIMIX_simcall_handle(&self->simcall, 0);
2591     }    
2592     return self->simcall.result.dp;
2593   }
2594   
2595 inline static int simcall_BODY_mc_random(int min, int max) {
2596     smx_process_t self = SIMIX_process_self();
2597
2598     /* Go to that function to follow the code flow through the simcall barrier */
2599     if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
2600     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2601
2602     self->simcall.call = SIMCALL_MC_RANDOM;
2603     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2604     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2605     self->simcall.args[0].i = (int) min;
2606     self->simcall.args[1].i = (int) max;
2607     if (self != simix_global->maestro_process) {
2608       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2609                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2610       SIMIX_process_yield(self);
2611     } else {
2612       SIMIX_simcall_handle(&self->simcall, 0);
2613     }    
2614     return self->simcall.result.i;
2615   }
2616   
2617 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
2618     smx_process_t self = SIMIX_process_self();
2619
2620     /* Go to that function to follow the code flow through the simcall barrier */
2621     if (0) SIMIX_set_category(synchro, category);
2622     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2623
2624     self->simcall.call = SIMCALL_SET_CATEGORY;
2625     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2626     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2627     self->simcall.args[0].dp = (void*) synchro;
2628     self->simcall.args[1].cc = (const char*) category;
2629     if (self != simix_global->maestro_process) {
2630       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2631                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2632       SIMIX_process_yield(self);
2633     } else {
2634       SIMIX_simcall_handle(&self->simcall, 0);
2635     }    
2636     
2637   }
2638 #ifdef HAVE_LATENCY_BOUND_TRACKING
2639   
2640 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
2641     smx_process_t self = SIMIX_process_self();
2642
2643     /* Go to that function to follow the code flow through the simcall barrier */
2644     if (0) SIMIX_comm_is_latency_bounded(comm);
2645     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2646
2647     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2648     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2649     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2650     self->simcall.args[0].dp = (void*) comm;
2651     if (self != simix_global->maestro_process) {
2652       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2653                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2654       SIMIX_process_yield(self);
2655     } else {
2656       SIMIX_simcall_handle(&self->simcall, 0);
2657     }    
2658     return self->simcall.result.i;
2659   }
2660 #endif
2661
2662 #ifdef HAVE_MC
2663   
2664 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
2665     smx_process_t self = SIMIX_process_self();
2666
2667     /* Go to that function to follow the code flow through the simcall barrier */
2668     if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
2669     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2670
2671     self->simcall.call = SIMCALL_MC_SNAPSHOT;
2672     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2673     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2674
2675     if (self != simix_global->maestro_process) {
2676       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2677                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2678       SIMIX_process_yield(self);
2679     } else {
2680       SIMIX_simcall_handle(&self->simcall, 0);
2681     }    
2682     return self->simcall.result.dp;
2683   }
2684   
2685 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
2686     smx_process_t self = SIMIX_process_self();
2687
2688     /* Go to that function to follow the code flow through the simcall barrier */
2689     if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
2690     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2691
2692     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2693     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2694     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2695     self->simcall.args[0].dp = (void*) s1;
2696     self->simcall.args[1].dp = (void*) s2;
2697     if (self != simix_global->maestro_process) {
2698       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2699                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2700       SIMIX_process_yield(self);
2701     } else {
2702       SIMIX_simcall_handle(&self->simcall, 0);
2703     }    
2704     return self->simcall.result.i;
2705   }
2706 #endif