Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
inline two more simcalls: host_get_pstate and host_get_consumed_energy
[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 xbt_swag_t simcall_BODY_host_get_process_list(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_process_list(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_PROCESS_LIST;
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.dp;
102   }
103   
104 inline static double simcall_BODY_host_get_current_power_peak(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_current_power_peak(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_CURRENT_POWER_PEAK;
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.d;
123   }
124   
125 inline static double simcall_BODY_host_get_power_peak_at(sg_host_t host, int pstate_index) {
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_power_peak_at(host, pstate_index);
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_POWER_PEAK_AT;
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     self->simcall.args[1].i = (int) pstate_index;
137     if (self != simix_global->maestro_process) {
138       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
139                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
140       SIMIX_process_yield(self);
141     } else {
142       SIMIX_simcall_handle(&self->simcall, 0);
143     }    
144     return self->simcall.result.d;
145   }
146   
147 inline static int simcall_BODY_host_get_nb_pstates(sg_host_t host) {
148     smx_process_t self = SIMIX_process_self();
149
150     /* Go to that function to follow the code flow through the simcall barrier */
151     if (0) SIMIX_host_get_nb_pstates(host);
152     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
153
154     self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
155     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
156     memset(self->simcall.args, 0, sizeof(self->simcall.args));
157     self->simcall.args[0].dp = (void*) host;
158     if (self != simix_global->maestro_process) {
159       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
160                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
161       SIMIX_process_yield(self);
162     } else {
163       SIMIX_simcall_handle(&self->simcall, 0);
164     }    
165     return self->simcall.result.i;
166   }
167   
168 inline static double simcall_BODY_host_get_wattmin_at(sg_host_t host, int pstate_index) {
169     smx_process_t self = SIMIX_process_self();
170
171     /* Go to that function to follow the code flow through the simcall barrier */
172     if (0) SIMIX_host_get_wattmin_at(host, pstate_index);
173     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
174
175     self->simcall.call = SIMCALL_HOST_GET_WATTMIN_AT;
176     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
177     memset(self->simcall.args, 0, sizeof(self->simcall.args));
178     self->simcall.args[0].dp = (void*) host;
179     self->simcall.args[1].i = (int) pstate_index;
180     if (self != simix_global->maestro_process) {
181       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
182                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
183       SIMIX_process_yield(self);
184     } else {
185       SIMIX_simcall_handle(&self->simcall, 0);
186     }    
187     return self->simcall.result.d;
188   }
189   
190 inline static double simcall_BODY_host_get_wattmax_at(sg_host_t host, int pstate_index) {
191     smx_process_t self = SIMIX_process_self();
192
193     /* Go to that function to follow the code flow through the simcall barrier */
194     if (0) SIMIX_host_get_wattmax_at(host, pstate_index);
195     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
196
197     self->simcall.call = SIMCALL_HOST_GET_WATTMAX_AT;
198     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
199     memset(self->simcall.args, 0, sizeof(self->simcall.args));
200     self->simcall.args[0].dp = (void*) host;
201     self->simcall.args[1].i = (int) pstate_index;
202     if (self != simix_global->maestro_process) {
203       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
204                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
205       SIMIX_process_yield(self);
206     } else {
207       SIMIX_simcall_handle(&self->simcall, 0);
208     }    
209     return self->simcall.result.d;
210   }
211   
212 inline static void simcall_BODY_host_set_pstate(sg_host_t host, int pstate_index) {
213     smx_process_t self = SIMIX_process_self();
214
215     /* Go to that function to follow the code flow through the simcall barrier */
216     if (0) SIMIX_host_set_pstate(host, pstate_index);
217     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
218
219     self->simcall.call = SIMCALL_HOST_SET_PSTATE;
220     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
221     memset(self->simcall.args, 0, sizeof(self->simcall.args));
222     self->simcall.args[0].dp = (void*) host;
223     self->simcall.args[1].i = (int) pstate_index;
224     if (self != simix_global->maestro_process) {
225       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
226                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
227       SIMIX_process_yield(self);
228     } else {
229       SIMIX_simcall_handle(&self->simcall, 0);
230     }    
231     
232   }
233   
234 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(sg_host_t host) {
235     smx_process_t self = SIMIX_process_self();
236
237     /* Go to that function to follow the code flow through the simcall barrier */
238     if (0) SIMIX_host_get_mounted_storage_list(host);
239     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
240
241     self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
242     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
243     memset(self->simcall.args, 0, sizeof(self->simcall.args));
244     self->simcall.args[0].dp = (void*) host;
245     if (self != simix_global->maestro_process) {
246       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
247                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
248       SIMIX_process_yield(self);
249     } else {
250       SIMIX_simcall_handle(&self->simcall, 0);
251     }    
252     return self->simcall.result.dp;
253   }
254   
255 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(sg_host_t host) {
256     smx_process_t self = SIMIX_process_self();
257
258     /* Go to that function to follow the code flow through the simcall barrier */
259     if (0) SIMIX_host_get_attached_storage_list(host);
260     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
261
262     self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
263     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
264     memset(self->simcall.args, 0, sizeof(self->simcall.args));
265     self->simcall.args[0].dp = (void*) host;
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     return self->simcall.result.dp;
274   }
275   
276 inline static void simcall_BODY_host_get_params(sg_host_t ind_vm, vm_params_t params) {
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_params(ind_vm, params);
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_PARAMS;
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*) ind_vm;
287     self->simcall.args[1].dp = (void*) params;
288     if (self != simix_global->maestro_process) {
289       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
290                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
291       SIMIX_process_yield(self);
292     } else {
293       SIMIX_simcall_handle(&self->simcall, 0);
294     }    
295     
296   }
297   
298 inline static void simcall_BODY_host_set_params(sg_host_t ind_vm, vm_params_t params) {
299     smx_process_t self = SIMIX_process_self();
300
301     /* Go to that function to follow the code flow through the simcall barrier */
302     if (0) SIMIX_host_set_params(ind_vm, params);
303     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
304
305     self->simcall.call = SIMCALL_HOST_SET_PARAMS;
306     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
307     memset(self->simcall.args, 0, sizeof(self->simcall.args));
308     self->simcall.args[0].dp = (void*) ind_vm;
309     self->simcall.args[1].dp = (void*) params;
310     if (self != simix_global->maestro_process) {
311       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
312                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
313       SIMIX_process_yield(self);
314     } else {
315       SIMIX_simcall_handle(&self->simcall, 0);
316     }    
317     
318   }
319   
320 inline static sg_host_t simcall_BODY_vm_create(const char* name, sg_host_t ind_pm) {
321     smx_process_t self = SIMIX_process_self();
322
323     /* Go to that function to follow the code flow through the simcall barrier */
324     if (0) SIMIX_vm_create(name, ind_pm);
325     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
326
327     self->simcall.call = SIMCALL_VM_CREATE;
328     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
329     memset(self->simcall.args, 0, sizeof(self->simcall.args));
330     self->simcall.args[0].cc = (const char*) name;
331     self->simcall.args[1].dp = (void*) ind_pm;
332     if (self != simix_global->maestro_process) {
333       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
334                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
335       SIMIX_process_yield(self);
336     } else {
337       SIMIX_simcall_handle(&self->simcall, 0);
338     }    
339     return self->simcall.result.dp;
340   }
341   
342 inline static void simcall_BODY_vm_start(sg_host_t ind_vm) {
343     smx_process_t self = SIMIX_process_self();
344
345     /* Go to that function to follow the code flow through the simcall barrier */
346     if (0) SIMIX_vm_start(ind_vm);
347     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
348
349     self->simcall.call = SIMCALL_VM_START;
350     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
351     memset(self->simcall.args, 0, sizeof(self->simcall.args));
352     self->simcall.args[0].dp = (void*) ind_vm;
353     if (self != simix_global->maestro_process) {
354       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
355                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
356       SIMIX_process_yield(self);
357     } else {
358       SIMIX_simcall_handle(&self->simcall, 0);
359     }    
360     
361   }
362   
363 inline static int simcall_BODY_vm_get_state(sg_host_t ind_vm) {
364     smx_process_t self = SIMIX_process_self();
365
366     /* Go to that function to follow the code flow through the simcall barrier */
367     if (0) SIMIX_vm_get_state(ind_vm);
368     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
369
370     self->simcall.call = SIMCALL_VM_GET_STATE;
371     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
372     memset(self->simcall.args, 0, sizeof(self->simcall.args));
373     self->simcall.args[0].dp = (void*) ind_vm;
374     if (self != simix_global->maestro_process) {
375       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
376                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
377       SIMIX_process_yield(self);
378     } else {
379       SIMIX_simcall_handle(&self->simcall, 0);
380     }    
381     return self->simcall.result.i;
382   }
383   
384 inline static void simcall_BODY_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) {
385     smx_process_t self = SIMIX_process_self();
386
387     /* Go to that function to follow the code flow through the simcall barrier */
388     if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
389     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
390
391     self->simcall.call = SIMCALL_VM_MIGRATE;
392     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
393     memset(self->simcall.args, 0, sizeof(self->simcall.args));
394     self->simcall.args[0].dp = (void*) ind_vm;
395     self->simcall.args[1].dp = (void*) ind_dst_pm;
396     if (self != simix_global->maestro_process) {
397       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
398                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
399       SIMIX_process_yield(self);
400     } else {
401       SIMIX_simcall_handle(&self->simcall, 0);
402     }    
403     
404   }
405   
406 inline static void* simcall_BODY_vm_get_pm(sg_host_t ind_vm) {
407     smx_process_t self = SIMIX_process_self();
408
409     /* Go to that function to follow the code flow through the simcall barrier */
410     if (0) SIMIX_vm_get_pm(ind_vm);
411     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
412
413     self->simcall.call = SIMCALL_VM_GET_PM;
414     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
415     memset(self->simcall.args, 0, sizeof(self->simcall.args));
416     self->simcall.args[0].dp = (void*) ind_vm;
417     if (self != simix_global->maestro_process) {
418       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
419                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
420       SIMIX_process_yield(self);
421     } else {
422       SIMIX_simcall_handle(&self->simcall, 0);
423     }    
424     return self->simcall.result.dp;
425   }
426   
427 inline static void simcall_BODY_vm_set_bound(sg_host_t ind_vm, double bound) {
428     smx_process_t self = SIMIX_process_self();
429
430     /* Go to that function to follow the code flow through the simcall barrier */
431     if (0) SIMIX_vm_set_bound(ind_vm, bound);
432     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
433
434     self->simcall.call = SIMCALL_VM_SET_BOUND;
435     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
436     memset(self->simcall.args, 0, sizeof(self->simcall.args));
437     self->simcall.args[0].dp = (void*) ind_vm;
438     self->simcall.args[1].d = (double) bound;
439     if (self != simix_global->maestro_process) {
440       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
441                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
442       SIMIX_process_yield(self);
443     } else {
444       SIMIX_simcall_handle(&self->simcall, 0);
445     }    
446     
447   }
448   
449 inline static void simcall_BODY_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) {
450     smx_process_t self = SIMIX_process_self();
451
452     /* Go to that function to follow the code flow through the simcall barrier */
453     if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
454     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
455
456     self->simcall.call = SIMCALL_VM_SET_AFFINITY;
457     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
458     memset(self->simcall.args, 0, sizeof(self->simcall.args));
459     self->simcall.args[0].dp = (void*) ind_vm;
460     self->simcall.args[1].dp = (void*) ind_pm;
461     self->simcall.args[2].ul = (unsigned long) mask;
462     if (self != simix_global->maestro_process) {
463       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
464                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
465       SIMIX_process_yield(self);
466     } else {
467       SIMIX_simcall_handle(&self->simcall, 0);
468     }    
469     
470   }
471   
472 inline static void simcall_BODY_vm_destroy(sg_host_t ind_vm) {
473     smx_process_t self = SIMIX_process_self();
474
475     /* Go to that function to follow the code flow through the simcall barrier */
476     if (0) SIMIX_vm_destroy(ind_vm);
477     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
478
479     self->simcall.call = SIMCALL_VM_DESTROY;
480     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
481     memset(self->simcall.args, 0, sizeof(self->simcall.args));
482     self->simcall.args[0].dp = (void*) ind_vm;
483     if (self != simix_global->maestro_process) {
484       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
485                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
486       SIMIX_process_yield(self);
487     } else {
488       SIMIX_simcall_handle(&self->simcall, 0);
489     }    
490     
491   }
492   
493 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
494     smx_process_t self = SIMIX_process_self();
495
496     /* Go to that function to follow the code flow through the simcall barrier */
497     if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
498     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
499
500     self->simcall.call = SIMCALL_VM_SUSPEND;
501     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
502     memset(self->simcall.args, 0, sizeof(self->simcall.args));
503     self->simcall.args[0].dp = (void*) ind_vm;
504     if (self != simix_global->maestro_process) {
505       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
506                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
507       SIMIX_process_yield(self);
508     } else {
509       SIMIX_simcall_handle(&self->simcall, 0);
510     }    
511     
512   }
513   
514 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
515     smx_process_t self = SIMIX_process_self();
516
517     /* Go to that function to follow the code flow through the simcall barrier */
518     if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
519     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
520
521     self->simcall.call = SIMCALL_VM_RESUME;
522     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
523     memset(self->simcall.args, 0, sizeof(self->simcall.args));
524     self->simcall.args[0].dp = (void*) ind_vm;
525     if (self != simix_global->maestro_process) {
526       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
527                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
528       SIMIX_process_yield(self);
529     } else {
530       SIMIX_simcall_handle(&self->simcall, 0);
531     }    
532     
533   }
534   
535 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
536     smx_process_t self = SIMIX_process_self();
537
538     /* Go to that function to follow the code flow through the simcall barrier */
539     if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
540     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
541
542     self->simcall.call = SIMCALL_VM_SHUTDOWN;
543     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
544     memset(self->simcall.args, 0, sizeof(self->simcall.args));
545     self->simcall.args[0].dp = (void*) ind_vm;
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_save(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) simcall_HANDLER_vm_save(&self->simcall, 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_SAVE;
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_restore(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_restore(&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_RESTORE;
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_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) {
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) SIMIX_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
603     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
604
605     self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO;
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*) vm;
609     self->simcall.args[1].dp = (void*) src_pm;
610     self->simcall.args[2].dp = (void*) dst_pm;
611     if (self != simix_global->maestro_process) {
612       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
613                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
614       SIMIX_process_yield(self);
615     } else {
616       SIMIX_simcall_handle(&self->simcall, 0);
617     }    
618     
619   }
620   
621 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) {
622     smx_process_t self = SIMIX_process_self();
623
624     /* Go to that function to follow the code flow through the simcall barrier */
625     if (0) simcall_HANDLER_process_create(&self->simcall, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
626     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
627
628     self->simcall.call = SIMCALL_PROCESS_CREATE;
629     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
630     memset(self->simcall.args, 0, sizeof(self->simcall.args));
631     self->simcall.args[0].cc = (const char*) name;
632     self->simcall.args[1].fp = (FPtr) code;
633     self->simcall.args[2].dp = (void*) data;
634     self->simcall.args[3].cc = (const char*) hostname;
635     self->simcall.args[4].d = (double) kill_time;
636     self->simcall.args[5].i = (int) argc;
637     self->simcall.args[6].dp = (void*) argv;
638     self->simcall.args[7].dp = (void*) properties;
639     self->simcall.args[8].i = (int) auto_restart;
640     if (self != simix_global->maestro_process) {
641       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
642                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
643       SIMIX_process_yield(self);
644     } else {
645       SIMIX_simcall_handle(&self->simcall, 0);
646     }    
647     return self->simcall.result.dp;
648   }
649   
650 inline static void simcall_BODY_process_kill(smx_process_t process) {
651     smx_process_t self = SIMIX_process_self();
652
653     /* Go to that function to follow the code flow through the simcall barrier */
654     if (0) simcall_HANDLER_process_kill(&self->simcall, process);
655     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
656
657     self->simcall.call = SIMCALL_PROCESS_KILL;
658     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
659     memset(self->simcall.args, 0, sizeof(self->simcall.args));
660     self->simcall.args[0].dp = (void*) process;
661     if (self != simix_global->maestro_process) {
662       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
663                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
664       SIMIX_process_yield(self);
665     } else {
666       SIMIX_simcall_handle(&self->simcall, 0);
667     }    
668     
669   }
670   
671 inline static void simcall_BODY_process_killall(int reset_pid) {
672     smx_process_t self = SIMIX_process_self();
673
674     /* Go to that function to follow the code flow through the simcall barrier */
675     if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
676     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
677
678     self->simcall.call = SIMCALL_PROCESS_KILLALL;
679     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
680     memset(self->simcall.args, 0, sizeof(self->simcall.args));
681     self->simcall.args[0].i = (int) reset_pid;
682     if (self != simix_global->maestro_process) {
683       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
684                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
685       SIMIX_process_yield(self);
686     } else {
687       SIMIX_simcall_handle(&self->simcall, 0);
688     }    
689     
690   }
691   
692 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
693     smx_process_t self = SIMIX_process_self();
694
695     /* Go to that function to follow the code flow through the simcall barrier */
696     if (0) SIMIX_process_cleanup(process);
697     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
698
699     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
700     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
701     memset(self->simcall.args, 0, sizeof(self->simcall.args));
702     self->simcall.args[0].dp = (void*) process;
703     if (self != simix_global->maestro_process) {
704       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
705                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
706       SIMIX_process_yield(self);
707     } else {
708       SIMIX_simcall_handle(&self->simcall, 0);
709     }    
710     
711   }
712   
713 inline static void simcall_BODY_process_suspend(smx_process_t process) {
714     smx_process_t self = SIMIX_process_self();
715
716     /* Go to that function to follow the code flow through the simcall barrier */
717     if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
718     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
719
720     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
721     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
722     memset(self->simcall.args, 0, sizeof(self->simcall.args));
723     self->simcall.args[0].dp = (void*) process;
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     
732   }
733   
734 inline static void simcall_BODY_process_resume(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_resume(&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_RESUME;
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 int simcall_BODY_process_count() {
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) SIMIX_process_count();
760     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
761
762     self->simcall.call = SIMCALL_PROCESS_COUNT;
763     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
764     memset(self->simcall.args, 0, sizeof(self->simcall.args));
765
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     return self->simcall.result.i;
774   }
775   
776 inline static int simcall_BODY_process_get_PID(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_get_PID(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_GET_PID;
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     return self->simcall.result.i;
795   }
796   
797 inline static int simcall_BODY_process_get_PPID(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) SIMIX_process_get_PPID(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_GET_PPID;
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     return self->simcall.result.i;
816   }
817   
818 inline static void* simcall_BODY_process_get_data(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) SIMIX_process_get_data(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_GET_DATA;
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     return self->simcall.result.dp;
837   }
838   
839 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
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_set_data(process, data);
844     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
845
846     self->simcall.call = SIMCALL_PROCESS_SET_DATA;
847     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
848     memset(self->simcall.args, 0, sizeof(self->simcall.args));
849     self->simcall.args[0].dp = (void*) process;
850     self->simcall.args[1].dp = (void*) data;
851     if (self != simix_global->maestro_process) {
852       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
853                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
854       SIMIX_process_yield(self);
855     } else {
856       SIMIX_simcall_handle(&self->simcall, 0);
857     }    
858     
859   }
860   
861 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
862     smx_process_t self = SIMIX_process_self();
863
864     /* Go to that function to follow the code flow through the simcall barrier */
865     if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
866     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
867
868     self->simcall.call = SIMCALL_PROCESS_SET_HOST;
869     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
870     memset(self->simcall.args, 0, sizeof(self->simcall.args));
871     self->simcall.args[0].dp = (void*) process;
872     self->simcall.args[1].dp = (void*) dest;
873     if (self != simix_global->maestro_process) {
874       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
875                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
876       SIMIX_process_yield(self);
877     } else {
878       SIMIX_simcall_handle(&self->simcall, 0);
879     }    
880     
881   }
882   
883 inline static sg_host_t simcall_BODY_process_get_host(smx_process_t process) {
884     smx_process_t self = SIMIX_process_self();
885
886     /* Go to that function to follow the code flow through the simcall barrier */
887     if (0) SIMIX_process_get_host(process);
888     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
889
890     self->simcall.call = SIMCALL_PROCESS_GET_HOST;
891     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
892     memset(self->simcall.args, 0, sizeof(self->simcall.args));
893     self->simcall.args[0].dp = (void*) process;
894     if (self != simix_global->maestro_process) {
895       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
896                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
897       SIMIX_process_yield(self);
898     } else {
899       SIMIX_simcall_handle(&self->simcall, 0);
900     }    
901     return self->simcall.result.dp;
902   }
903   
904 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
905     smx_process_t self = SIMIX_process_self();
906
907     /* Go to that function to follow the code flow through the simcall barrier */
908     if (0) SIMIX_process_get_name(process);
909     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
910
911     self->simcall.call = SIMCALL_PROCESS_GET_NAME;
912     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
913     memset(self->simcall.args, 0, sizeof(self->simcall.args));
914     self->simcall.args[0].dp = (void*) process;
915     if (self != simix_global->maestro_process) {
916       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
917                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
918       SIMIX_process_yield(self);
919     } else {
920       SIMIX_simcall_handle(&self->simcall, 0);
921     }    
922     return self->simcall.result.cc;
923   }
924   
925 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
926     smx_process_t self = SIMIX_process_self();
927
928     /* Go to that function to follow the code flow through the simcall barrier */
929     if (0) SIMIX_process_is_suspended(process);
930     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
931
932     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
933     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
934     memset(self->simcall.args, 0, sizeof(self->simcall.args));
935     self->simcall.args[0].dp = (void*) process;
936     if (self != simix_global->maestro_process) {
937       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
938                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
939       SIMIX_process_yield(self);
940     } else {
941       SIMIX_simcall_handle(&self->simcall, 0);
942     }    
943     return self->simcall.result.i;
944   }
945   
946 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
947     smx_process_t self = SIMIX_process_self();
948
949     /* Go to that function to follow the code flow through the simcall barrier */
950     if (0) SIMIX_process_get_properties(process);
951     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
952
953     self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
954     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
955     memset(self->simcall.args, 0, sizeof(self->simcall.args));
956     self->simcall.args[0].dp = (void*) process;
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     return self->simcall.result.dp;
965   }
966   
967 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
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) simcall_HANDLER_process_join(&self->simcall, process, timeout);
972     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
973
974     self->simcall.call = SIMCALL_PROCESS_JOIN;
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     self->simcall.args[1].d = (double) timeout;
979     if (self != simix_global->maestro_process) {
980       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
981                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
982       SIMIX_process_yield(self);
983     } else {
984       SIMIX_simcall_handle(&self->simcall, 0);
985     }    
986     return self->simcall.result.i;
987   }
988   
989 inline static int simcall_BODY_process_sleep(double duration) {
990     smx_process_t self = SIMIX_process_self();
991
992     /* Go to that function to follow the code flow through the simcall barrier */
993     if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
994     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
995
996     self->simcall.call = SIMCALL_PROCESS_SLEEP;
997     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
998     memset(self->simcall.args, 0, sizeof(self->simcall.args));
999     self->simcall.args[0].d = (double) duration;
1000     if (self != simix_global->maestro_process) {
1001       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1002                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1003       SIMIX_process_yield(self);
1004     } else {
1005       SIMIX_simcall_handle(&self->simcall, 0);
1006     }    
1007     return self->simcall.result.i;
1008   }
1009   
1010 inline static smx_synchro_t simcall_BODY_process_execute(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
1011     smx_process_t self = SIMIX_process_self();
1012
1013     /* Go to that function to follow the code flow through the simcall barrier */
1014     if (0) simcall_HANDLER_process_execute(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
1015     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1016
1017     self->simcall.call = SIMCALL_PROCESS_EXECUTE;
1018     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1019     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1020     self->simcall.args[0].cc = (const char*) name;
1021     self->simcall.args[1].d = (double) flops_amount;
1022     self->simcall.args[2].d = (double) priority;
1023     self->simcall.args[3].d = (double) bound;
1024     self->simcall.args[4].ul = (unsigned long) affinity_mask;
1025     if (self != simix_global->maestro_process) {
1026       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1027                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1028       SIMIX_process_yield(self);
1029     } else {
1030       SIMIX_simcall_handle(&self->simcall, 0);
1031     }    
1032     return self->simcall.result.dp;
1033   }
1034   
1035 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) {
1036     smx_process_t self = SIMIX_process_self();
1037
1038     /* Go to that function to follow the code flow through the simcall barrier */
1039     if (0) SIMIX_process_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
1040     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1041
1042     self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
1043     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1044     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1045     self->simcall.args[0].cc = (const char*) name;
1046     self->simcall.args[1].i = (int) host_nb;
1047     self->simcall.args[2].dp = (void*) host_list;
1048     self->simcall.args[3].dp = (void*) flops_amount;
1049     self->simcall.args[4].dp = (void*) bytes_amount;
1050     self->simcall.args[5].d = (double) amount;
1051     self->simcall.args[6].d = (double) rate;
1052     if (self != simix_global->maestro_process) {
1053       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1054                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1055       SIMIX_process_yield(self);
1056     } else {
1057       SIMIX_simcall_handle(&self->simcall, 0);
1058     }    
1059     return self->simcall.result.dp;
1060   }
1061   
1062 inline static void simcall_BODY_process_execution_destroy(smx_synchro_t execution) {
1063     smx_process_t self = SIMIX_process_self();
1064
1065     /* Go to that function to follow the code flow through the simcall barrier */
1066     if (0) SIMIX_process_execution_destroy(execution);
1067     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1068
1069     self->simcall.call = SIMCALL_PROCESS_EXECUTION_DESTROY;
1070     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1071     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1072     self->simcall.args[0].dp = (void*) execution;
1073     if (self != simix_global->maestro_process) {
1074       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1075                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1076       SIMIX_process_yield(self);
1077     } else {
1078       SIMIX_simcall_handle(&self->simcall, 0);
1079     }    
1080     
1081   }
1082   
1083 inline static void simcall_BODY_process_execution_cancel(smx_synchro_t execution) {
1084     smx_process_t self = SIMIX_process_self();
1085
1086     /* Go to that function to follow the code flow through the simcall barrier */
1087     if (0) SIMIX_process_execution_cancel(execution);
1088     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1089
1090     self->simcall.call = SIMCALL_PROCESS_EXECUTION_CANCEL;
1091     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1092     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1093     self->simcall.args[0].dp = (void*) execution;
1094     if (self != simix_global->maestro_process) {
1095       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1096                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1097       SIMIX_process_yield(self);
1098     } else {
1099       SIMIX_simcall_handle(&self->simcall, 0);
1100     }    
1101     
1102   }
1103   
1104 inline static double simcall_BODY_process_execution_get_remains(smx_synchro_t execution) {
1105     smx_process_t self = SIMIX_process_self();
1106
1107     /* Go to that function to follow the code flow through the simcall barrier */
1108     if (0) SIMIX_process_execution_get_remains(execution);
1109     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1110
1111     self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_REMAINS;
1112     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1113     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1114     self->simcall.args[0].dp = (void*) execution;
1115     if (self != simix_global->maestro_process) {
1116       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1117                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1118       SIMIX_process_yield(self);
1119     } else {
1120       SIMIX_simcall_handle(&self->simcall, 0);
1121     }    
1122     return self->simcall.result.d;
1123   }
1124   
1125 inline static e_smx_state_t simcall_BODY_process_execution_get_state(smx_synchro_t execution) {
1126     smx_process_t self = SIMIX_process_self();
1127
1128     /* Go to that function to follow the code flow through the simcall barrier */
1129     if (0) SIMIX_process_execution_get_state(execution);
1130     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1131
1132     self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_STATE;
1133     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1134     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1135     self->simcall.args[0].dp = (void*) execution;
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.i;
1144   }
1145   
1146 inline static void simcall_BODY_process_execution_set_priority(smx_synchro_t execution, double priority) {
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_set_priority(execution, priority);
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_SET_PRIORITY;
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     self->simcall.args[1].d = (double) priority;
1158     if (self != simix_global->maestro_process) {
1159       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1160                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1161       SIMIX_process_yield(self);
1162     } else {
1163       SIMIX_simcall_handle(&self->simcall, 0);
1164     }    
1165     
1166   }
1167   
1168 inline static void simcall_BODY_process_execution_set_bound(smx_synchro_t execution, double bound) {
1169     smx_process_t self = SIMIX_process_self();
1170
1171     /* Go to that function to follow the code flow through the simcall barrier */
1172     if (0) SIMIX_process_execution_set_bound(execution, bound);
1173     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1174
1175     self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_BOUND;
1176     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1177     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1178     self->simcall.args[0].dp = (void*) execution;
1179     self->simcall.args[1].d = (double) bound;
1180     if (self != simix_global->maestro_process) {
1181       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1182                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1183       SIMIX_process_yield(self);
1184     } else {
1185       SIMIX_simcall_handle(&self->simcall, 0);
1186     }    
1187     
1188   }
1189   
1190 inline static void simcall_BODY_process_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
1191     smx_process_t self = SIMIX_process_self();
1192
1193     /* Go to that function to follow the code flow through the simcall barrier */
1194     if (0) SIMIX_process_execution_set_affinity(execution, ws, mask);
1195     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1196
1197     self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_AFFINITY;
1198     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1199     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1200     self->simcall.args[0].dp = (void*) execution;
1201     self->simcall.args[1].dp = (void*) ws;
1202     self->simcall.args[2].ul = (unsigned long) mask;
1203     if (self != simix_global->maestro_process) {
1204       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1205                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1206       SIMIX_process_yield(self);
1207     } else {
1208       SIMIX_simcall_handle(&self->simcall, 0);
1209     }    
1210     
1211   }
1212   
1213 inline static int simcall_BODY_process_execution_wait(smx_synchro_t execution) {
1214     smx_process_t self = SIMIX_process_self();
1215
1216     /* Go to that function to follow the code flow through the simcall barrier */
1217     if (0) simcall_HANDLER_process_execution_wait(&self->simcall, execution);
1218     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1219
1220     self->simcall.call = SIMCALL_PROCESS_EXECUTION_WAIT;
1221     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1222     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1223     self->simcall.args[0].dp = (void*) execution;
1224     if (self != simix_global->maestro_process) {
1225       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1226                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1227       SIMIX_process_yield(self);
1228     } else {
1229       SIMIX_simcall_handle(&self->simcall, 0);
1230     }    
1231     return self->simcall.result.i;
1232   }
1233   
1234 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1235     smx_process_t self = SIMIX_process_self();
1236
1237     /* Go to that function to follow the code flow through the simcall barrier */
1238     if (0) SIMIX_process_on_exit(process, fun, data);
1239     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1240
1241     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1242     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1243     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1244     self->simcall.args[0].dp = (void*) process;
1245     self->simcall.args[1].fp = (FPtr) fun;
1246     self->simcall.args[2].dp = (void*) data;
1247     if (self != simix_global->maestro_process) {
1248       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1249                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1250       SIMIX_process_yield(self);
1251     } else {
1252       SIMIX_simcall_handle(&self->simcall, 0);
1253     }    
1254     
1255   }
1256   
1257 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
1258     smx_process_t self = SIMIX_process_self();
1259
1260     /* Go to that function to follow the code flow through the simcall barrier */
1261     if (0) SIMIX_process_auto_restart_set(process, auto_restart);
1262     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1263
1264     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
1265     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1266     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1267     self->simcall.args[0].dp = (void*) process;
1268     self->simcall.args[1].i = (int) auto_restart;
1269     if (self != simix_global->maestro_process) {
1270       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1271                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1272       SIMIX_process_yield(self);
1273     } else {
1274       SIMIX_simcall_handle(&self->simcall, 0);
1275     }    
1276     
1277   }
1278   
1279 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1280     smx_process_t self = SIMIX_process_self();
1281
1282     /* Go to that function to follow the code flow through the simcall barrier */
1283     if (0) simcall_HANDLER_process_restart(&self->simcall, process);
1284     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1285
1286     self->simcall.call = SIMCALL_PROCESS_RESTART;
1287     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1288     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1289     self->simcall.args[0].dp = (void*) process;
1290     if (self != simix_global->maestro_process) {
1291       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1292                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1293       SIMIX_process_yield(self);
1294     } else {
1295       SIMIX_simcall_handle(&self->simcall, 0);
1296     }    
1297     return self->simcall.result.dp;
1298   }
1299   
1300 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1301     smx_process_t self = SIMIX_process_self();
1302
1303     /* Go to that function to follow the code flow through the simcall barrier */
1304     if (0) SIMIX_rdv_create(name);
1305     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1306
1307     self->simcall.call = SIMCALL_RDV_CREATE;
1308     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1309     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1310     self->simcall.args[0].cc = (const char*) name;
1311     if (self != simix_global->maestro_process) {
1312       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1313                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1314       SIMIX_process_yield(self);
1315     } else {
1316       SIMIX_simcall_handle(&self->simcall, 0);
1317     }    
1318     return self->simcall.result.dp;
1319   }
1320   
1321 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1322     smx_process_t self = SIMIX_process_self();
1323
1324     /* Go to that function to follow the code flow through the simcall barrier */
1325     if (0) SIMIX_rdv_destroy(rdv);
1326     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1327
1328     self->simcall.call = SIMCALL_RDV_DESTROY;
1329     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1330     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1331     self->simcall.args[0].dp = (void*) rdv;
1332     if (self != simix_global->maestro_process) {
1333       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1334                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1335       SIMIX_process_yield(self);
1336     } else {
1337       SIMIX_simcall_handle(&self->simcall, 0);
1338     }    
1339     
1340   }
1341   
1342 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) {
1343     smx_process_t self = SIMIX_process_self();
1344
1345     /* Go to that function to follow the code flow through the simcall barrier */
1346     if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
1347     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1348
1349     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1350     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1351     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1352     self->simcall.args[0].dp = (void*) rdv;
1353     self->simcall.args[1].dp = (void*) host;
1354     if (self != simix_global->maestro_process) {
1355       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1356                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1357       SIMIX_process_yield(self);
1358     } else {
1359       SIMIX_simcall_handle(&self->simcall, 0);
1360     }    
1361     return self->simcall.result.ui;
1362   }
1363   
1364 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1365     smx_process_t self = SIMIX_process_self();
1366
1367     /* Go to that function to follow the code flow through the simcall barrier */
1368     if (0) SIMIX_rdv_get_head(rdv);
1369     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1370
1371     self->simcall.call = SIMCALL_RDV_GET_HEAD;
1372     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1373     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1374     self->simcall.args[0].dp = (void*) rdv;
1375     if (self != simix_global->maestro_process) {
1376       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1377                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1378       SIMIX_process_yield(self);
1379     } else {
1380       SIMIX_simcall_handle(&self->simcall, 0);
1381     }    
1382     return self->simcall.result.dp;
1383   }
1384   
1385 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1386     smx_process_t self = SIMIX_process_self();
1387
1388     /* Go to that function to follow the code flow through the simcall barrier */
1389     if (0) SIMIX_rdv_set_receiver(rdv, receiver);
1390     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1391
1392     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1393     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1394     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1395     self->simcall.args[0].dp = (void*) rdv;
1396     self->simcall.args[1].dp = (void*) receiver;
1397     if (self != simix_global->maestro_process) {
1398       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1399                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1400       SIMIX_process_yield(self);
1401     } else {
1402       SIMIX_simcall_handle(&self->simcall, 0);
1403     }    
1404     
1405   }
1406   
1407 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1408     smx_process_t self = SIMIX_process_self();
1409
1410     /* Go to that function to follow the code flow through the simcall barrier */
1411     if (0) SIMIX_rdv_get_receiver(rdv);
1412     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1413
1414     self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1415     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1416     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1417     self->simcall.args[0].dp = (void*) rdv;
1418     if (self != simix_global->maestro_process) {
1419       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1420                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1421       SIMIX_process_yield(self);
1422     } else {
1423       SIMIX_simcall_handle(&self->simcall, 0);
1424     }    
1425     return self->simcall.result.dp;
1426   }
1427   
1428 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) {
1429     smx_process_t self = SIMIX_process_self();
1430
1431     /* Go to that function to follow the code flow through the simcall barrier */
1432     if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1433     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1434
1435     self->simcall.call = SIMCALL_COMM_IPROBE;
1436     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1437     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1438     self->simcall.args[0].dp = (void*) rdv;
1439     self->simcall.args[1].i = (int) type;
1440     self->simcall.args[2].i = (int) src;
1441     self->simcall.args[3].i = (int) tag;
1442     self->simcall.args[4].fp = (FPtr) match_fun;
1443     self->simcall.args[5].dp = (void*) data;
1444     if (self != simix_global->maestro_process) {
1445       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1446                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1447       SIMIX_process_yield(self);
1448     } else {
1449       SIMIX_simcall_handle(&self->simcall, 0);
1450     }    
1451     return self->simcall.result.dp;
1452   }
1453   
1454 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) {
1455     smx_process_t self = SIMIX_process_self();
1456
1457     /* Go to that function to follow the code flow through the simcall barrier */
1458     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);
1459     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1460
1461     self->simcall.call = SIMCALL_COMM_SEND;
1462     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1463     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1464     self->simcall.args[0].dp = (void*) sender;
1465     self->simcall.args[1].dp = (void*) rdv;
1466     self->simcall.args[2].d = (double) task_size;
1467     self->simcall.args[3].d = (double) rate;
1468     self->simcall.args[4].dp = (void*) src_buff;
1469     self->simcall.args[5].sz = (size_t) src_buff_size;
1470     self->simcall.args[6].fp = (FPtr) match_fun;
1471     self->simcall.args[7].fp = (FPtr) copy_data_fun;
1472     self->simcall.args[8].dp = (void*) data;
1473     self->simcall.args[9].d = (double) timeout;
1474     if (self != simix_global->maestro_process) {
1475       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1476                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1477       SIMIX_process_yield(self);
1478     } else {
1479       SIMIX_simcall_handle(&self->simcall, 0);
1480     }    
1481     
1482   }
1483   
1484 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) {
1485     smx_process_t self = SIMIX_process_self();
1486
1487     /* Go to that function to follow the code flow through the simcall barrier */
1488     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);
1489     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1490
1491     self->simcall.call = SIMCALL_COMM_ISEND;
1492     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1493     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1494     self->simcall.args[0].dp = (void*) sender;
1495     self->simcall.args[1].dp = (void*) rdv;
1496     self->simcall.args[2].d = (double) task_size;
1497     self->simcall.args[3].d = (double) rate;
1498     self->simcall.args[4].dp = (void*) src_buff;
1499     self->simcall.args[5].sz = (size_t) src_buff_size;
1500     self->simcall.args[6].fp = (FPtr) match_fun;
1501     self->simcall.args[7].fp = (FPtr) clean_fun;
1502     self->simcall.args[8].fp = (FPtr) copy_data_fun;
1503     self->simcall.args[9].dp = (void*) data;
1504     self->simcall.args[10].i = (int) detached;
1505     if (self != simix_global->maestro_process) {
1506       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1507                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1508       SIMIX_process_yield(self);
1509     } else {
1510       SIMIX_simcall_handle(&self->simcall, 0);
1511     }    
1512     return self->simcall.result.dp;
1513   }
1514   
1515 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) {
1516     smx_process_t self = SIMIX_process_self();
1517
1518     /* Go to that function to follow the code flow through the simcall barrier */
1519     if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1520     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1521
1522     self->simcall.call = SIMCALL_COMM_RECV;
1523     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1524     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1525     self->simcall.args[0].dp = (void*) receiver;
1526     self->simcall.args[1].dp = (void*) rdv;
1527     self->simcall.args[2].dp = (void*) dst_buff;
1528     self->simcall.args[3].dp = (void*) dst_buff_size;
1529     self->simcall.args[4].fp = (FPtr) match_fun;
1530     self->simcall.args[5].fp = (FPtr) copy_data_fun;
1531     self->simcall.args[6].dp = (void*) data;
1532     self->simcall.args[7].d = (double) timeout;
1533     self->simcall.args[8].d = (double) rate;
1534     if (self != simix_global->maestro_process) {
1535       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1536                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1537       SIMIX_process_yield(self);
1538     } else {
1539       SIMIX_simcall_handle(&self->simcall, 0);
1540     }    
1541     
1542   }
1543   
1544 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) {
1545     smx_process_t self = SIMIX_process_self();
1546
1547     /* Go to that function to follow the code flow through the simcall barrier */
1548     if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1549     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1550
1551     self->simcall.call = SIMCALL_COMM_IRECV;
1552     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1553     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1554     self->simcall.args[0].dp = (void*) receiver;
1555     self->simcall.args[1].dp = (void*) rdv;
1556     self->simcall.args[2].dp = (void*) dst_buff;
1557     self->simcall.args[3].dp = (void*) dst_buff_size;
1558     self->simcall.args[4].fp = (FPtr) match_fun;
1559     self->simcall.args[5].fp = (FPtr) copy_data_fun;
1560     self->simcall.args[6].dp = (void*) data;
1561     self->simcall.args[7].d = (double) rate;
1562     if (self != simix_global->maestro_process) {
1563       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1564                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1565       SIMIX_process_yield(self);
1566     } else {
1567       SIMIX_simcall_handle(&self->simcall, 0);
1568     }    
1569     return self->simcall.result.dp;
1570   }
1571   
1572 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
1573     smx_process_t self = SIMIX_process_self();
1574
1575     /* Go to that function to follow the code flow through the simcall barrier */
1576     if (0) SIMIX_comm_cancel(comm);
1577     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1578
1579     self->simcall.call = SIMCALL_COMM_CANCEL;
1580     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1581     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1582     self->simcall.args[0].dp = (void*) comm;
1583     if (self != simix_global->maestro_process) {
1584       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1585                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1586       SIMIX_process_yield(self);
1587     } else {
1588       SIMIX_simcall_handle(&self->simcall, 0);
1589     }    
1590     
1591   }
1592   
1593 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1594     smx_process_t self = SIMIX_process_self();
1595
1596     /* Go to that function to follow the code flow through the simcall barrier */
1597     if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
1598     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1599
1600     self->simcall.call = SIMCALL_COMM_WAITANY;
1601     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1602     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1603     self->simcall.args[0].dp = (void*) comms;
1604     if (self != simix_global->maestro_process) {
1605       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1606                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1607       SIMIX_process_yield(self);
1608     } else {
1609       SIMIX_simcall_handle(&self->simcall, 0);
1610     }    
1611     return self->simcall.result.i;
1612   }
1613   
1614 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
1615     smx_process_t self = SIMIX_process_self();
1616
1617     /* Go to that function to follow the code flow through the simcall barrier */
1618     if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
1619     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1620
1621     self->simcall.call = SIMCALL_COMM_WAIT;
1622     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1623     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1624     self->simcall.args[0].dp = (void*) comm;
1625     self->simcall.args[1].d = (double) timeout;
1626     if (self != simix_global->maestro_process) {
1627       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1628                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1629       SIMIX_process_yield(self);
1630     } else {
1631       SIMIX_simcall_handle(&self->simcall, 0);
1632     }    
1633     
1634   }
1635   
1636 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
1637     smx_process_t self = SIMIX_process_self();
1638
1639     /* Go to that function to follow the code flow through the simcall barrier */
1640     if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
1641     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1642
1643     self->simcall.call = SIMCALL_COMM_TEST;
1644     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1645     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1646     self->simcall.args[0].dp = (void*) comm;
1647     if (self != simix_global->maestro_process) {
1648       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1649                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1650       SIMIX_process_yield(self);
1651     } else {
1652       SIMIX_simcall_handle(&self->simcall, 0);
1653     }    
1654     return self->simcall.result.i;
1655   }
1656   
1657 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1658     smx_process_t self = SIMIX_process_self();
1659
1660     /* Go to that function to follow the code flow through the simcall barrier */
1661     if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
1662     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1663
1664     self->simcall.call = SIMCALL_COMM_TESTANY;
1665     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1666     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1667     self->simcall.args[0].dp = (void*) comms;
1668     if (self != simix_global->maestro_process) {
1669       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1670                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1671       SIMIX_process_yield(self);
1672     } else {
1673       SIMIX_simcall_handle(&self->simcall, 0);
1674     }    
1675     return self->simcall.result.i;
1676   }
1677   
1678 inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
1679     smx_process_t self = SIMIX_process_self();
1680
1681     /* Go to that function to follow the code flow through the simcall barrier */
1682     if (0) SIMIX_comm_get_remains(comm);
1683     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1684
1685     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1686     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1687     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1688     self->simcall.args[0].dp = (void*) comm;
1689     if (self != simix_global->maestro_process) {
1690       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1691                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1692       SIMIX_process_yield(self);
1693     } else {
1694       SIMIX_simcall_handle(&self->simcall, 0);
1695     }    
1696     return self->simcall.result.d;
1697   }
1698   
1699 inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
1700     smx_process_t self = SIMIX_process_self();
1701
1702     /* Go to that function to follow the code flow through the simcall barrier */
1703     if (0) SIMIX_comm_get_state(comm);
1704     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1705
1706     self->simcall.call = SIMCALL_COMM_GET_STATE;
1707     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1708     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1709     self->simcall.args[0].dp = (void*) comm;
1710     if (self != simix_global->maestro_process) {
1711       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1712                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1713       SIMIX_process_yield(self);
1714     } else {
1715       SIMIX_simcall_handle(&self->simcall, 0);
1716     }    
1717     return self->simcall.result.i;
1718   }
1719   
1720 inline static void* simcall_BODY_comm_get_src_data(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) SIMIX_comm_get_src_data(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_GET_SRC_DATA;
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.dp;
1739   }
1740   
1741 inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
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) SIMIX_comm_get_dst_data(comm);
1746     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1747
1748     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
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*) comm;
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.dp;
1760   }
1761   
1762 inline static smx_process_t simcall_BODY_comm_get_src_proc(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_src_proc(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_SRC_PROC;
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.dp;
1781   }
1782   
1783 inline static smx_process_t simcall_BODY_comm_get_dst_proc(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_dst_proc(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_DST_PROC;
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.dp;
1802   }
1803   
1804 inline static smx_mutex_t simcall_BODY_mutex_init() {
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) simcall_HANDLER_mutex_init(&self->simcall);
1809     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1810
1811     self->simcall.call = SIMCALL_MUTEX_INIT;
1812     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1813     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1814
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_mutex_destroy(smx_mutex_t mutex) {
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_mutex_destroy(mutex);
1830     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1831
1832     self->simcall.call = SIMCALL_MUTEX_DESTROY;
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*) mutex;
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     
1844   }
1845   
1846 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
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) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1851     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1852
1853     self->simcall.call = SIMCALL_MUTEX_LOCK;
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*) mutex;
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     
1865   }
1866   
1867 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
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) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
1872     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1873
1874     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
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*) mutex;
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.i;
1886   }
1887   
1888 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
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_unlock(&self->simcall, mutex);
1893     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1894
1895     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1896     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1897     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1898     self->simcall.args[0].dp = (void*) mutex;
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     
1907   }
1908   
1909 inline static smx_cond_t simcall_BODY_cond_init() {
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_cond_init();
1914     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1915
1916     self->simcall.call = SIMCALL_COND_INIT;
1917     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1918     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1919
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     return self->simcall.result.dp;
1928   }
1929   
1930 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
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) SIMIX_cond_destroy(cond);
1935     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1936
1937     self->simcall.call = SIMCALL_COND_DESTROY;
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*) cond;
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 void simcall_BODY_cond_signal(smx_cond_t cond) {
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) SIMIX_cond_signal(cond);
1956     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1957
1958     self->simcall.call = SIMCALL_COND_SIGNAL;
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*) cond;
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     
1970   }
1971   
1972 inline static void simcall_BODY_cond_wait(smx_cond_t cond, 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_cond_wait(&self->simcall, cond, mutex);
1977     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1978
1979     self->simcall.call = SIMCALL_COND_WAIT;
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*) cond;
1983     self->simcall.args[1].dp = (void*) mutex;
1984     if (self != simix_global->maestro_process) {
1985       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1986                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1987       SIMIX_process_yield(self);
1988     } else {
1989       SIMIX_simcall_handle(&self->simcall, 0);
1990     }    
1991     
1992   }
1993   
1994 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1995     smx_process_t self = SIMIX_process_self();
1996
1997     /* Go to that function to follow the code flow through the simcall barrier */
1998     if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
1999     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2000
2001     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
2002     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2003     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2004     self->simcall.args[0].dp = (void*) cond;
2005     self->simcall.args[1].dp = (void*) mutex;
2006     self->simcall.args[2].d = (double) timeout;
2007     if (self != simix_global->maestro_process) {
2008       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2009                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2010       SIMIX_process_yield(self);
2011     } else {
2012       SIMIX_simcall_handle(&self->simcall, 0);
2013     }    
2014     
2015   }
2016   
2017 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
2018     smx_process_t self = SIMIX_process_self();
2019
2020     /* Go to that function to follow the code flow through the simcall barrier */
2021     if (0) SIMIX_cond_broadcast(cond);
2022     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2023
2024     self->simcall.call = SIMCALL_COND_BROADCAST;
2025     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2026     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2027     self->simcall.args[0].dp = (void*) cond;
2028     if (self != simix_global->maestro_process) {
2029       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2030                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2031       SIMIX_process_yield(self);
2032     } else {
2033       SIMIX_simcall_handle(&self->simcall, 0);
2034     }    
2035     
2036   }
2037   
2038 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
2039     smx_process_t self = SIMIX_process_self();
2040
2041     /* Go to that function to follow the code flow through the simcall barrier */
2042     if (0) SIMIX_sem_init(capacity);
2043     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2044
2045     self->simcall.call = SIMCALL_SEM_INIT;
2046     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2047     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2048     self->simcall.args[0].ui = (unsigned int) capacity;
2049     if (self != simix_global->maestro_process) {
2050       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2051                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2052       SIMIX_process_yield(self);
2053     } else {
2054       SIMIX_simcall_handle(&self->simcall, 0);
2055     }    
2056     return self->simcall.result.dp;
2057   }
2058   
2059 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2060     smx_process_t self = SIMIX_process_self();
2061
2062     /* Go to that function to follow the code flow through the simcall barrier */
2063     if (0) SIMIX_sem_destroy(sem);
2064     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2065
2066     self->simcall.call = SIMCALL_SEM_DESTROY;
2067     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2068     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2069     self->simcall.args[0].dp = (void*) sem;
2070     if (self != simix_global->maestro_process) {
2071       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2072                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2073       SIMIX_process_yield(self);
2074     } else {
2075       SIMIX_simcall_handle(&self->simcall, 0);
2076     }    
2077     
2078   }
2079   
2080 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2081     smx_process_t self = SIMIX_process_self();
2082
2083     /* Go to that function to follow the code flow through the simcall barrier */
2084     if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
2085     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2086
2087     self->simcall.call = SIMCALL_SEM_RELEASE;
2088     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2089     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2090     self->simcall.args[0].dp = (void*) sem;
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 int simcall_BODY_sem_would_block(smx_sem_t sem) {
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) simcall_HANDLER_sem_would_block(&self->simcall, sem);
2106     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2107
2108     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
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*) sem;
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     return self->simcall.result.i;
2120   }
2121   
2122 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
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) simcall_HANDLER_sem_acquire(&self->simcall, sem);
2127     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2128
2129     self->simcall.call = SIMCALL_SEM_ACQUIRE;
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].dp = (void*) sem;
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     
2141   }
2142   
2143 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
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) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
2148     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2149
2150     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
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     self->simcall.args[1].d = (double) timeout;
2155     if (self != simix_global->maestro_process) {
2156       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2157                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2158       SIMIX_process_yield(self);
2159     } else {
2160       SIMIX_simcall_handle(&self->simcall, 0);
2161     }    
2162     
2163   }
2164   
2165 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2166     smx_process_t self = SIMIX_process_self();
2167
2168     /* Go to that function to follow the code flow through the simcall barrier */
2169     if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
2170     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2171
2172     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2173     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2174     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2175     self->simcall.args[0].dp = (void*) sem;
2176     if (self != simix_global->maestro_process) {
2177       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2178                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2179       SIMIX_process_yield(self);
2180     } else {
2181       SIMIX_simcall_handle(&self->simcall, 0);
2182     }    
2183     return self->simcall.result.i;
2184   }
2185   
2186 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
2187     smx_process_t self = SIMIX_process_self();
2188
2189     /* Go to that function to follow the code flow through the simcall barrier */
2190     if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
2191     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2192
2193     self->simcall.call = SIMCALL_FILE_READ;
2194     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2195     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2196     self->simcall.args[0].dp = (void*) fd;
2197     self->simcall.args[1].sgsz = (sg_size_t) size;
2198     self->simcall.args[2].dp = (void*) host;
2199     if (self != simix_global->maestro_process) {
2200       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2201                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2202       SIMIX_process_yield(self);
2203     } else {
2204       SIMIX_simcall_handle(&self->simcall, 0);
2205     }    
2206     return self->simcall.result.sgsz;
2207   }
2208   
2209 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
2210     smx_process_t self = SIMIX_process_self();
2211
2212     /* Go to that function to follow the code flow through the simcall barrier */
2213     if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
2214     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2215
2216     self->simcall.call = SIMCALL_FILE_WRITE;
2217     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2218     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2219     self->simcall.args[0].dp = (void*) fd;
2220     self->simcall.args[1].sgsz = (sg_size_t) size;
2221     self->simcall.args[2].dp = (void*) host;
2222     if (self != simix_global->maestro_process) {
2223       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2224                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2225       SIMIX_process_yield(self);
2226     } else {
2227       SIMIX_simcall_handle(&self->simcall, 0);
2228     }    
2229     return self->simcall.result.sgsz;
2230   }
2231   
2232 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
2233     smx_process_t self = SIMIX_process_self();
2234
2235     /* Go to that function to follow the code flow through the simcall barrier */
2236     if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
2237     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2238
2239     self->simcall.call = SIMCALL_FILE_OPEN;
2240     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2241     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2242     self->simcall.args[0].cc = (const char*) fullpath;
2243     self->simcall.args[1].dp = (void*) host;
2244     if (self != simix_global->maestro_process) {
2245       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2246                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2247       SIMIX_process_yield(self);
2248     } else {
2249       SIMIX_simcall_handle(&self->simcall, 0);
2250     }    
2251     return self->simcall.result.dp;
2252   }
2253   
2254 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
2255     smx_process_t self = SIMIX_process_self();
2256
2257     /* Go to that function to follow the code flow through the simcall barrier */
2258     if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
2259     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2260
2261     self->simcall.call = SIMCALL_FILE_CLOSE;
2262     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2263     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2264     self->simcall.args[0].dp = (void*) fd;
2265     self->simcall.args[1].dp = (void*) host;
2266     if (self != simix_global->maestro_process) {
2267       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2268                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2269       SIMIX_process_yield(self);
2270     } else {
2271       SIMIX_simcall_handle(&self->simcall, 0);
2272     }    
2273     return self->simcall.result.i;
2274   }
2275   
2276 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
2277     smx_process_t self = SIMIX_process_self();
2278
2279     /* Go to that function to follow the code flow through the simcall barrier */
2280     if (0) SIMIX_file_unlink(fd, host);
2281     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2282
2283     self->simcall.call = SIMCALL_FILE_UNLINK;
2284     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2285     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2286     self->simcall.args[0].dp = (void*) fd;
2287     self->simcall.args[1].dp = (void*) host;
2288     if (self != simix_global->maestro_process) {
2289       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2290                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2291       SIMIX_process_yield(self);
2292     } else {
2293       SIMIX_simcall_handle(&self->simcall, 0);
2294     }    
2295     return self->simcall.result.i;
2296   }
2297   
2298 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2299     smx_process_t self = SIMIX_process_self();
2300
2301     /* Go to that function to follow the code flow through the simcall barrier */
2302     if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
2303     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2304
2305     self->simcall.call = SIMCALL_FILE_GET_SIZE;
2306     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2307     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2308     self->simcall.args[0].dp = (void*) fd;
2309     if (self != simix_global->maestro_process) {
2310       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2311                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2312       SIMIX_process_yield(self);
2313     } else {
2314       SIMIX_simcall_handle(&self->simcall, 0);
2315     }    
2316     return self->simcall.result.sgsz;
2317   }
2318   
2319 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2320     smx_process_t self = SIMIX_process_self();
2321
2322     /* Go to that function to follow the code flow through the simcall barrier */
2323     if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
2324     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2325
2326     self->simcall.call = SIMCALL_FILE_TELL;
2327     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2328     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2329     self->simcall.args[0].dp = (void*) fd;
2330     if (self != simix_global->maestro_process) {
2331       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2332                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2333       SIMIX_process_yield(self);
2334     } else {
2335       SIMIX_simcall_handle(&self->simcall, 0);
2336     }    
2337     return self->simcall.result.sgsz;
2338   }
2339   
2340 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2341     smx_process_t self = SIMIX_process_self();
2342
2343     /* Go to that function to follow the code flow through the simcall barrier */
2344     if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
2345     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2346
2347     self->simcall.call = SIMCALL_FILE_SEEK;
2348     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2349     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2350     self->simcall.args[0].dp = (void*) fd;
2351     self->simcall.args[1].sgoff = (sg_offset_t) offset;
2352     self->simcall.args[2].i = (int) origin;
2353     if (self != simix_global->maestro_process) {
2354       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2355                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2356       SIMIX_process_yield(self);
2357     } else {
2358       SIMIX_simcall_handle(&self->simcall, 0);
2359     }    
2360     return self->simcall.result.i;
2361   }
2362   
2363 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2364     smx_process_t self = SIMIX_process_self();
2365
2366     /* Go to that function to follow the code flow through the simcall barrier */
2367     if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
2368     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2369
2370     self->simcall.call = SIMCALL_FILE_GET_INFO;
2371     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2372     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2373     self->simcall.args[0].dp = (void*) fd;
2374     if (self != simix_global->maestro_process) {
2375       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2376                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2377       SIMIX_process_yield(self);
2378     } else {
2379       SIMIX_simcall_handle(&self->simcall, 0);
2380     }    
2381     return self->simcall.result.dp;
2382   }
2383   
2384 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2385     smx_process_t self = SIMIX_process_self();
2386
2387     /* Go to that function to follow the code flow through the simcall barrier */
2388     if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
2389     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2390
2391     self->simcall.call = SIMCALL_FILE_MOVE;
2392     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2393     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2394     self->simcall.args[0].dp = (void*) fd;
2395     self->simcall.args[1].cc = (const char*) fullpath;
2396     if (self != simix_global->maestro_process) {
2397       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2398                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2399       SIMIX_process_yield(self);
2400     } else {
2401       SIMIX_simcall_handle(&self->simcall, 0);
2402     }    
2403     return self->simcall.result.i;
2404   }
2405   
2406 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2407     smx_process_t self = SIMIX_process_self();
2408
2409     /* Go to that function to follow the code flow through the simcall barrier */
2410     if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
2411     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2412
2413     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2414     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2415     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2416     self->simcall.args[0].dp = (void*) storage;
2417     if (self != simix_global->maestro_process) {
2418       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2419                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2420       SIMIX_process_yield(self);
2421     } else {
2422       SIMIX_simcall_handle(&self->simcall, 0);
2423     }    
2424     return self->simcall.result.sgsz;
2425   }
2426   
2427 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2428     smx_process_t self = SIMIX_process_self();
2429
2430     /* Go to that function to follow the code flow through the simcall barrier */
2431     if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
2432     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2433
2434     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2435     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2436     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2437     self->simcall.args[0].dp = (void*) name;
2438     if (self != simix_global->maestro_process) {
2439       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2440                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2441       SIMIX_process_yield(self);
2442     } else {
2443       SIMIX_simcall_handle(&self->simcall, 0);
2444     }    
2445     return self->simcall.result.sgsz;
2446   }
2447   
2448 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2449     smx_process_t self = SIMIX_process_self();
2450
2451     /* Go to that function to follow the code flow through the simcall barrier */
2452     if (0) SIMIX_storage_get_properties(storage);
2453     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2454
2455     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2456     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2457     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2458     self->simcall.args[0].dp = (void*) storage;
2459     if (self != simix_global->maestro_process) {
2460       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2461                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2462       SIMIX_process_yield(self);
2463     } else {
2464       SIMIX_simcall_handle(&self->simcall, 0);
2465     }    
2466     return self->simcall.result.dp;
2467   }
2468   
2469 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2470     smx_process_t self = SIMIX_process_self();
2471
2472     /* Go to that function to follow the code flow through the simcall barrier */
2473     if (0) SIMIX_storage_get_content(storage);
2474     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2475
2476     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2477     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2478     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2479     self->simcall.args[0].dp = (void*) storage;
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.dp;
2488   }
2489   
2490 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
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_asr_get_properties(&self->simcall, name);
2495     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2496
2497     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
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].cc = (const char*) name;
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.dp;
2509   }
2510   
2511 inline static int simcall_BODY_mc_random(int min, int max) {
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_mc_random(&self->simcall, min, max);
2516     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2517
2518     self->simcall.call = SIMCALL_MC_RANDOM;
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].i = (int) min;
2522     self->simcall.args[1].i = (int) max;
2523     if (self != simix_global->maestro_process) {
2524       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2525                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2526       SIMIX_process_yield(self);
2527     } else {
2528       SIMIX_simcall_handle(&self->simcall, 0);
2529     }    
2530     return self->simcall.result.i;
2531   }
2532   
2533 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
2534     smx_process_t self = SIMIX_process_self();
2535
2536     /* Go to that function to follow the code flow through the simcall barrier */
2537     if (0) SIMIX_set_category(synchro, category);
2538     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2539
2540     self->simcall.call = SIMCALL_SET_CATEGORY;
2541     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2542     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2543     self->simcall.args[0].dp = (void*) synchro;
2544     self->simcall.args[1].cc = (const char*) category;
2545     if (self != simix_global->maestro_process) {
2546       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2547                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2548       SIMIX_process_yield(self);
2549     } else {
2550       SIMIX_simcall_handle(&self->simcall, 0);
2551     }    
2552     
2553   }
2554 #ifdef HAVE_LATENCY_BOUND_TRACKING
2555   
2556 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
2557     smx_process_t self = SIMIX_process_self();
2558
2559     /* Go to that function to follow the code flow through the simcall barrier */
2560     if (0) SIMIX_comm_is_latency_bounded(comm);
2561     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2562
2563     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2564     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2565     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2566     self->simcall.args[0].dp = (void*) comm;
2567     if (self != simix_global->maestro_process) {
2568       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2569                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2570       SIMIX_process_yield(self);
2571     } else {
2572       SIMIX_simcall_handle(&self->simcall, 0);
2573     }    
2574     return self->simcall.result.i;
2575   }
2576 #endif
2577
2578 #ifdef HAVE_MC
2579   
2580 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
2581     smx_process_t self = SIMIX_process_self();
2582
2583     /* Go to that function to follow the code flow through the simcall barrier */
2584     if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
2585     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2586
2587     self->simcall.call = SIMCALL_MC_SNAPSHOT;
2588     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2589     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2590
2591     if (self != simix_global->maestro_process) {
2592       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2593                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2594       SIMIX_process_yield(self);
2595     } else {
2596       SIMIX_simcall_handle(&self->simcall, 0);
2597     }    
2598     return self->simcall.result.dp;
2599   }
2600   
2601 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
2602     smx_process_t self = SIMIX_process_self();
2603
2604     /* Go to that function to follow the code flow through the simcall barrier */
2605     if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
2606     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2607
2608     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2609     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2610     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2611     self->simcall.args[0].dp = (void*) s1;
2612     self->simcall.args[1].dp = (void*) s2;
2613     if (self != simix_global->maestro_process) {
2614       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2615                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2616       SIMIX_process_yield(self);
2617     } else {
2618       SIMIX_simcall_handle(&self->simcall, 0);
2619     }    
2620     return self->simcall.result.i;
2621   }
2622 #endif