Logo AND Algorithmique Numérique Distribuée

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