Logo AND Algorithmique Numérique Distribuée

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