Logo AND Algorithmique Numérique Distribuée

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