Logo AND Algorithmique Numérique Distribuée

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