Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[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 void simcall_BODY_host_set_pstate(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_set_pstate(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_SET_PSTATE;
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     
314   }
315   
316 inline static int simcall_BODY_host_get_pstate(smx_host_t host) {
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_pstate(host);
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_PSTATE;
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     if (self != simix_global->maestro_process) {
328       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
329                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
330       SIMIX_process_yield(self);
331     } else {
332       SIMIX_simcall_handle(&self->simcall, 0);
333     }    
334     return self->simcall.result.i;
335   }
336   
337 inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
338     smx_process_t self = SIMIX_process_self();
339
340     /* Go to that function to follow the code flow through the simcall barrier */
341     if (0) SIMIX_host_get_consumed_energy(host);
342     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
343
344     self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
345     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
346     memset(self->simcall.args, 0, sizeof(self->simcall.args));
347     self->simcall.args[0].dp = (void*) host;
348     if (self != simix_global->maestro_process) {
349       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
350                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
351       SIMIX_process_yield(self);
352     } else {
353       SIMIX_simcall_handle(&self->simcall, 0);
354     }    
355     return self->simcall.result.d;
356   }
357   
358 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) {
359     smx_process_t self = SIMIX_process_self();
360
361     /* Go to that function to follow the code flow through the simcall barrier */
362     if (0) SIMIX_host_execute(name, host, flops_amount, priority, bound, affinity_mask);
363     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
364
365     self->simcall.call = SIMCALL_HOST_EXECUTE;
366     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
367     memset(self->simcall.args, 0, sizeof(self->simcall.args));
368     self->simcall.args[0].cc = (const char*) name;
369     self->simcall.args[1].dp = (void*) host;
370     self->simcall.args[2].d = (double) flops_amount;
371     self->simcall.args[3].d = (double) priority;
372     self->simcall.args[4].d = (double) bound;
373     self->simcall.args[5].ul = (unsigned long) affinity_mask;
374     if (self != simix_global->maestro_process) {
375       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
376                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
377       SIMIX_process_yield(self);
378     } else {
379       SIMIX_simcall_handle(&self->simcall, 0);
380     }    
381     return self->simcall.result.dp;
382   }
383   
384 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) {
385     smx_process_t self = SIMIX_process_self();
386
387     /* Go to that function to follow the code flow through the simcall barrier */
388     if (0) SIMIX_host_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
389     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
390
391     self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
392     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
393     memset(self->simcall.args, 0, sizeof(self->simcall.args));
394     self->simcall.args[0].cc = (const char*) name;
395     self->simcall.args[1].i = (int) host_nb;
396     self->simcall.args[2].dp = (void*) host_list;
397     self->simcall.args[3].dp = (void*) flops_amount;
398     self->simcall.args[4].dp = (void*) bytes_amount;
399     self->simcall.args[5].d = (double) amount;
400     self->simcall.args[6].d = (double) rate;
401     if (self != simix_global->maestro_process) {
402       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
403                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
404       SIMIX_process_yield(self);
405     } else {
406       SIMIX_simcall_handle(&self->simcall, 0);
407     }    
408     return self->simcall.result.dp;
409   }
410   
411 inline static void simcall_BODY_host_execution_destroy(smx_synchro_t execution) {
412     smx_process_t self = SIMIX_process_self();
413
414     /* Go to that function to follow the code flow through the simcall barrier */
415     if (0) SIMIX_host_execution_destroy(execution);
416     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
417
418     self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY;
419     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
420     memset(self->simcall.args, 0, sizeof(self->simcall.args));
421     self->simcall.args[0].dp = (void*) execution;
422     if (self != simix_global->maestro_process) {
423       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
424                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
425       SIMIX_process_yield(self);
426     } else {
427       SIMIX_simcall_handle(&self->simcall, 0);
428     }    
429     
430   }
431   
432 inline static void simcall_BODY_host_execution_cancel(smx_synchro_t execution) {
433     smx_process_t self = SIMIX_process_self();
434
435     /* Go to that function to follow the code flow through the simcall barrier */
436     if (0) SIMIX_host_execution_cancel(execution);
437     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
438
439     self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL;
440     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
441     memset(self->simcall.args, 0, sizeof(self->simcall.args));
442     self->simcall.args[0].dp = (void*) execution;
443     if (self != simix_global->maestro_process) {
444       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
445                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
446       SIMIX_process_yield(self);
447     } else {
448       SIMIX_simcall_handle(&self->simcall, 0);
449     }    
450     
451   }
452   
453 inline static double simcall_BODY_host_execution_get_remains(smx_synchro_t execution) {
454     smx_process_t self = SIMIX_process_self();
455
456     /* Go to that function to follow the code flow through the simcall barrier */
457     if (0) SIMIX_host_execution_get_remains(execution);
458     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
459
460     self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
461     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
462     memset(self->simcall.args, 0, sizeof(self->simcall.args));
463     self->simcall.args[0].dp = (void*) execution;
464     if (self != simix_global->maestro_process) {
465       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
466                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
467       SIMIX_process_yield(self);
468     } else {
469       SIMIX_simcall_handle(&self->simcall, 0);
470     }    
471     return self->simcall.result.d;
472   }
473   
474 inline static e_smx_state_t simcall_BODY_host_execution_get_state(smx_synchro_t execution) {
475     smx_process_t self = SIMIX_process_self();
476
477     /* Go to that function to follow the code flow through the simcall barrier */
478     if (0) SIMIX_host_execution_get_state(execution);
479     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
480
481     self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE;
482     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
483     memset(self->simcall.args, 0, sizeof(self->simcall.args));
484     self->simcall.args[0].dp = (void*) execution;
485     if (self != simix_global->maestro_process) {
486       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
487                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
488       SIMIX_process_yield(self);
489     } else {
490       SIMIX_simcall_handle(&self->simcall, 0);
491     }    
492     return self->simcall.result.i;
493   }
494   
495 inline static void simcall_BODY_host_execution_set_priority(smx_synchro_t execution, double priority) {
496     smx_process_t self = SIMIX_process_self();
497
498     /* Go to that function to follow the code flow through the simcall barrier */
499     if (0) SIMIX_host_execution_set_priority(execution, priority);
500     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
501
502     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
503     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
504     memset(self->simcall.args, 0, sizeof(self->simcall.args));
505     self->simcall.args[0].dp = (void*) execution;
506     self->simcall.args[1].d = (double) priority;
507     if (self != simix_global->maestro_process) {
508       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
509                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
510       SIMIX_process_yield(self);
511     } else {
512       SIMIX_simcall_handle(&self->simcall, 0);
513     }    
514     
515   }
516   
517 inline static void simcall_BODY_host_execution_set_bound(smx_synchro_t execution, double bound) {
518     smx_process_t self = SIMIX_process_self();
519
520     /* Go to that function to follow the code flow through the simcall barrier */
521     if (0) SIMIX_host_execution_set_bound(execution, bound);
522     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
523
524     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND;
525     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
526     memset(self->simcall.args, 0, sizeof(self->simcall.args));
527     self->simcall.args[0].dp = (void*) execution;
528     self->simcall.args[1].d = (double) bound;
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     
537   }
538   
539 inline static void simcall_BODY_host_execution_set_affinity(smx_synchro_t execution, smx_host_t ws, unsigned long mask) {
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_affinity(execution, ws, mask);
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_AFFINITY;
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].dp = (void*) ws;
551     self->simcall.args[2].ul = (unsigned long) mask;
552     if (self != simix_global->maestro_process) {
553       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
554                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
555       SIMIX_process_yield(self);
556     } else {
557       SIMIX_simcall_handle(&self->simcall, 0);
558     }    
559     
560   }
561   
562 inline static int simcall_BODY_host_execution_wait(smx_synchro_t execution) {
563     smx_process_t self = SIMIX_process_self();
564
565     /* Go to that function to follow the code flow through the simcall barrier */
566     if (0) simcall_HANDLER_host_execution_wait(&self->simcall, execution);
567     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
568
569     self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT;
570     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
571     memset(self->simcall.args, 0, sizeof(self->simcall.args));
572     self->simcall.args[0].dp = (void*) execution;
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     return self->simcall.result.i;
581   }
582   
583 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
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_get_mounted_storage_list(host);
588     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
589
590     self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
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*) host;
594     if (self != simix_global->maestro_process) {
595       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
596                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
597       SIMIX_process_yield(self);
598     } else {
599       SIMIX_simcall_handle(&self->simcall, 0);
600     }    
601     return self->simcall.result.dp;
602   }
603   
604 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
605     smx_process_t self = SIMIX_process_self();
606
607     /* Go to that function to follow the code flow through the simcall barrier */
608     if (0) SIMIX_host_get_attached_storage_list(host);
609     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
610
611     self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
612     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
613     memset(self->simcall.args, 0, sizeof(self->simcall.args));
614     self->simcall.args[0].dp = (void*) host;
615     if (self != simix_global->maestro_process) {
616       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
617                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
618       SIMIX_process_yield(self);
619     } else {
620       SIMIX_simcall_handle(&self->simcall, 0);
621     }    
622     return self->simcall.result.dp;
623   }
624   
625 inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
626     smx_process_t self = SIMIX_process_self();
627
628     /* Go to that function to follow the code flow through the simcall barrier */
629     if (0) SIMIX_host_get_params(ind_vm, params);
630     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
631
632     self->simcall.call = SIMCALL_HOST_GET_PARAMS;
633     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
634     memset(self->simcall.args, 0, sizeof(self->simcall.args));
635     self->simcall.args[0].dp = (void*) ind_vm;
636     self->simcall.args[1].dp = (void*) params;
637     if (self != simix_global->maestro_process) {
638       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
639                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
640       SIMIX_process_yield(self);
641     } else {
642       SIMIX_simcall_handle(&self->simcall, 0);
643     }    
644     
645   }
646   
647 inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
648     smx_process_t self = SIMIX_process_self();
649
650     /* Go to that function to follow the code flow through the simcall barrier */
651     if (0) SIMIX_host_set_params(ind_vm, params);
652     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
653
654     self->simcall.call = SIMCALL_HOST_SET_PARAMS;
655     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
656     memset(self->simcall.args, 0, sizeof(self->simcall.args));
657     self->simcall.args[0].dp = (void*) ind_vm;
658     self->simcall.args[1].dp = (void*) params;
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     
667   }
668   
669 inline static smx_host_t simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
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_vm_create(name, ind_pm);
674     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
675
676     self->simcall.call = SIMCALL_VM_CREATE;
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].cc = (const char*) name;
680     self->simcall.args[1].dp = (void*) ind_pm;
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     return self->simcall.result.dp;
689   }
690   
691 inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
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_vm_start(ind_vm);
696     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
697
698     self->simcall.call = SIMCALL_VM_START;
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     if (self != simix_global->maestro_process) {
703       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
704                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
705       SIMIX_process_yield(self);
706     } else {
707       SIMIX_simcall_handle(&self->simcall, 0);
708     }    
709     
710   }
711   
712 inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
713     smx_process_t self = SIMIX_process_self();
714
715     /* Go to that function to follow the code flow through the simcall barrier */
716     if (0) SIMIX_vm_get_state(ind_vm);
717     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
718
719     self->simcall.call = SIMCALL_VM_GET_STATE;
720     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
721     memset(self->simcall.args, 0, sizeof(self->simcall.args));
722     self->simcall.args[0].dp = (void*) ind_vm;
723     if (self != simix_global->maestro_process) {
724       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
725                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
726       SIMIX_process_yield(self);
727     } else {
728       SIMIX_simcall_handle(&self->simcall, 0);
729     }    
730     return self->simcall.result.i;
731   }
732   
733 inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
734     smx_process_t self = SIMIX_process_self();
735
736     /* Go to that function to follow the code flow through the simcall barrier */
737     if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
738     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
739
740     self->simcall.call = SIMCALL_VM_MIGRATE;
741     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
742     memset(self->simcall.args, 0, sizeof(self->simcall.args));
743     self->simcall.args[0].dp = (void*) ind_vm;
744     self->simcall.args[1].dp = (void*) ind_dst_pm;
745     if (self != simix_global->maestro_process) {
746       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
747                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
748       SIMIX_process_yield(self);
749     } else {
750       SIMIX_simcall_handle(&self->simcall, 0);
751     }    
752     
753   }
754   
755 inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
756     smx_process_t self = SIMIX_process_self();
757
758     /* Go to that function to follow the code flow through the simcall barrier */
759     if (0) SIMIX_vm_get_pm(ind_vm);
760     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
761
762     self->simcall.call = SIMCALL_VM_GET_PM;
763     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
764     memset(self->simcall.args, 0, sizeof(self->simcall.args));
765     self->simcall.args[0].dp = (void*) ind_vm;
766     if (self != simix_global->maestro_process) {
767       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
768                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
769       SIMIX_process_yield(self);
770     } else {
771       SIMIX_simcall_handle(&self->simcall, 0);
772     }    
773     return self->simcall.result.dp;
774   }
775   
776 inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
777     smx_process_t self = SIMIX_process_self();
778
779     /* Go to that function to follow the code flow through the simcall barrier */
780     if (0) SIMIX_vm_set_bound(ind_vm, bound);
781     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
782
783     self->simcall.call = SIMCALL_VM_SET_BOUND;
784     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
785     memset(self->simcall.args, 0, sizeof(self->simcall.args));
786     self->simcall.args[0].dp = (void*) ind_vm;
787     self->simcall.args[1].d = (double) bound;
788     if (self != simix_global->maestro_process) {
789       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
790                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
791       SIMIX_process_yield(self);
792     } else {
793       SIMIX_simcall_handle(&self->simcall, 0);
794     }    
795     
796   }
797   
798 inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
799     smx_process_t self = SIMIX_process_self();
800
801     /* Go to that function to follow the code flow through the simcall barrier */
802     if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
803     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
804
805     self->simcall.call = SIMCALL_VM_SET_AFFINITY;
806     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
807     memset(self->simcall.args, 0, sizeof(self->simcall.args));
808     self->simcall.args[0].dp = (void*) ind_vm;
809     self->simcall.args[1].dp = (void*) ind_pm;
810     self->simcall.args[2].ul = (unsigned long) mask;
811     if (self != simix_global->maestro_process) {
812       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
813                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
814       SIMIX_process_yield(self);
815     } else {
816       SIMIX_simcall_handle(&self->simcall, 0);
817     }    
818     
819   }
820   
821 inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
822     smx_process_t self = SIMIX_process_self();
823
824     /* Go to that function to follow the code flow through the simcall barrier */
825     if (0) SIMIX_vm_destroy(ind_vm);
826     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
827
828     self->simcall.call = SIMCALL_VM_DESTROY;
829     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
830     memset(self->simcall.args, 0, sizeof(self->simcall.args));
831     self->simcall.args[0].dp = (void*) ind_vm;
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_suspend(smx_host_t ind_vm) {
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) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
847     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
848
849     self->simcall.call = SIMCALL_VM_SUSPEND;
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     if (self != simix_global->maestro_process) {
854       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
855                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
856       SIMIX_process_yield(self);
857     } else {
858       SIMIX_simcall_handle(&self->simcall, 0);
859     }    
860     
861   }
862   
863 inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
864     smx_process_t self = SIMIX_process_self();
865
866     /* Go to that function to follow the code flow through the simcall barrier */
867     if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
868     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
869
870     self->simcall.call = SIMCALL_VM_RESUME;
871     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
872     memset(self->simcall.args, 0, sizeof(self->simcall.args));
873     self->simcall.args[0].dp = (void*) ind_vm;
874     if (self != simix_global->maestro_process) {
875       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
876                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
877       SIMIX_process_yield(self);
878     } else {
879       SIMIX_simcall_handle(&self->simcall, 0);
880     }    
881     
882   }
883   
884 inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
885     smx_process_t self = SIMIX_process_self();
886
887     /* Go to that function to follow the code flow through the simcall barrier */
888     if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
889     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
890
891     self->simcall.call = SIMCALL_VM_SHUTDOWN;
892     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
893     memset(self->simcall.args, 0, sizeof(self->simcall.args));
894     self->simcall.args[0].dp = (void*) ind_vm;
895     if (self != simix_global->maestro_process) {
896       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
897                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
898       SIMIX_process_yield(self);
899     } else {
900       SIMIX_simcall_handle(&self->simcall, 0);
901     }    
902     
903   }
904   
905 inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
906     smx_process_t self = SIMIX_process_self();
907
908     /* Go to that function to follow the code flow through the simcall barrier */
909     if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
910     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
911
912     self->simcall.call = SIMCALL_VM_SAVE;
913     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
914     memset(self->simcall.args, 0, sizeof(self->simcall.args));
915     self->simcall.args[0].dp = (void*) ind_vm;
916     if (self != simix_global->maestro_process) {
917       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
918                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
919       SIMIX_process_yield(self);
920     } else {
921       SIMIX_simcall_handle(&self->simcall, 0);
922     }    
923     
924   }
925   
926 inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
927     smx_process_t self = SIMIX_process_self();
928
929     /* Go to that function to follow the code flow through the simcall barrier */
930     if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
931     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
932
933     self->simcall.call = SIMCALL_VM_RESTORE;
934     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
935     memset(self->simcall.args, 0, sizeof(self->simcall.args));
936     self->simcall.args[0].dp = (void*) ind_vm;
937     if (self != simix_global->maestro_process) {
938       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
939                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
940       SIMIX_process_yield(self);
941     } else {
942       SIMIX_simcall_handle(&self->simcall, 0);
943     }    
944     
945   }
946   
947 inline static void simcall_BODY_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t dst_pm) {
948     smx_process_t self = SIMIX_process_self();
949
950     /* Go to that function to follow the code flow through the simcall barrier */
951     if (0) SIMIX_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
952     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
953
954     self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO;
955     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
956     memset(self->simcall.args, 0, sizeof(self->simcall.args));
957     self->simcall.args[0].dp = (void*) vm;
958     self->simcall.args[1].dp = (void*) src_pm;
959     self->simcall.args[2].dp = (void*) dst_pm;
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_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) {
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_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
975     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
976
977     self->simcall.call = SIMCALL_PROCESS_CREATE;
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*) process;
981     self->simcall.args[1].cc = (const char*) name;
982     self->simcall.args[2].fp = (FPtr) code;
983     self->simcall.args[3].dp = (void*) data;
984     self->simcall.args[4].cc = (const char*) hostname;
985     self->simcall.args[5].d = (double) kill_time;
986     self->simcall.args[6].i = (int) argc;
987     self->simcall.args[7].dp = (void*) argv;
988     self->simcall.args[8].dp = (void*) properties;
989     self->simcall.args[9].i = (int) auto_restart;
990     if (self != simix_global->maestro_process) {
991       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
992                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
993       SIMIX_process_yield(self);
994     } else {
995       SIMIX_simcall_handle(&self->simcall, 0);
996     }    
997     
998   }
999   
1000 inline static void simcall_BODY_process_kill(smx_process_t process) {
1001     smx_process_t self = SIMIX_process_self();
1002
1003     /* Go to that function to follow the code flow through the simcall barrier */
1004     if (0) simcall_HANDLER_process_kill(&self->simcall, process);
1005     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1006
1007     self->simcall.call = SIMCALL_PROCESS_KILL;
1008     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1009     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1010     self->simcall.args[0].dp = (void*) process;
1011     if (self != simix_global->maestro_process) {
1012       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1013                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1014       SIMIX_process_yield(self);
1015     } else {
1016       SIMIX_simcall_handle(&self->simcall, 0);
1017     }    
1018     
1019   }
1020   
1021 inline static void simcall_BODY_process_killall(int reset_pid) {
1022     smx_process_t self = SIMIX_process_self();
1023
1024     /* Go to that function to follow the code flow through the simcall barrier */
1025     if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
1026     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1027
1028     self->simcall.call = SIMCALL_PROCESS_KILLALL;
1029     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1030     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1031     self->simcall.args[0].i = (int) reset_pid;
1032     if (self != simix_global->maestro_process) {
1033       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1034                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1035       SIMIX_process_yield(self);
1036     } else {
1037       SIMIX_simcall_handle(&self->simcall, 0);
1038     }    
1039     
1040   }
1041   
1042 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
1043     smx_process_t self = SIMIX_process_self();
1044
1045     /* Go to that function to follow the code flow through the simcall barrier */
1046     if (0) SIMIX_process_cleanup(process);
1047     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1048
1049     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
1050     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1051     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1052     self->simcall.args[0].dp = (void*) process;
1053     if (self != simix_global->maestro_process) {
1054       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1055                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1056       SIMIX_process_yield(self);
1057     } else {
1058       SIMIX_simcall_handle(&self->simcall, 0);
1059     }    
1060     
1061   }
1062   
1063 inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
1064     smx_process_t self = SIMIX_process_self();
1065
1066     /* Go to that function to follow the code flow through the simcall barrier */
1067     if (0) simcall_HANDLER_process_change_host(&self->simcall, process, dest);
1068     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1069
1070     self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
1071     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1072     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1073     self->simcall.args[0].dp = (void*) process;
1074     self->simcall.args[1].dp = (void*) dest;
1075     if (self != simix_global->maestro_process) {
1076       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1077                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1078       SIMIX_process_yield(self);
1079     } else {
1080       SIMIX_simcall_handle(&self->simcall, 0);
1081     }    
1082     
1083   }
1084   
1085 inline static void simcall_BODY_process_suspend(smx_process_t process) {
1086     smx_process_t self = SIMIX_process_self();
1087
1088     /* Go to that function to follow the code flow through the simcall barrier */
1089     if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
1090     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1091
1092     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
1093     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1094     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1095     self->simcall.args[0].dp = (void*) process;
1096     if (self != simix_global->maestro_process) {
1097       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1098                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1099       SIMIX_process_yield(self);
1100     } else {
1101       SIMIX_simcall_handle(&self->simcall, 0);
1102     }    
1103     
1104   }
1105   
1106 inline static void simcall_BODY_process_resume(smx_process_t process) {
1107     smx_process_t self = SIMIX_process_self();
1108
1109     /* Go to that function to follow the code flow through the simcall barrier */
1110     if (0) simcall_HANDLER_process_resume(&self->simcall, process);
1111     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1112
1113     self->simcall.call = SIMCALL_PROCESS_RESUME;
1114     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1115     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1116     self->simcall.args[0].dp = (void*) process;
1117     if (self != simix_global->maestro_process) {
1118       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1119                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1120       SIMIX_process_yield(self);
1121     } else {
1122       SIMIX_simcall_handle(&self->simcall, 0);
1123     }    
1124     
1125   }
1126   
1127 inline static int simcall_BODY_process_count() {
1128     smx_process_t self = SIMIX_process_self();
1129
1130     /* Go to that function to follow the code flow through the simcall barrier */
1131     if (0) SIMIX_process_count();
1132     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1133
1134     self->simcall.call = SIMCALL_PROCESS_COUNT;
1135     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1136     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1137
1138     if (self != simix_global->maestro_process) {
1139       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1140                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1141       SIMIX_process_yield(self);
1142     } else {
1143       SIMIX_simcall_handle(&self->simcall, 0);
1144     }    
1145     return self->simcall.result.i;
1146   }
1147   
1148 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
1149     smx_process_t self = SIMIX_process_self();
1150
1151     /* Go to that function to follow the code flow through the simcall barrier */
1152     if (0) SIMIX_process_get_PID(process);
1153     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1154
1155     self->simcall.call = SIMCALL_PROCESS_GET_PID;
1156     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1157     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1158     self->simcall.args[0].dp = (void*) process;
1159     if (self != simix_global->maestro_process) {
1160       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1161                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1162       SIMIX_process_yield(self);
1163     } else {
1164       SIMIX_simcall_handle(&self->simcall, 0);
1165     }    
1166     return self->simcall.result.i;
1167   }
1168   
1169 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
1170     smx_process_t self = SIMIX_process_self();
1171
1172     /* Go to that function to follow the code flow through the simcall barrier */
1173     if (0) SIMIX_process_get_PPID(process);
1174     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1175
1176     self->simcall.call = SIMCALL_PROCESS_GET_PPID;
1177     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1178     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1179     self->simcall.args[0].dp = (void*) process;
1180     if (self != simix_global->maestro_process) {
1181       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1182                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1183       SIMIX_process_yield(self);
1184     } else {
1185       SIMIX_simcall_handle(&self->simcall, 0);
1186     }    
1187     return self->simcall.result.i;
1188   }
1189   
1190 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
1191     smx_process_t self = SIMIX_process_self();
1192
1193     /* Go to that function to follow the code flow through the simcall barrier */
1194     if (0) SIMIX_process_get_data(process);
1195     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1196
1197     self->simcall.call = SIMCALL_PROCESS_GET_DATA;
1198     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1199     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1200     self->simcall.args[0].dp = (void*) process;
1201     if (self != simix_global->maestro_process) {
1202       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1203                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1204       SIMIX_process_yield(self);
1205     } else {
1206       SIMIX_simcall_handle(&self->simcall, 0);
1207     }    
1208     return self->simcall.result.dp;
1209   }
1210   
1211 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
1212     smx_process_t self = SIMIX_process_self();
1213
1214     /* Go to that function to follow the code flow through the simcall barrier */
1215     if (0) SIMIX_process_set_data(process, data);
1216     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1217
1218     self->simcall.call = SIMCALL_PROCESS_SET_DATA;
1219     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1220     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1221     self->simcall.args[0].dp = (void*) process;
1222     self->simcall.args[1].dp = (void*) data;
1223     if (self != simix_global->maestro_process) {
1224       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1225                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1226       SIMIX_process_yield(self);
1227     } else {
1228       SIMIX_simcall_handle(&self->simcall, 0);
1229     }    
1230     
1231   }
1232   
1233 inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
1234     smx_process_t self = SIMIX_process_self();
1235
1236     /* Go to that function to follow the code flow through the simcall barrier */
1237     if (0) SIMIX_process_get_host(process);
1238     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1239
1240     self->simcall.call = SIMCALL_PROCESS_GET_HOST;
1241     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1242     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1243     self->simcall.args[0].dp = (void*) process;
1244     if (self != simix_global->maestro_process) {
1245       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1246                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1247       SIMIX_process_yield(self);
1248     } else {
1249       SIMIX_simcall_handle(&self->simcall, 0);
1250     }    
1251     return self->simcall.result.dp;
1252   }
1253   
1254 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
1255     smx_process_t self = SIMIX_process_self();
1256
1257     /* Go to that function to follow the code flow through the simcall barrier */
1258     if (0) SIMIX_process_get_name(process);
1259     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1260
1261     self->simcall.call = SIMCALL_PROCESS_GET_NAME;
1262     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1263     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1264     self->simcall.args[0].dp = (void*) process;
1265     if (self != simix_global->maestro_process) {
1266       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1267                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1268       SIMIX_process_yield(self);
1269     } else {
1270       SIMIX_simcall_handle(&self->simcall, 0);
1271     }    
1272     return self->simcall.result.cc;
1273   }
1274   
1275 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
1276     smx_process_t self = SIMIX_process_self();
1277
1278     /* Go to that function to follow the code flow through the simcall barrier */
1279     if (0) SIMIX_process_is_suspended(process);
1280     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1281
1282     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
1283     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1284     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1285     self->simcall.args[0].dp = (void*) process;
1286     if (self != simix_global->maestro_process) {
1287       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1288                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1289       SIMIX_process_yield(self);
1290     } else {
1291       SIMIX_simcall_handle(&self->simcall, 0);
1292     }    
1293     return self->simcall.result.i;
1294   }
1295   
1296 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
1297     smx_process_t self = SIMIX_process_self();
1298
1299     /* Go to that function to follow the code flow through the simcall barrier */
1300     if (0) SIMIX_process_get_properties(process);
1301     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1302
1303     self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
1304     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1305     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1306     self->simcall.args[0].dp = (void*) process;
1307     if (self != simix_global->maestro_process) {
1308       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1309                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1310       SIMIX_process_yield(self);
1311     } else {
1312       SIMIX_simcall_handle(&self->simcall, 0);
1313     }    
1314     return self->simcall.result.dp;
1315   }
1316   
1317 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
1318     smx_process_t self = SIMIX_process_self();
1319
1320     /* Go to that function to follow the code flow through the simcall barrier */
1321     if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
1322     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1323
1324     self->simcall.call = SIMCALL_PROCESS_JOIN;
1325     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1326     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1327     self->simcall.args[0].dp = (void*) process;
1328     self->simcall.args[1].d = (double) timeout;
1329     if (self != simix_global->maestro_process) {
1330       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1331                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1332       SIMIX_process_yield(self);
1333     } else {
1334       SIMIX_simcall_handle(&self->simcall, 0);
1335     }    
1336     return self->simcall.result.i;
1337   }
1338   
1339 inline static int simcall_BODY_process_sleep(double duration) {
1340     smx_process_t self = SIMIX_process_self();
1341
1342     /* Go to that function to follow the code flow through the simcall barrier */
1343     if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
1344     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1345
1346     self->simcall.call = SIMCALL_PROCESS_SLEEP;
1347     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1348     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1349     self->simcall.args[0].d = (double) duration;
1350     if (self != simix_global->maestro_process) {
1351       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1352                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1353       SIMIX_process_yield(self);
1354     } else {
1355       SIMIX_simcall_handle(&self->simcall, 0);
1356     }    
1357     return self->simcall.result.i;
1358   }
1359   
1360 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1361     smx_process_t self = SIMIX_process_self();
1362
1363     /* Go to that function to follow the code flow through the simcall barrier */
1364     if (0) SIMIX_process_on_exit(process, fun, data);
1365     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1366
1367     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1368     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1369     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1370     self->simcall.args[0].dp = (void*) process;
1371     self->simcall.args[1].fp = (FPtr) fun;
1372     self->simcall.args[2].dp = (void*) data;
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     
1381   }
1382   
1383 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
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) SIMIX_process_auto_restart_set(process, auto_restart);
1388     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1389
1390     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
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].dp = (void*) process;
1394     self->simcall.args[1].i = (int) auto_restart;
1395     if (self != simix_global->maestro_process) {
1396       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1397                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1398       SIMIX_process_yield(self);
1399     } else {
1400       SIMIX_simcall_handle(&self->simcall, 0);
1401     }    
1402     
1403   }
1404   
1405 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1406     smx_process_t self = SIMIX_process_self();
1407
1408     /* Go to that function to follow the code flow through the simcall barrier */
1409     if (0) simcall_HANDLER_process_restart(&self->simcall, process);
1410     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1411
1412     self->simcall.call = SIMCALL_PROCESS_RESTART;
1413     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1414     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1415     self->simcall.args[0].dp = (void*) process;
1416     if (self != simix_global->maestro_process) {
1417       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1418                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1419       SIMIX_process_yield(self);
1420     } else {
1421       SIMIX_simcall_handle(&self->simcall, 0);
1422     }    
1423     return self->simcall.result.dp;
1424   }
1425   
1426 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1427     smx_process_t self = SIMIX_process_self();
1428
1429     /* Go to that function to follow the code flow through the simcall barrier */
1430     if (0) SIMIX_rdv_create(name);
1431     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1432
1433     self->simcall.call = SIMCALL_RDV_CREATE;
1434     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1435     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1436     self->simcall.args[0].cc = (const char*) name;
1437     if (self != simix_global->maestro_process) {
1438       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1439                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1440       SIMIX_process_yield(self);
1441     } else {
1442       SIMIX_simcall_handle(&self->simcall, 0);
1443     }    
1444     return self->simcall.result.dp;
1445   }
1446   
1447 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1448     smx_process_t self = SIMIX_process_self();
1449
1450     /* Go to that function to follow the code flow through the simcall barrier */
1451     if (0) SIMIX_rdv_destroy(rdv);
1452     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1453
1454     self->simcall.call = SIMCALL_RDV_DESTROY;
1455     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1456     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1457     self->simcall.args[0].dp = (void*) rdv;
1458     if (self != simix_global->maestro_process) {
1459       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1460                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1461       SIMIX_process_yield(self);
1462     } else {
1463       SIMIX_simcall_handle(&self->simcall, 0);
1464     }    
1465     
1466   }
1467   
1468 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
1469     smx_process_t self = SIMIX_process_self();
1470
1471     /* Go to that function to follow the code flow through the simcall barrier */
1472     if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
1473     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1474
1475     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1476     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1477     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1478     self->simcall.args[0].dp = (void*) rdv;
1479     self->simcall.args[1].dp = (void*) host;
1480     if (self != simix_global->maestro_process) {
1481       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1482                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1483       SIMIX_process_yield(self);
1484     } else {
1485       SIMIX_simcall_handle(&self->simcall, 0);
1486     }    
1487     return self->simcall.result.ui;
1488   }
1489   
1490 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1491     smx_process_t self = SIMIX_process_self();
1492
1493     /* Go to that function to follow the code flow through the simcall barrier */
1494     if (0) SIMIX_rdv_get_head(rdv);
1495     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1496
1497     self->simcall.call = SIMCALL_RDV_GET_HEAD;
1498     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1499     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1500     self->simcall.args[0].dp = (void*) rdv;
1501     if (self != simix_global->maestro_process) {
1502       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1503                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1504       SIMIX_process_yield(self);
1505     } else {
1506       SIMIX_simcall_handle(&self->simcall, 0);
1507     }    
1508     return self->simcall.result.dp;
1509   }
1510   
1511 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1512     smx_process_t self = SIMIX_process_self();
1513
1514     /* Go to that function to follow the code flow through the simcall barrier */
1515     if (0) SIMIX_rdv_set_receiver(rdv, receiver);
1516     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1517
1518     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1519     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1520     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1521     self->simcall.args[0].dp = (void*) rdv;
1522     self->simcall.args[1].dp = (void*) receiver;
1523     if (self != simix_global->maestro_process) {
1524       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1525                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1526       SIMIX_process_yield(self);
1527     } else {
1528       SIMIX_simcall_handle(&self->simcall, 0);
1529     }    
1530     
1531   }
1532   
1533 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1534     smx_process_t self = SIMIX_process_self();
1535
1536     /* Go to that function to follow the code flow through the simcall barrier */
1537     if (0) SIMIX_rdv_get_receiver(rdv);
1538     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1539
1540     self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1541     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1542     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1543     self->simcall.args[0].dp = (void*) rdv;
1544     if (self != simix_global->maestro_process) {
1545       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1546                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1547       SIMIX_process_yield(self);
1548     } else {
1549       SIMIX_simcall_handle(&self->simcall, 0);
1550     }    
1551     return self->simcall.result.dp;
1552   }
1553   
1554 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) {
1555     smx_process_t self = SIMIX_process_self();
1556
1557     /* Go to that function to follow the code flow through the simcall barrier */
1558     if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1559     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1560
1561     self->simcall.call = SIMCALL_COMM_IPROBE;
1562     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1563     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1564     self->simcall.args[0].dp = (void*) rdv;
1565     self->simcall.args[1].i = (int) type;
1566     self->simcall.args[2].i = (int) src;
1567     self->simcall.args[3].i = (int) tag;
1568     self->simcall.args[4].fp = (FPtr) match_fun;
1569     self->simcall.args[5].dp = (void*) data;
1570     if (self != simix_global->maestro_process) {
1571       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1572                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1573       SIMIX_process_yield(self);
1574     } else {
1575       SIMIX_simcall_handle(&self->simcall, 0);
1576     }    
1577     return self->simcall.result.dp;
1578   }
1579   
1580 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) {
1581     smx_process_t self = SIMIX_process_self();
1582
1583     /* Go to that function to follow the code flow through the simcall barrier */
1584     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);
1585     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1586
1587     self->simcall.call = SIMCALL_COMM_SEND;
1588     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1589     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1590     self->simcall.args[0].dp = (void*) src;
1591     self->simcall.args[1].dp = (void*) rdv;
1592     self->simcall.args[2].d = (double) task_size;
1593     self->simcall.args[3].d = (double) rate;
1594     self->simcall.args[4].dp = (void*) src_buff;
1595     self->simcall.args[5].sz = (size_t) src_buff_size;
1596     self->simcall.args[6].fp = (FPtr) match_fun;
1597     self->simcall.args[7].fp = (FPtr) copy_data_fun;
1598     self->simcall.args[8].dp = (void*) data;
1599     self->simcall.args[9].d = (double) timeout;
1600     if (self != simix_global->maestro_process) {
1601       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1602                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1603       SIMIX_process_yield(self);
1604     } else {
1605       SIMIX_simcall_handle(&self->simcall, 0);
1606     }    
1607     
1608   }
1609   
1610 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) {
1611     smx_process_t self = SIMIX_process_self();
1612
1613     /* Go to that function to follow the code flow through the simcall barrier */
1614     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);
1615     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1616
1617     self->simcall.call = SIMCALL_COMM_ISEND;
1618     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1619     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1620     self->simcall.args[0].dp = (void*) src;
1621     self->simcall.args[1].dp = (void*) rdv;
1622     self->simcall.args[2].d = (double) task_size;
1623     self->simcall.args[3].d = (double) rate;
1624     self->simcall.args[4].dp = (void*) src_buff;
1625     self->simcall.args[5].sz = (size_t) src_buff_size;
1626     self->simcall.args[6].fp = (FPtr) match_fun;
1627     self->simcall.args[7].fp = (FPtr) clean_fun;
1628     self->simcall.args[8].fp = (FPtr) copy_data_fun;
1629     self->simcall.args[9].dp = (void*) data;
1630     self->simcall.args[10].i = (int) detached;
1631     if (self != simix_global->maestro_process) {
1632       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1633                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1634       SIMIX_process_yield(self);
1635     } else {
1636       SIMIX_simcall_handle(&self->simcall, 0);
1637     }    
1638     return self->simcall.result.dp;
1639   }
1640   
1641 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) {
1642     smx_process_t self = SIMIX_process_self();
1643
1644     /* Go to that function to follow the code flow through the simcall barrier */
1645     if (0) simcall_HANDLER_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1646     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1647
1648     self->simcall.call = SIMCALL_COMM_RECV;
1649     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1650     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1651     self->simcall.args[0].dp = (void*) rdv;
1652     self->simcall.args[1].dp = (void*) dst_buff;
1653     self->simcall.args[2].dp = (void*) dst_buff_size;
1654     self->simcall.args[3].fp = (FPtr) match_fun;
1655     self->simcall.args[4].fp = (FPtr) copy_data_fun;
1656     self->simcall.args[5].dp = (void*) data;
1657     self->simcall.args[6].d = (double) timeout;
1658     self->simcall.args[7].d = (double) rate;
1659     if (self != simix_global->maestro_process) {
1660       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1661                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1662       SIMIX_process_yield(self);
1663     } else {
1664       SIMIX_simcall_handle(&self->simcall, 0);
1665     }    
1666     
1667   }
1668   
1669 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) {
1670     smx_process_t self = SIMIX_process_self();
1671
1672     /* Go to that function to follow the code flow through the simcall barrier */
1673     if (0) simcall_HANDLER_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1674     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1675
1676     self->simcall.call = SIMCALL_COMM_IRECV;
1677     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1678     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1679     self->simcall.args[0].dp = (void*) rdv;
1680     self->simcall.args[1].dp = (void*) dst_buff;
1681     self->simcall.args[2].dp = (void*) dst_buff_size;
1682     self->simcall.args[3].fp = (FPtr) match_fun;
1683     self->simcall.args[4].fp = (FPtr) copy_data_fun;
1684     self->simcall.args[5].dp = (void*) data;
1685     self->simcall.args[6].d = (double) rate;
1686     if (self != simix_global->maestro_process) {
1687       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1688                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1689       SIMIX_process_yield(self);
1690     } else {
1691       SIMIX_simcall_handle(&self->simcall, 0);
1692     }    
1693     return self->simcall.result.dp;
1694   }
1695   
1696 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
1697     smx_process_t self = SIMIX_process_self();
1698
1699     /* Go to that function to follow the code flow through the simcall barrier */
1700     if (0) SIMIX_comm_cancel(comm);
1701     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1702
1703     self->simcall.call = SIMCALL_COMM_CANCEL;
1704     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1705     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1706     self->simcall.args[0].dp = (void*) comm;
1707     if (self != simix_global->maestro_process) {
1708       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1709                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1710       SIMIX_process_yield(self);
1711     } else {
1712       SIMIX_simcall_handle(&self->simcall, 0);
1713     }    
1714     
1715   }
1716   
1717 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1718     smx_process_t self = SIMIX_process_self();
1719
1720     /* Go to that function to follow the code flow through the simcall barrier */
1721     if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
1722     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1723
1724     self->simcall.call = SIMCALL_COMM_WAITANY;
1725     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1726     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1727     self->simcall.args[0].dp = (void*) comms;
1728     if (self != simix_global->maestro_process) {
1729       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1730                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1731       SIMIX_process_yield(self);
1732     } else {
1733       SIMIX_simcall_handle(&self->simcall, 0);
1734     }    
1735     return self->simcall.result.i;
1736   }
1737   
1738 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
1739     smx_process_t self = SIMIX_process_self();
1740
1741     /* Go to that function to follow the code flow through the simcall barrier */
1742     if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
1743     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1744
1745     self->simcall.call = SIMCALL_COMM_WAIT;
1746     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1747     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1748     self->simcall.args[0].dp = (void*) comm;
1749     self->simcall.args[1].d = (double) timeout;
1750     if (self != simix_global->maestro_process) {
1751       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1752                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1753       SIMIX_process_yield(self);
1754     } else {
1755       SIMIX_simcall_handle(&self->simcall, 0);
1756     }    
1757     
1758   }
1759   
1760 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
1761     smx_process_t self = SIMIX_process_self();
1762
1763     /* Go to that function to follow the code flow through the simcall barrier */
1764     if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
1765     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1766
1767     self->simcall.call = SIMCALL_COMM_TEST;
1768     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1769     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1770     self->simcall.args[0].dp = (void*) comm;
1771     if (self != simix_global->maestro_process) {
1772       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1773                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1774       SIMIX_process_yield(self);
1775     } else {
1776       SIMIX_simcall_handle(&self->simcall, 0);
1777     }    
1778     return self->simcall.result.i;
1779   }
1780   
1781 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1782     smx_process_t self = SIMIX_process_self();
1783
1784     /* Go to that function to follow the code flow through the simcall barrier */
1785     if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
1786     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1787
1788     self->simcall.call = SIMCALL_COMM_TESTANY;
1789     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1790     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1791     self->simcall.args[0].dp = (void*) comms;
1792     if (self != simix_global->maestro_process) {
1793       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1794                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1795       SIMIX_process_yield(self);
1796     } else {
1797       SIMIX_simcall_handle(&self->simcall, 0);
1798     }    
1799     return self->simcall.result.i;
1800   }
1801   
1802 inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
1803     smx_process_t self = SIMIX_process_self();
1804
1805     /* Go to that function to follow the code flow through the simcall barrier */
1806     if (0) SIMIX_comm_get_remains(comm);
1807     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1808
1809     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1810     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1811     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1812     self->simcall.args[0].dp = (void*) comm;
1813     if (self != simix_global->maestro_process) {
1814       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1815                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1816       SIMIX_process_yield(self);
1817     } else {
1818       SIMIX_simcall_handle(&self->simcall, 0);
1819     }    
1820     return self->simcall.result.d;
1821   }
1822   
1823 inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
1824     smx_process_t self = SIMIX_process_self();
1825
1826     /* Go to that function to follow the code flow through the simcall barrier */
1827     if (0) SIMIX_comm_get_state(comm);
1828     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1829
1830     self->simcall.call = SIMCALL_COMM_GET_STATE;
1831     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1832     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1833     self->simcall.args[0].dp = (void*) comm;
1834     if (self != simix_global->maestro_process) {
1835       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1836                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1837       SIMIX_process_yield(self);
1838     } else {
1839       SIMIX_simcall_handle(&self->simcall, 0);
1840     }    
1841     return self->simcall.result.i;
1842   }
1843   
1844 inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
1845     smx_process_t self = SIMIX_process_self();
1846
1847     /* Go to that function to follow the code flow through the simcall barrier */
1848     if (0) SIMIX_comm_get_src_data(comm);
1849     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1850
1851     self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1852     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1853     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1854     self->simcall.args[0].dp = (void*) comm;
1855     if (self != simix_global->maestro_process) {
1856       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1857                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1858       SIMIX_process_yield(self);
1859     } else {
1860       SIMIX_simcall_handle(&self->simcall, 0);
1861     }    
1862     return self->simcall.result.dp;
1863   }
1864   
1865 inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
1866     smx_process_t self = SIMIX_process_self();
1867
1868     /* Go to that function to follow the code flow through the simcall barrier */
1869     if (0) SIMIX_comm_get_dst_data(comm);
1870     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1871
1872     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1873     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1874     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1875     self->simcall.args[0].dp = (void*) comm;
1876     if (self != simix_global->maestro_process) {
1877       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1878                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1879       SIMIX_process_yield(self);
1880     } else {
1881       SIMIX_simcall_handle(&self->simcall, 0);
1882     }    
1883     return self->simcall.result.dp;
1884   }
1885   
1886 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_synchro_t comm) {
1887     smx_process_t self = SIMIX_process_self();
1888
1889     /* Go to that function to follow the code flow through the simcall barrier */
1890     if (0) SIMIX_comm_get_src_proc(comm);
1891     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1892
1893     self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1894     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1895     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1896     self->simcall.args[0].dp = (void*) comm;
1897     if (self != simix_global->maestro_process) {
1898       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1899                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1900       SIMIX_process_yield(self);
1901     } else {
1902       SIMIX_simcall_handle(&self->simcall, 0);
1903     }    
1904     return self->simcall.result.dp;
1905   }
1906   
1907 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_synchro_t comm) {
1908     smx_process_t self = SIMIX_process_self();
1909
1910     /* Go to that function to follow the code flow through the simcall barrier */
1911     if (0) SIMIX_comm_get_dst_proc(comm);
1912     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1913
1914     self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1915     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1916     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1917     self->simcall.args[0].dp = (void*) comm;
1918     if (self != simix_global->maestro_process) {
1919       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1920                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1921       SIMIX_process_yield(self);
1922     } else {
1923       SIMIX_simcall_handle(&self->simcall, 0);
1924     }    
1925     return self->simcall.result.dp;
1926   }
1927   
1928 inline static smx_mutex_t simcall_BODY_mutex_init() {
1929     smx_process_t self = SIMIX_process_self();
1930
1931     /* Go to that function to follow the code flow through the simcall barrier */
1932     if (0) simcall_HANDLER_mutex_init(&self->simcall);
1933     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1934
1935     self->simcall.call = SIMCALL_MUTEX_INIT;
1936     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1937     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1938
1939     if (self != simix_global->maestro_process) {
1940       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1941                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1942       SIMIX_process_yield(self);
1943     } else {
1944       SIMIX_simcall_handle(&self->simcall, 0);
1945     }    
1946     return self->simcall.result.dp;
1947   }
1948   
1949 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1950     smx_process_t self = SIMIX_process_self();
1951
1952     /* Go to that function to follow the code flow through the simcall barrier */
1953     if (0) SIMIX_mutex_destroy(mutex);
1954     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1955
1956     self->simcall.call = SIMCALL_MUTEX_DESTROY;
1957     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1958     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1959     self->simcall.args[0].dp = (void*) mutex;
1960     if (self != simix_global->maestro_process) {
1961       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1962                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1963       SIMIX_process_yield(self);
1964     } else {
1965       SIMIX_simcall_handle(&self->simcall, 0);
1966     }    
1967     
1968   }
1969   
1970 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1971     smx_process_t self = SIMIX_process_self();
1972
1973     /* Go to that function to follow the code flow through the simcall barrier */
1974     if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1975     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1976
1977     self->simcall.call = SIMCALL_MUTEX_LOCK;
1978     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1979     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1980     self->simcall.args[0].dp = (void*) mutex;
1981     if (self != simix_global->maestro_process) {
1982       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1983                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1984       SIMIX_process_yield(self);
1985     } else {
1986       SIMIX_simcall_handle(&self->simcall, 0);
1987     }    
1988     
1989   }
1990   
1991 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1992     smx_process_t self = SIMIX_process_self();
1993
1994     /* Go to that function to follow the code flow through the simcall barrier */
1995     if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
1996     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1997
1998     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1999     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2000     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2001     self->simcall.args[0].dp = (void*) mutex;
2002     if (self != simix_global->maestro_process) {
2003       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2004                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2005       SIMIX_process_yield(self);
2006     } else {
2007       SIMIX_simcall_handle(&self->simcall, 0);
2008     }    
2009     return self->simcall.result.i;
2010   }
2011   
2012 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
2013     smx_process_t self = SIMIX_process_self();
2014
2015     /* Go to that function to follow the code flow through the simcall barrier */
2016     if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
2017     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2018
2019     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
2020     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2021     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2022     self->simcall.args[0].dp = (void*) mutex;
2023     if (self != simix_global->maestro_process) {
2024       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2025                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2026       SIMIX_process_yield(self);
2027     } else {
2028       SIMIX_simcall_handle(&self->simcall, 0);
2029     }    
2030     
2031   }
2032   
2033 inline static smx_cond_t simcall_BODY_cond_init() {
2034     smx_process_t self = SIMIX_process_self();
2035
2036     /* Go to that function to follow the code flow through the simcall barrier */
2037     if (0) SIMIX_cond_init();
2038     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2039
2040     self->simcall.call = SIMCALL_COND_INIT;
2041     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2042     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2043
2044     if (self != simix_global->maestro_process) {
2045       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2046                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2047       SIMIX_process_yield(self);
2048     } else {
2049       SIMIX_simcall_handle(&self->simcall, 0);
2050     }    
2051     return self->simcall.result.dp;
2052   }
2053   
2054 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
2055     smx_process_t self = SIMIX_process_self();
2056
2057     /* Go to that function to follow the code flow through the simcall barrier */
2058     if (0) SIMIX_cond_destroy(cond);
2059     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2060
2061     self->simcall.call = SIMCALL_COND_DESTROY;
2062     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2063     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2064     self->simcall.args[0].dp = (void*) cond;
2065     if (self != simix_global->maestro_process) {
2066       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2067                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2068       SIMIX_process_yield(self);
2069     } else {
2070       SIMIX_simcall_handle(&self->simcall, 0);
2071     }    
2072     
2073   }
2074   
2075 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
2076     smx_process_t self = SIMIX_process_self();
2077
2078     /* Go to that function to follow the code flow through the simcall barrier */
2079     if (0) SIMIX_cond_signal(cond);
2080     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2081
2082     self->simcall.call = SIMCALL_COND_SIGNAL;
2083     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2084     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2085     self->simcall.args[0].dp = (void*) cond;
2086     if (self != simix_global->maestro_process) {
2087       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2088                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2089       SIMIX_process_yield(self);
2090     } else {
2091       SIMIX_simcall_handle(&self->simcall, 0);
2092     }    
2093     
2094   }
2095   
2096 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
2097     smx_process_t self = SIMIX_process_self();
2098
2099     /* Go to that function to follow the code flow through the simcall barrier */
2100     if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
2101     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2102
2103     self->simcall.call = SIMCALL_COND_WAIT;
2104     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2105     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2106     self->simcall.args[0].dp = (void*) cond;
2107     self->simcall.args[1].dp = (void*) mutex;
2108     if (self != simix_global->maestro_process) {
2109       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2110                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2111       SIMIX_process_yield(self);
2112     } else {
2113       SIMIX_simcall_handle(&self->simcall, 0);
2114     }    
2115     
2116   }
2117   
2118 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
2119     smx_process_t self = SIMIX_process_self();
2120
2121     /* Go to that function to follow the code flow through the simcall barrier */
2122     if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
2123     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2124
2125     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
2126     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2127     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2128     self->simcall.args[0].dp = (void*) cond;
2129     self->simcall.args[1].dp = (void*) mutex;
2130     self->simcall.args[2].d = (double) timeout;
2131     if (self != simix_global->maestro_process) {
2132       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2133                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2134       SIMIX_process_yield(self);
2135     } else {
2136       SIMIX_simcall_handle(&self->simcall, 0);
2137     }    
2138     
2139   }
2140   
2141 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
2142     smx_process_t self = SIMIX_process_self();
2143
2144     /* Go to that function to follow the code flow through the simcall barrier */
2145     if (0) SIMIX_cond_broadcast(cond);
2146     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2147
2148     self->simcall.call = SIMCALL_COND_BROADCAST;
2149     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2150     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2151     self->simcall.args[0].dp = (void*) cond;
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 smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
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) SIMIX_sem_init(capacity);
2167     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2168
2169     self->simcall.call = SIMCALL_SEM_INIT;
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].ui = (unsigned int) capacity;
2173     if (self != simix_global->maestro_process) {
2174       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2175                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2176       SIMIX_process_yield(self);
2177     } else {
2178       SIMIX_simcall_handle(&self->simcall, 0);
2179     }    
2180     return self->simcall.result.dp;
2181   }
2182   
2183 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2184     smx_process_t self = SIMIX_process_self();
2185
2186     /* Go to that function to follow the code flow through the simcall barrier */
2187     if (0) SIMIX_sem_destroy(sem);
2188     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2189
2190     self->simcall.call = SIMCALL_SEM_DESTROY;
2191     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2192     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2193     self->simcall.args[0].dp = (void*) sem;
2194     if (self != simix_global->maestro_process) {
2195       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2196                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2197       SIMIX_process_yield(self);
2198     } else {
2199       SIMIX_simcall_handle(&self->simcall, 0);
2200     }    
2201     
2202   }
2203   
2204 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2205     smx_process_t self = SIMIX_process_self();
2206
2207     /* Go to that function to follow the code flow through the simcall barrier */
2208     if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
2209     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2210
2211     self->simcall.call = SIMCALL_SEM_RELEASE;
2212     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2213     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2214     self->simcall.args[0].dp = (void*) sem;
2215     if (self != simix_global->maestro_process) {
2216       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2217                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2218       SIMIX_process_yield(self);
2219     } else {
2220       SIMIX_simcall_handle(&self->simcall, 0);
2221     }    
2222     
2223   }
2224   
2225 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2226     smx_process_t self = SIMIX_process_self();
2227
2228     /* Go to that function to follow the code flow through the simcall barrier */
2229     if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
2230     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2231
2232     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2233     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2234     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2235     self->simcall.args[0].dp = (void*) sem;
2236     if (self != simix_global->maestro_process) {
2237       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2238                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2239       SIMIX_process_yield(self);
2240     } else {
2241       SIMIX_simcall_handle(&self->simcall, 0);
2242     }    
2243     return self->simcall.result.i;
2244   }
2245   
2246 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2247     smx_process_t self = SIMIX_process_self();
2248
2249     /* Go to that function to follow the code flow through the simcall barrier */
2250     if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
2251     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2252
2253     self->simcall.call = SIMCALL_SEM_ACQUIRE;
2254     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2255     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2256     self->simcall.args[0].dp = (void*) sem;
2257     if (self != simix_global->maestro_process) {
2258       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2259                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2260       SIMIX_process_yield(self);
2261     } else {
2262       SIMIX_simcall_handle(&self->simcall, 0);
2263     }    
2264     
2265   }
2266   
2267 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2268     smx_process_t self = SIMIX_process_self();
2269
2270     /* Go to that function to follow the code flow through the simcall barrier */
2271     if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
2272     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2273
2274     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2275     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2276     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2277     self->simcall.args[0].dp = (void*) sem;
2278     self->simcall.args[1].d = (double) timeout;
2279     if (self != simix_global->maestro_process) {
2280       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2281                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2282       SIMIX_process_yield(self);
2283     } else {
2284       SIMIX_simcall_handle(&self->simcall, 0);
2285     }    
2286     
2287   }
2288   
2289 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2290     smx_process_t self = SIMIX_process_self();
2291
2292     /* Go to that function to follow the code flow through the simcall barrier */
2293     if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
2294     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2295
2296     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2297     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2298     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2299     self->simcall.args[0].dp = (void*) sem;
2300     if (self != simix_global->maestro_process) {
2301       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2302                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2303       SIMIX_process_yield(self);
2304     } else {
2305       SIMIX_simcall_handle(&self->simcall, 0);
2306     }    
2307     return self->simcall.result.i;
2308   }
2309   
2310 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
2311     smx_process_t self = SIMIX_process_self();
2312
2313     /* Go to that function to follow the code flow through the simcall barrier */
2314     if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
2315     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2316
2317     self->simcall.call = SIMCALL_FILE_READ;
2318     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2319     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2320     self->simcall.args[0].dp = (void*) fd;
2321     self->simcall.args[1].sgsz = (sg_size_t) size;
2322     self->simcall.args[2].dp = (void*) host;
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     return self->simcall.result.sgsz;
2331   }
2332   
2333 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
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_file_write(&self->simcall, fd, size, host);
2338     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2339
2340     self->simcall.call = SIMCALL_FILE_WRITE;
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*) fd;
2344     self->simcall.args[1].sgsz = (sg_size_t) size;
2345     self->simcall.args[2].dp = (void*) host;
2346     if (self != simix_global->maestro_process) {
2347       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2348                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2349       SIMIX_process_yield(self);
2350     } else {
2351       SIMIX_simcall_handle(&self->simcall, 0);
2352     }    
2353     return self->simcall.result.sgsz;
2354   }
2355   
2356 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
2357     smx_process_t self = SIMIX_process_self();
2358
2359     /* Go to that function to follow the code flow through the simcall barrier */
2360     if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
2361     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2362
2363     self->simcall.call = SIMCALL_FILE_OPEN;
2364     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2365     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2366     self->simcall.args[0].cc = (const char*) fullpath;
2367     self->simcall.args[1].dp = (void*) host;
2368     if (self != simix_global->maestro_process) {
2369       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2370                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2371       SIMIX_process_yield(self);
2372     } else {
2373       SIMIX_simcall_handle(&self->simcall, 0);
2374     }    
2375     return self->simcall.result.dp;
2376   }
2377   
2378 inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
2379     smx_process_t self = SIMIX_process_self();
2380
2381     /* Go to that function to follow the code flow through the simcall barrier */
2382     if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
2383     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2384
2385     self->simcall.call = SIMCALL_FILE_CLOSE;
2386     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2387     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2388     self->simcall.args[0].dp = (void*) fd;
2389     self->simcall.args[1].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.i;
2398   }
2399   
2400 inline static int simcall_BODY_file_unlink(smx_file_t fd, 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) SIMIX_file_unlink(fd, 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_UNLINK;
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].dp = (void*) fd;
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.i;
2420   }
2421   
2422 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
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_get_size(&self->simcall, fd);
2427     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2428
2429     self->simcall.call = SIMCALL_FILE_GET_SIZE;
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     if (self != simix_global->maestro_process) {
2434       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2435                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2436       SIMIX_process_yield(self);
2437     } else {
2438       SIMIX_simcall_handle(&self->simcall, 0);
2439     }    
2440     return self->simcall.result.sgsz;
2441   }
2442   
2443 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2444     smx_process_t self = SIMIX_process_self();
2445
2446     /* Go to that function to follow the code flow through the simcall barrier */
2447     if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
2448     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2449
2450     self->simcall.call = SIMCALL_FILE_TELL;
2451     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2452     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2453     self->simcall.args[0].dp = (void*) fd;
2454     if (self != simix_global->maestro_process) {
2455       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2456                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2457       SIMIX_process_yield(self);
2458     } else {
2459       SIMIX_simcall_handle(&self->simcall, 0);
2460     }    
2461     return self->simcall.result.sgsz;
2462   }
2463   
2464 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2465     smx_process_t self = SIMIX_process_self();
2466
2467     /* Go to that function to follow the code flow through the simcall barrier */
2468     if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
2469     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2470
2471     self->simcall.call = SIMCALL_FILE_SEEK;
2472     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2473     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2474     self->simcall.args[0].dp = (void*) fd;
2475     self->simcall.args[1].sgoff = (sg_offset_t) offset;
2476     self->simcall.args[2].i = (int) origin;
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.i;
2485   }
2486   
2487 inline static xbt_dynar_t simcall_BODY_file_get_info(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_get_info(&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_GET_INFO;
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.dp;
2506   }
2507   
2508 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
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_move(&self->simcall, fd, fullpath);
2513     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2514
2515     self->simcall.call = SIMCALL_FILE_MOVE;
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].cc = (const char*) fullpath;
2520     if (self != simix_global->maestro_process) {
2521       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2522                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2523       SIMIX_process_yield(self);
2524     } else {
2525       SIMIX_simcall_handle(&self->simcall, 0);
2526     }    
2527     return self->simcall.result.i;
2528   }
2529   
2530 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2531     smx_process_t self = SIMIX_process_self();
2532
2533     /* Go to that function to follow the code flow through the simcall barrier */
2534     if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
2535     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2536
2537     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2538     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2539     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2540     self->simcall.args[0].dp = (void*) storage;
2541     if (self != simix_global->maestro_process) {
2542       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2543                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2544       SIMIX_process_yield(self);
2545     } else {
2546       SIMIX_simcall_handle(&self->simcall, 0);
2547     }    
2548     return self->simcall.result.sgsz;
2549   }
2550   
2551 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2552     smx_process_t self = SIMIX_process_self();
2553
2554     /* Go to that function to follow the code flow through the simcall barrier */
2555     if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
2556     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2557
2558     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2559     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2560     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2561     self->simcall.args[0].dp = (void*) name;
2562     if (self != simix_global->maestro_process) {
2563       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2564                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2565       SIMIX_process_yield(self);
2566     } else {
2567       SIMIX_simcall_handle(&self->simcall, 0);
2568     }    
2569     return self->simcall.result.sgsz;
2570   }
2571   
2572 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2573     smx_process_t self = SIMIX_process_self();
2574
2575     /* Go to that function to follow the code flow through the simcall barrier */
2576     if (0) SIMIX_storage_get_properties(storage);
2577     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2578
2579     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2580     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2581     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2582     self->simcall.args[0].dp = (void*) storage;
2583     if (self != simix_global->maestro_process) {
2584       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2585                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2586       SIMIX_process_yield(self);
2587     } else {
2588       SIMIX_simcall_handle(&self->simcall, 0);
2589     }    
2590     return self->simcall.result.dp;
2591   }
2592   
2593 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2594     smx_process_t self = SIMIX_process_self();
2595
2596     /* Go to that function to follow the code flow through the simcall barrier */
2597     if (0) SIMIX_storage_get_content(storage);
2598     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2599
2600     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2601     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2602     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2603     self->simcall.args[0].dp = (void*) storage;
2604     if (self != simix_global->maestro_process) {
2605       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2606                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2607       SIMIX_process_yield(self);
2608     } else {
2609       SIMIX_simcall_handle(&self->simcall, 0);
2610     }    
2611     return self->simcall.result.dp;
2612   }
2613   
2614 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2615     smx_process_t self = SIMIX_process_self();
2616
2617     /* Go to that function to follow the code flow through the simcall barrier */
2618     if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
2619     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2620
2621     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2622     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2623     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2624     self->simcall.args[0].cc = (const char*) name;
2625     if (self != simix_global->maestro_process) {
2626       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2627                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2628       SIMIX_process_yield(self);
2629     } else {
2630       SIMIX_simcall_handle(&self->simcall, 0);
2631     }    
2632     return self->simcall.result.dp;
2633   }
2634   
2635 inline static int simcall_BODY_mc_random(int min, int max) {
2636     smx_process_t self = SIMIX_process_self();
2637
2638     /* Go to that function to follow the code flow through the simcall barrier */
2639     if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
2640     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2641
2642     self->simcall.call = SIMCALL_MC_RANDOM;
2643     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2644     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2645     self->simcall.args[0].i = (int) min;
2646     self->simcall.args[1].i = (int) max;
2647     if (self != simix_global->maestro_process) {
2648       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2649                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2650       SIMIX_process_yield(self);
2651     } else {
2652       SIMIX_simcall_handle(&self->simcall, 0);
2653     }    
2654     return self->simcall.result.i;
2655   }
2656   
2657 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
2658     smx_process_t self = SIMIX_process_self();
2659
2660     /* Go to that function to follow the code flow through the simcall barrier */
2661     if (0) SIMIX_set_category(synchro, category);
2662     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2663
2664     self->simcall.call = SIMCALL_SET_CATEGORY;
2665     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2666     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2667     self->simcall.args[0].dp = (void*) synchro;
2668     self->simcall.args[1].cc = (const char*) category;
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     
2677   }
2678 #ifdef HAVE_LATENCY_BOUND_TRACKING
2679   
2680 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
2681     smx_process_t self = SIMIX_process_self();
2682
2683     /* Go to that function to follow the code flow through the simcall barrier */
2684     if (0) SIMIX_comm_is_latency_bounded(comm);
2685     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2686
2687     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2688     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2689     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2690     self->simcall.args[0].dp = (void*) comm;
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 #endif
2701
2702 #ifdef HAVE_MC
2703   
2704 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
2705     smx_process_t self = SIMIX_process_self();
2706
2707     /* Go to that function to follow the code flow through the simcall barrier */
2708     if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
2709     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2710
2711     self->simcall.call = SIMCALL_MC_SNAPSHOT;
2712     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2713     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2714
2715     if (self != simix_global->maestro_process) {
2716       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2717                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2718       SIMIX_process_yield(self);
2719     } else {
2720       SIMIX_simcall_handle(&self->simcall, 0);
2721     }    
2722     return self->simcall.result.dp;
2723   }
2724   
2725 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
2726     smx_process_t self = SIMIX_process_self();
2727
2728     /* Go to that function to follow the code flow through the simcall barrier */
2729     if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
2730     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2731
2732     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2733     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2734     memset(self->simcall.args, 0, sizeof(self->simcall.args));
2735     self->simcall.args[0].dp = (void*) s1;
2736     self->simcall.args[1].dp = (void*) s2;
2737     if (self != simix_global->maestro_process) {
2738       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2739                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2740       SIMIX_process_yield(self);
2741     } else {
2742       SIMIX_simcall_handle(&self->simcall, 0);
2743     }    
2744     return self->simcall.result.i;
2745   }
2746 #endif