Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
f103ad6e2a1483cb7a5f90faed4427d68000cc17
[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     self->simcall.call = SIMCALL_HOST_GET_BY_NAME;
11     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
12     memset(self->simcall.args, 0, sizeof(self->simcall.args));
13     self->simcall.args[0].cc = (const char*) name;
14     if (self != simix_global->maestro_process) {
15       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
16                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
17       SIMIX_process_yield(self);
18     } else {
19       SIMIX_simcall_pre(&self->simcall, 0);
20     }    
21     return self->simcall.result.dp;
22   }
23   inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
24     smx_process_t self = SIMIX_process_self();
25     self->simcall.call = SIMCALL_HOST_GET_NAME;
26     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
27     memset(self->simcall.args, 0, sizeof(self->simcall.args));
28     self->simcall.args[0].dp = (void*) host;
29     if (self != simix_global->maestro_process) {
30       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
31                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
32       SIMIX_process_yield(self);
33     } else {
34       SIMIX_simcall_pre(&self->simcall, 0);
35     }    
36     return self->simcall.result.cc;
37   }
38   inline static void simcall_BODY_host_on(smx_host_t host) {
39     smx_process_t self = SIMIX_process_self();
40     self->simcall.call = SIMCALL_HOST_ON;
41     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
42     memset(self->simcall.args, 0, sizeof(self->simcall.args));
43     self->simcall.args[0].dp = (void*) host;
44     if (self != simix_global->maestro_process) {
45       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
46                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
47       SIMIX_process_yield(self);
48     } else {
49       SIMIX_simcall_pre(&self->simcall, 0);
50     }    
51     
52   }
53   inline static void simcall_BODY_host_off(smx_host_t host) {
54     smx_process_t self = SIMIX_process_self();
55     self->simcall.call = SIMCALL_HOST_OFF;
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 xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
69     smx_process_t self = SIMIX_process_self();
70     self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
71     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
72     memset(self->simcall.args, 0, sizeof(self->simcall.args));
73     self->simcall.args[0].dp = (void*) host;
74     if (self != simix_global->maestro_process) {
75       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
76                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
77       SIMIX_process_yield(self);
78     } else {
79       SIMIX_simcall_pre(&self->simcall, 0);
80     }    
81     return self->simcall.result.dp;
82   }
83   inline static int simcall_BODY_host_get_core(smx_host_t host) {
84     smx_process_t self = SIMIX_process_self();
85     self->simcall.call = SIMCALL_HOST_GET_CORE;
86     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
87     memset(self->simcall.args, 0, sizeof(self->simcall.args));
88     self->simcall.args[0].dp = (void*) host;
89     if (self != simix_global->maestro_process) {
90       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
91                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
92       SIMIX_process_yield(self);
93     } else {
94       SIMIX_simcall_pre(&self->simcall, 0);
95     }    
96     return self->simcall.result.i;
97   }
98   inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
99     smx_process_t self = SIMIX_process_self();
100     self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
101     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
102     memset(self->simcall.args, 0, sizeof(self->simcall.args));
103     self->simcall.args[0].dp = (void*) host;
104     if (self != simix_global->maestro_process) {
105       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
106                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
107       SIMIX_process_yield(self);
108     } else {
109       SIMIX_simcall_pre(&self->simcall, 0);
110     }    
111     return self->simcall.result.dp;
112   }
113   inline static double simcall_BODY_host_get_speed(smx_host_t host) {
114     smx_process_t self = SIMIX_process_self();
115     self->simcall.call = SIMCALL_HOST_GET_SPEED;
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.d;
127   }
128   inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
129     smx_process_t self = SIMIX_process_self();
130     self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
131     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
132     memset(self->simcall.args, 0, sizeof(self->simcall.args));
133     self->simcall.args[0].dp = (void*) host;
134     if (self != simix_global->maestro_process) {
135       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
136                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
137       SIMIX_process_yield(self);
138     } else {
139       SIMIX_simcall_pre(&self->simcall, 0);
140     }    
141     return self->simcall.result.d;
142   }
143   inline static int simcall_BODY_host_get_state(smx_host_t host) {
144     smx_process_t self = SIMIX_process_self();
145     self->simcall.call = SIMCALL_HOST_GET_STATE;
146     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
147     memset(self->simcall.args, 0, sizeof(self->simcall.args));
148     self->simcall.args[0].dp = (void*) host;
149     if (self != simix_global->maestro_process) {
150       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
151                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
152       SIMIX_process_yield(self);
153     } else {
154       SIMIX_simcall_pre(&self->simcall, 0);
155     }    
156     return self->simcall.result.i;
157   }
158   inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
159     smx_process_t self = SIMIX_process_self();
160     self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
161     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
162     memset(self->simcall.args, 0, sizeof(self->simcall.args));
163     self->simcall.args[0].dp = (void*) host;
164     if (self != simix_global->maestro_process) {
165       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
166                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
167       SIMIX_process_yield(self);
168     } else {
169       SIMIX_simcall_pre(&self->simcall, 0);
170     }    
171     return self->simcall.result.d;
172   }
173   inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
174     smx_process_t self = SIMIX_process_self();
175     self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
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     self->simcall.args[1].i = (int) pstate_index;
180     if (self != simix_global->maestro_process) {
181       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
182                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
183       SIMIX_process_yield(self);
184     } else {
185       SIMIX_simcall_pre(&self->simcall, 0);
186     }    
187     return self->simcall.result.d;
188   }
189   inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
190     smx_process_t self = SIMIX_process_self();
191     self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
192     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
193     memset(self->simcall.args, 0, sizeof(self->simcall.args));
194     self->simcall.args[0].dp = (void*) host;
195     if (self != simix_global->maestro_process) {
196       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
197                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
198       SIMIX_process_yield(self);
199     } else {
200       SIMIX_simcall_pre(&self->simcall, 0);
201     }    
202     return self->simcall.result.i;
203   }
204   inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
205     smx_process_t self = SIMIX_process_self();
206     self->simcall.call = SIMCALL_HOST_SET_POWER_PEAK_AT;
207     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
208     memset(self->simcall.args, 0, sizeof(self->simcall.args));
209     self->simcall.args[0].dp = (void*) host;
210     self->simcall.args[1].i = (int) pstate_index;
211     if (self != simix_global->maestro_process) {
212       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
213                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
214       SIMIX_process_yield(self);
215     } else {
216       SIMIX_simcall_pre(&self->simcall, 0);
217     }    
218     
219   }
220   inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
221     smx_process_t self = SIMIX_process_self();
222     self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
223     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
224     memset(self->simcall.args, 0, sizeof(self->simcall.args));
225     self->simcall.args[0].dp = (void*) host;
226     if (self != simix_global->maestro_process) {
227       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
228                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
229       SIMIX_process_yield(self);
230     } else {
231       SIMIX_simcall_pre(&self->simcall, 0);
232     }    
233     return self->simcall.result.d;
234   }
235   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) {
236     smx_process_t self = SIMIX_process_self();
237     self->simcall.call = SIMCALL_HOST_EXECUTE;
238     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
239     memset(self->simcall.args, 0, sizeof(self->simcall.args));
240     self->simcall.args[0].cc = (const char*) name;
241     self->simcall.args[1].dp = (void*) host;
242     self->simcall.args[2].d = (double) computation_amount;
243     self->simcall.args[3].d = (double) priority;
244     self->simcall.args[4].d = (double) bound;
245     self->simcall.args[5].ul = (unsigned long) affinity_mask;
246     if (self != simix_global->maestro_process) {
247       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
248                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
249       SIMIX_process_yield(self);
250     } else {
251       SIMIX_simcall_pre(&self->simcall, 0);
252     }    
253     return self->simcall.result.dp;
254   }
255   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) {
256     smx_process_t self = SIMIX_process_self();
257     self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
258     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
259     memset(self->simcall.args, 0, sizeof(self->simcall.args));
260     self->simcall.args[0].cc = (const char*) name;
261     self->simcall.args[1].i = (int) host_nb;
262     self->simcall.args[2].dp = (void*) host_list;
263     self->simcall.args[3].dp = (void*) computation_amount;
264     self->simcall.args[4].dp = (void*) communication_amount;
265     self->simcall.args[5].d = (double) amount;
266     self->simcall.args[6].d = (double) rate;
267     if (self != simix_global->maestro_process) {
268       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
269                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
270       SIMIX_process_yield(self);
271     } else {
272       SIMIX_simcall_pre(&self->simcall, 0);
273     }    
274     return self->simcall.result.dp;
275   }
276   inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) {
277     smx_process_t self = SIMIX_process_self();
278     self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY;
279     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
280     memset(self->simcall.args, 0, sizeof(self->simcall.args));
281     self->simcall.args[0].dp = (void*) execution;
282     if (self != simix_global->maestro_process) {
283       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
284                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
285       SIMIX_process_yield(self);
286     } else {
287       SIMIX_simcall_pre(&self->simcall, 0);
288     }    
289     
290   }
291   inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) {
292     smx_process_t self = SIMIX_process_self();
293     self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL;
294     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
295     memset(self->simcall.args, 0, sizeof(self->simcall.args));
296     self->simcall.args[0].dp = (void*) execution;
297     if (self != simix_global->maestro_process) {
298       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
299                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
300       SIMIX_process_yield(self);
301     } else {
302       SIMIX_simcall_pre(&self->simcall, 0);
303     }    
304     
305   }
306   inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) {
307     smx_process_t self = SIMIX_process_self();
308     self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
309     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
310     memset(self->simcall.args, 0, sizeof(self->simcall.args));
311     self->simcall.args[0].dp = (void*) execution;
312     if (self != simix_global->maestro_process) {
313       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
314                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
315       SIMIX_process_yield(self);
316     } else {
317       SIMIX_simcall_pre(&self->simcall, 0);
318     }    
319     return self->simcall.result.d;
320   }
321   inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
322     smx_process_t self = SIMIX_process_self();
323     self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE;
324     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
325     memset(self->simcall.args, 0, sizeof(self->simcall.args));
326     self->simcall.args[0].dp = (void*) execution;
327     if (self != simix_global->maestro_process) {
328       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
329                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
330       SIMIX_process_yield(self);
331     } else {
332       SIMIX_simcall_pre(&self->simcall, 0);
333     }    
334     return self->simcall.result.i;
335   }
336   inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) {
337     smx_process_t self = SIMIX_process_self();
338     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
339     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
340     memset(self->simcall.args, 0, sizeof(self->simcall.args));
341     self->simcall.args[0].dp = (void*) execution;
342     self->simcall.args[1].d = (double) priority;
343     if (self != simix_global->maestro_process) {
344       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
345                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
346       SIMIX_process_yield(self);
347     } else {
348       SIMIX_simcall_pre(&self->simcall, 0);
349     }    
350     
351   }
352   inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) {
353     smx_process_t self = SIMIX_process_self();
354     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND;
355     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
356     memset(self->simcall.args, 0, sizeof(self->simcall.args));
357     self->simcall.args[0].dp = (void*) execution;
358     self->simcall.args[1].d = (double) bound;
359     if (self != simix_global->maestro_process) {
360       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
361                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
362       SIMIX_process_yield(self);
363     } else {
364       SIMIX_simcall_pre(&self->simcall, 0);
365     }    
366     
367   }
368   inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) {
369     smx_process_t self = SIMIX_process_self();
370     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY;
371     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
372     memset(self->simcall.args, 0, sizeof(self->simcall.args));
373     self->simcall.args[0].dp = (void*) execution;
374     self->simcall.args[1].dp = (void*) ws;
375     self->simcall.args[2].ul = (unsigned long) mask;
376     if (self != simix_global->maestro_process) {
377       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
378                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
379       SIMIX_process_yield(self);
380     } else {
381       SIMIX_simcall_pre(&self->simcall, 0);
382     }    
383     
384   }
385   inline static int simcall_BODY_host_execution_wait(smx_action_t execution) {
386     smx_process_t self = SIMIX_process_self();
387     self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT;
388     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
389     memset(self->simcall.args, 0, sizeof(self->simcall.args));
390     self->simcall.args[0].dp = (void*) execution;
391     if (self != simix_global->maestro_process) {
392       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
393                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
394       SIMIX_process_yield(self);
395     } else {
396       SIMIX_simcall_pre(&self->simcall, 0);
397     }    
398     return self->simcall.result.i;
399   }
400   inline static xbt_dict_t simcall_BODY_host_get_storage_list(smx_host_t host) {
401     smx_process_t self = SIMIX_process_self();
402     self->simcall.call = SIMCALL_HOST_GET_STORAGE_LIST;
403     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
404     memset(self->simcall.args, 0, sizeof(self->simcall.args));
405     self->simcall.args[0].dp = (void*) host;
406     if (self != simix_global->maestro_process) {
407       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
408                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
409       SIMIX_process_yield(self);
410     } else {
411       SIMIX_simcall_pre(&self->simcall, 0);
412     }    
413     return self->simcall.result.dp;
414   }
415   inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
416     smx_process_t self = SIMIX_process_self();
417     self->simcall.call = SIMCALL_HOST_GET_PARAMS;
418     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
419     memset(self->simcall.args, 0, sizeof(self->simcall.args));
420     self->simcall.args[0].dp = (void*) ind_vm;
421     self->simcall.args[1].dp = (void*) params;
422     if (self != simix_global->maestro_process) {
423       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
424                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
425       SIMIX_process_yield(self);
426     } else {
427       SIMIX_simcall_pre(&self->simcall, 0);
428     }    
429     
430   }
431   inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
432     smx_process_t self = SIMIX_process_self();
433     self->simcall.call = SIMCALL_HOST_SET_PARAMS;
434     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
435     memset(self->simcall.args, 0, sizeof(self->simcall.args));
436     self->simcall.args[0].dp = (void*) ind_vm;
437     self->simcall.args[1].dp = (void*) params;
438     if (self != simix_global->maestro_process) {
439       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
440                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
441       SIMIX_process_yield(self);
442     } else {
443       SIMIX_simcall_pre(&self->simcall, 0);
444     }    
445     
446   }
447   inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
448     smx_process_t self = SIMIX_process_self();
449     self->simcall.call = SIMCALL_VM_CREATE;
450     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
451     memset(self->simcall.args, 0, sizeof(self->simcall.args));
452     self->simcall.args[0].cc = (const char*) name;
453     self->simcall.args[1].dp = (void*) ind_pm;
454     if (self != simix_global->maestro_process) {
455       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
456                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
457       SIMIX_process_yield(self);
458     } else {
459       SIMIX_simcall_pre(&self->simcall, 0);
460     }    
461     return self->simcall.result.dp;
462   }
463   inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
464     smx_process_t self = SIMIX_process_self();
465     self->simcall.call = SIMCALL_VM_START;
466     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
467     memset(self->simcall.args, 0, sizeof(self->simcall.args));
468     self->simcall.args[0].dp = (void*) ind_vm;
469     if (self != simix_global->maestro_process) {
470       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
471                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
472       SIMIX_process_yield(self);
473     } else {
474       SIMIX_simcall_pre(&self->simcall, 0);
475     }    
476     
477   }
478   inline static void simcall_BODY_vm_set_state(smx_host_t ind_vm, int state) {
479     smx_process_t self = SIMIX_process_self();
480     self->simcall.call = SIMCALL_VM_SET_STATE;
481     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
482     memset(self->simcall.args, 0, sizeof(self->simcall.args));
483     self->simcall.args[0].dp = (void*) ind_vm;
484     self->simcall.args[1].i = (int) state;
485     if (self != simix_global->maestro_process) {
486       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
487                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
488       SIMIX_process_yield(self);
489     } else {
490       SIMIX_simcall_pre(&self->simcall, 0);
491     }    
492     
493   }
494   inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
495     smx_process_t self = SIMIX_process_self();
496     self->simcall.call = SIMCALL_VM_GET_STATE;
497     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
498     memset(self->simcall.args, 0, sizeof(self->simcall.args));
499     self->simcall.args[0].dp = (void*) ind_vm;
500     if (self != simix_global->maestro_process) {
501       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
502                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
503       SIMIX_process_yield(self);
504     } else {
505       SIMIX_simcall_pre(&self->simcall, 0);
506     }    
507     return self->simcall.result.i;
508   }
509   inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
510     smx_process_t self = SIMIX_process_self();
511     self->simcall.call = SIMCALL_VM_MIGRATE;
512     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
513     memset(self->simcall.args, 0, sizeof(self->simcall.args));
514     self->simcall.args[0].dp = (void*) ind_vm;
515     self->simcall.args[1].dp = (void*) ind_dst_pm;
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     
524   }
525   inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
526     smx_process_t self = SIMIX_process_self();
527     self->simcall.call = SIMCALL_VM_GET_PM;
528     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
529     memset(self->simcall.args, 0, sizeof(self->simcall.args));
530     self->simcall.args[0].dp = (void*) ind_vm;
531     if (self != simix_global->maestro_process) {
532       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
533                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
534       SIMIX_process_yield(self);
535     } else {
536       SIMIX_simcall_pre(&self->simcall, 0);
537     }    
538     return self->simcall.result.dp;
539   }
540   inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
541     smx_process_t self = SIMIX_process_self();
542     self->simcall.call = SIMCALL_VM_SET_BOUND;
543     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
544     memset(self->simcall.args, 0, sizeof(self->simcall.args));
545     self->simcall.args[0].dp = (void*) ind_vm;
546     self->simcall.args[1].d = (double) bound;
547     if (self != simix_global->maestro_process) {
548       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
549                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
550       SIMIX_process_yield(self);
551     } else {
552       SIMIX_simcall_pre(&self->simcall, 0);
553     }    
554     
555   }
556   inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
557     smx_process_t self = SIMIX_process_self();
558     self->simcall.call = SIMCALL_VM_SET_AFFINITY;
559     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
560     memset(self->simcall.args, 0, sizeof(self->simcall.args));
561     self->simcall.args[0].dp = (void*) ind_vm;
562     self->simcall.args[1].dp = (void*) ind_pm;
563     self->simcall.args[2].ul = (unsigned long) mask;
564     if (self != simix_global->maestro_process) {
565       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
566                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
567       SIMIX_process_yield(self);
568     } else {
569       SIMIX_simcall_pre(&self->simcall, 0);
570     }    
571     
572   }
573   inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
574     smx_process_t self = SIMIX_process_self();
575     self->simcall.call = SIMCALL_VM_DESTROY;
576     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
577     memset(self->simcall.args, 0, sizeof(self->simcall.args));
578     self->simcall.args[0].dp = (void*) ind_vm;
579     if (self != simix_global->maestro_process) {
580       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
581                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
582       SIMIX_process_yield(self);
583     } else {
584       SIMIX_simcall_pre(&self->simcall, 0);
585     }    
586     
587   }
588   inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
589     smx_process_t self = SIMIX_process_self();
590     self->simcall.call = SIMCALL_VM_SUSPEND;
591     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
592     memset(self->simcall.args, 0, sizeof(self->simcall.args));
593     self->simcall.args[0].dp = (void*) ind_vm;
594     if (self != simix_global->maestro_process) {
595       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
596                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
597       SIMIX_process_yield(self);
598     } else {
599       SIMIX_simcall_pre(&self->simcall, 0);
600     }    
601     
602   }
603   inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
604     smx_process_t self = SIMIX_process_self();
605     self->simcall.call = SIMCALL_VM_RESUME;
606     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
607     memset(self->simcall.args, 0, sizeof(self->simcall.args));
608     self->simcall.args[0].dp = (void*) ind_vm;
609     if (self != simix_global->maestro_process) {
610       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
611                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
612       SIMIX_process_yield(self);
613     } else {
614       SIMIX_simcall_pre(&self->simcall, 0);
615     }    
616     
617   }
618   inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
619     smx_process_t self = SIMIX_process_self();
620     self->simcall.call = SIMCALL_VM_SHUTDOWN;
621     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
622     memset(self->simcall.args, 0, sizeof(self->simcall.args));
623     self->simcall.args[0].dp = (void*) ind_vm;
624     if (self != simix_global->maestro_process) {
625       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
626                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
627       SIMIX_process_yield(self);
628     } else {
629       SIMIX_simcall_pre(&self->simcall, 0);
630     }    
631     
632   }
633   inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
634     smx_process_t self = SIMIX_process_self();
635     self->simcall.call = SIMCALL_VM_SAVE;
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 void simcall_BODY_vm_restore(smx_host_t ind_vm) {
649     smx_process_t self = SIMIX_process_self();
650     self->simcall.call = SIMCALL_VM_RESTORE;
651     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
652     memset(self->simcall.args, 0, sizeof(self->simcall.args));
653     self->simcall.args[0].dp = (void*) ind_vm;
654     if (self != simix_global->maestro_process) {
655       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
656                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
657       SIMIX_process_yield(self);
658     } else {
659       SIMIX_simcall_pre(&self->simcall, 0);
660     }    
661     
662   }
663   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) {
664     smx_process_t self = SIMIX_process_self();
665     self->simcall.call = SIMCALL_PROCESS_CREATE;
666     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
667     memset(self->simcall.args, 0, sizeof(self->simcall.args));
668     self->simcall.args[0].dp = (void*) process;
669     self->simcall.args[1].cc = (const char*) name;
670     self->simcall.args[2].fp = (FPtr) code;
671     self->simcall.args[3].dp = (void*) data;
672     self->simcall.args[4].cc = (const char*) hostname;
673     self->simcall.args[5].d = (double) kill_time;
674     self->simcall.args[6].i = (int) argc;
675     self->simcall.args[7].dp = (void*) argv;
676     self->simcall.args[8].dp = (void*) properties;
677     self->simcall.args[9].i = (int) auto_restart;
678     if (self != simix_global->maestro_process) {
679       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
680                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
681       SIMIX_process_yield(self);
682     } else {
683       SIMIX_simcall_pre(&self->simcall, 0);
684     }    
685     
686   }
687   inline static void simcall_BODY_process_kill(smx_process_t process) {
688     smx_process_t self = SIMIX_process_self();
689     self->simcall.call = SIMCALL_PROCESS_KILL;
690     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
691     memset(self->simcall.args, 0, sizeof(self->simcall.args));
692     self->simcall.args[0].dp = (void*) process;
693     if (self != simix_global->maestro_process) {
694       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
695                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
696       SIMIX_process_yield(self);
697     } else {
698       SIMIX_simcall_pre(&self->simcall, 0);
699     }    
700     
701   }
702   inline static void simcall_BODY_process_killall(int reset_pid) {
703     smx_process_t self = SIMIX_process_self();
704     self->simcall.call = SIMCALL_PROCESS_KILLALL;
705     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
706     memset(self->simcall.args, 0, sizeof(self->simcall.args));
707     self->simcall.args[0].i = (int) reset_pid;
708     if (self != simix_global->maestro_process) {
709       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
710                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
711       SIMIX_process_yield(self);
712     } else {
713       SIMIX_simcall_pre(&self->simcall, 0);
714     }    
715     
716   }
717   inline static void simcall_BODY_process_cleanup(smx_process_t process) {
718     smx_process_t self = SIMIX_process_self();
719     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
720     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
721     memset(self->simcall.args, 0, sizeof(self->simcall.args));
722     self->simcall.args[0].dp = (void*) process;
723     if (self != simix_global->maestro_process) {
724       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
725                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
726       SIMIX_process_yield(self);
727     } else {
728       SIMIX_simcall_pre(&self->simcall, 0);
729     }    
730     
731   }
732   inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
733     smx_process_t self = SIMIX_process_self();
734     self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
735     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
736     memset(self->simcall.args, 0, sizeof(self->simcall.args));
737     self->simcall.args[0].dp = (void*) process;
738     self->simcall.args[1].dp = (void*) dest;
739     if (self != simix_global->maestro_process) {
740       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
741                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
742       SIMIX_process_yield(self);
743     } else {
744       SIMIX_simcall_pre(&self->simcall, 0);
745     }    
746     
747   }
748   inline static void simcall_BODY_process_suspend(smx_process_t process) {
749     smx_process_t self = SIMIX_process_self();
750     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
751     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
752     memset(self->simcall.args, 0, sizeof(self->simcall.args));
753     self->simcall.args[0].dp = (void*) process;
754     if (self != simix_global->maestro_process) {
755       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
756                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
757       SIMIX_process_yield(self);
758     } else {
759       SIMIX_simcall_pre(&self->simcall, 0);
760     }    
761     
762   }
763   inline static void simcall_BODY_process_resume(smx_process_t process) {
764     smx_process_t self = SIMIX_process_self();
765     self->simcall.call = SIMCALL_PROCESS_RESUME;
766     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
767     memset(self->simcall.args, 0, sizeof(self->simcall.args));
768     self->simcall.args[0].dp = (void*) process;
769     if (self != simix_global->maestro_process) {
770       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
771                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
772       SIMIX_process_yield(self);
773     } else {
774       SIMIX_simcall_pre(&self->simcall, 0);
775     }    
776     
777   }
778   inline static int simcall_BODY_process_count() {
779     smx_process_t self = SIMIX_process_self();
780     self->simcall.call = SIMCALL_PROCESS_COUNT;
781     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
782     memset(self->simcall.args, 0, sizeof(self->simcall.args));
783
784     if (self != simix_global->maestro_process) {
785       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
786                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
787       SIMIX_process_yield(self);
788     } else {
789       SIMIX_simcall_pre(&self->simcall, 0);
790     }    
791     return self->simcall.result.i;
792   }
793   inline static int simcall_BODY_process_get_PID(smx_process_t process) {
794     smx_process_t self = SIMIX_process_self();
795     self->simcall.call = SIMCALL_PROCESS_GET_PID;
796     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
797     memset(self->simcall.args, 0, sizeof(self->simcall.args));
798     self->simcall.args[0].dp = (void*) process;
799     if (self != simix_global->maestro_process) {
800       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
801                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
802       SIMIX_process_yield(self);
803     } else {
804       SIMIX_simcall_pre(&self->simcall, 0);
805     }    
806     return self->simcall.result.i;
807   }
808   inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
809     smx_process_t self = SIMIX_process_self();
810     self->simcall.call = SIMCALL_PROCESS_GET_PPID;
811     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
812     memset(self->simcall.args, 0, sizeof(self->simcall.args));
813     self->simcall.args[0].dp = (void*) process;
814     if (self != simix_global->maestro_process) {
815       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
816                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
817       SIMIX_process_yield(self);
818     } else {
819       SIMIX_simcall_pre(&self->simcall, 0);
820     }    
821     return self->simcall.result.i;
822   }
823   inline static void* simcall_BODY_process_get_data(smx_process_t process) {
824     smx_process_t self = SIMIX_process_self();
825     self->simcall.call = SIMCALL_PROCESS_GET_DATA;
826     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
827     memset(self->simcall.args, 0, sizeof(self->simcall.args));
828     self->simcall.args[0].dp = (void*) process;
829     if (self != simix_global->maestro_process) {
830       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
831                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
832       SIMIX_process_yield(self);
833     } else {
834       SIMIX_simcall_pre(&self->simcall, 0);
835     }    
836     return self->simcall.result.dp;
837   }
838   inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
839     smx_process_t self = SIMIX_process_self();
840     self->simcall.call = SIMCALL_PROCESS_SET_DATA;
841     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
842     memset(self->simcall.args, 0, sizeof(self->simcall.args));
843     self->simcall.args[0].dp = (void*) process;
844     self->simcall.args[1].dp = (void*) data;
845     if (self != simix_global->maestro_process) {
846       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
847                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
848       SIMIX_process_yield(self);
849     } else {
850       SIMIX_simcall_pre(&self->simcall, 0);
851     }    
852     
853   }
854   inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
855     smx_process_t self = SIMIX_process_self();
856     self->simcall.call = SIMCALL_PROCESS_GET_HOST;
857     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
858     memset(self->simcall.args, 0, sizeof(self->simcall.args));
859     self->simcall.args[0].dp = (void*) process;
860     if (self != simix_global->maestro_process) {
861       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
862                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
863       SIMIX_process_yield(self);
864     } else {
865       SIMIX_simcall_pre(&self->simcall, 0);
866     }    
867     return self->simcall.result.dp;
868   }
869   inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
870     smx_process_t self = SIMIX_process_self();
871     self->simcall.call = SIMCALL_PROCESS_GET_NAME;
872     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
873     memset(self->simcall.args, 0, sizeof(self->simcall.args));
874     self->simcall.args[0].dp = (void*) process;
875     if (self != simix_global->maestro_process) {
876       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
877                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
878       SIMIX_process_yield(self);
879     } else {
880       SIMIX_simcall_pre(&self->simcall, 0);
881     }    
882     return self->simcall.result.cc;
883   }
884   inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
885     smx_process_t self = SIMIX_process_self();
886     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
887     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
888     memset(self->simcall.args, 0, sizeof(self->simcall.args));
889     self->simcall.args[0].dp = (void*) process;
890     if (self != simix_global->maestro_process) {
891       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
892                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
893       SIMIX_process_yield(self);
894     } else {
895       SIMIX_simcall_pre(&self->simcall, 0);
896     }    
897     return self->simcall.result.i;
898   }
899   inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
900     smx_process_t self = SIMIX_process_self();
901     self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
902     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
903     memset(self->simcall.args, 0, sizeof(self->simcall.args));
904     self->simcall.args[0].dp = (void*) process;
905     if (self != simix_global->maestro_process) {
906       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
907                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
908       SIMIX_process_yield(self);
909     } else {
910       SIMIX_simcall_pre(&self->simcall, 0);
911     }    
912     return self->simcall.result.dp;
913   }
914   inline static int simcall_BODY_process_sleep(double duration) {
915     smx_process_t self = SIMIX_process_self();
916     self->simcall.call = SIMCALL_PROCESS_SLEEP;
917     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
918     memset(self->simcall.args, 0, sizeof(self->simcall.args));
919     self->simcall.args[0].d = (double) duration;
920     if (self != simix_global->maestro_process) {
921       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
922                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
923       SIMIX_process_yield(self);
924     } else {
925       SIMIX_simcall_pre(&self->simcall, 0);
926     }    
927     return self->simcall.result.i;
928   }
929   inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void* data) {
930     smx_process_t self = SIMIX_process_self();
931     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
932     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
933     memset(self->simcall.args, 0, sizeof(self->simcall.args));
934     self->simcall.args[0].dp = (void*) process;
935     self->simcall.args[1].fp = (FPtr) fun;
936     self->simcall.args[2].dp = (void*) data;
937     if (self != simix_global->maestro_process) {
938       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
939                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
940       SIMIX_process_yield(self);
941     } else {
942       SIMIX_simcall_pre(&self->simcall, 0);
943     }    
944     
945   }
946   inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
947     smx_process_t self = SIMIX_process_self();
948     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
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     self->simcall.args[1].i = (int) auto_restart;
953     if (self != simix_global->maestro_process) {
954       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
955                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
956       SIMIX_process_yield(self);
957     } else {
958       SIMIX_simcall_pre(&self->simcall, 0);
959     }    
960     
961   }
962   inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
963     smx_process_t self = SIMIX_process_self();
964     self->simcall.call = SIMCALL_PROCESS_RESTART;
965     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
966     memset(self->simcall.args, 0, sizeof(self->simcall.args));
967     self->simcall.args[0].dp = (void*) process;
968     if (self != simix_global->maestro_process) {
969       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
970                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
971       SIMIX_process_yield(self);
972     } else {
973       SIMIX_simcall_pre(&self->simcall, 0);
974     }    
975     return self->simcall.result.dp;
976   }
977   inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
978     smx_process_t self = SIMIX_process_self();
979     self->simcall.call = SIMCALL_RDV_CREATE;
980     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
981     memset(self->simcall.args, 0, sizeof(self->simcall.args));
982     self->simcall.args[0].cc = (const char*) name;
983     if (self != simix_global->maestro_process) {
984       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
985                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
986       SIMIX_process_yield(self);
987     } else {
988       SIMIX_simcall_pre(&self->simcall, 0);
989     }    
990     return self->simcall.result.dp;
991   }
992   inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
993     smx_process_t self = SIMIX_process_self();
994     self->simcall.call = SIMCALL_RDV_DESTROY;
995     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
996     memset(self->simcall.args, 0, sizeof(self->simcall.args));
997     self->simcall.args[0].dp = (void*) rdv;
998     if (self != simix_global->maestro_process) {
999       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1000                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1001       SIMIX_process_yield(self);
1002     } else {
1003       SIMIX_simcall_pre(&self->simcall, 0);
1004     }    
1005     
1006   }
1007   inline static smx_host_t simcall_BODY_rdv_get_by_name(const char* name) {
1008     smx_process_t self = SIMIX_process_self();
1009     self->simcall.call = SIMCALL_RDV_GET_BY_NAME;
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].cc = (const char*) name;
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     return self->simcall.result.dp;
1021   }
1022   inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
1023     smx_process_t self = SIMIX_process_self();
1024     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1025     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1026     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1027     self->simcall.args[0].dp = (void*) rdv;
1028     self->simcall.args[1].dp = (void*) host;
1029     if (self != simix_global->maestro_process) {
1030       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1031                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1032       SIMIX_process_yield(self);
1033     } else {
1034       SIMIX_simcall_pre(&self->simcall, 0);
1035     }    
1036     return self->simcall.result.ui;
1037   }
1038   inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1039     smx_process_t self = SIMIX_process_self();
1040     self->simcall.call = SIMCALL_RDV_GET_HEAD;
1041     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1042     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1043     self->simcall.args[0].dp = (void*) rdv;
1044     if (self != simix_global->maestro_process) {
1045       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1046                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1047       SIMIX_process_yield(self);
1048     } else {
1049       SIMIX_simcall_pre(&self->simcall, 0);
1050     }    
1051     return self->simcall.result.dp;
1052   }
1053   inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1054     smx_process_t self = SIMIX_process_self();
1055     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1056     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1057     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1058     self->simcall.args[0].dp = (void*) rdv;
1059     self->simcall.args[1].dp = (void*) receiver;
1060     if (self != simix_global->maestro_process) {
1061       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1062                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1063       SIMIX_process_yield(self);
1064     } else {
1065       SIMIX_simcall_pre(&self->simcall, 0);
1066     }    
1067     
1068   }
1069   inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1070     smx_process_t self = SIMIX_process_self();
1071     self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1072     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1073     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1074     self->simcall.args[0].dp = (void*) rdv;
1075     if (self != simix_global->maestro_process) {
1076       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1077                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1078       SIMIX_process_yield(self);
1079     } else {
1080       SIMIX_simcall_pre(&self->simcall, 0);
1081     }    
1082     return self->simcall.result.dp;
1083   }
1084   inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int src, int tag, simix_match_func_t match_fun, void* data) {
1085     smx_process_t self = SIMIX_process_self();
1086     self->simcall.call = SIMCALL_COMM_IPROBE;
1087     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1088     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1089     self->simcall.args[0].dp = (void*) rdv;
1090     self->simcall.args[1].i = (int) src;
1091     self->simcall.args[2].i = (int) tag;
1092     self->simcall.args[3].fp = (FPtr) match_fun;
1093     self->simcall.args[4].dp = (void*) data;
1094     if (self != simix_global->maestro_process) {
1095       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1096                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1097       SIMIX_process_yield(self);
1098     } else {
1099       SIMIX_simcall_pre(&self->simcall, 0);
1100     }    
1101     return self->simcall.result.dp;
1102   }
1103   inline static void simcall_BODY_comm_send(smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, void* data, double timeout) {
1104     smx_process_t self = SIMIX_process_self();
1105     self->simcall.call = SIMCALL_COMM_SEND;
1106     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1107     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1108     self->simcall.args[0].dp = (void*) rdv;
1109     self->simcall.args[1].d = (double) task_size;
1110     self->simcall.args[2].d = (double) rate;
1111     self->simcall.args[3].dp = (void*) src_buff;
1112     self->simcall.args[4].sz = (size_t) src_buff_size;
1113     self->simcall.args[5].fp = (FPtr) match_fun;
1114     self->simcall.args[6].dp = (void*) data;
1115     self->simcall.args[7].d = (double) timeout;
1116     if (self != simix_global->maestro_process) {
1117       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1118                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1119       SIMIX_process_yield(self);
1120     } else {
1121       SIMIX_simcall_pre(&self->simcall, 0);
1122     }    
1123     
1124   }
1125   inline static smx_action_t simcall_BODY_comm_isend(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, void* data, int detached) {
1126     smx_process_t self = SIMIX_process_self();
1127     self->simcall.call = SIMCALL_COMM_ISEND;
1128     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1129     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1130     self->simcall.args[0].dp = (void*) rdv;
1131     self->simcall.args[1].d = (double) task_size;
1132     self->simcall.args[2].d = (double) rate;
1133     self->simcall.args[3].dp = (void*) src_buff;
1134     self->simcall.args[4].sz = (size_t) src_buff_size;
1135     self->simcall.args[5].fp = (FPtr) match_fun;
1136     self->simcall.args[6].fp = (FPtr) clean_fun;
1137     self->simcall.args[7].dp = (void*) data;
1138     self->simcall.args[8].i = (int) detached;
1139     if (self != simix_global->maestro_process) {
1140       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1141                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1142       SIMIX_process_yield(self);
1143     } else {
1144       SIMIX_simcall_pre(&self->simcall, 0);
1145     }    
1146     return self->simcall.result.dp;
1147   }
1148   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, void* data, double timeout, double rate) {
1149     smx_process_t self = SIMIX_process_self();
1150     self->simcall.call = SIMCALL_COMM_RECV;
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*) rdv;
1154     self->simcall.args[1].dp = (void*) dst_buff;
1155     self->simcall.args[2].dp = (void*) dst_buff_size;
1156     self->simcall.args[3].fp = (FPtr) match_fun;
1157     self->simcall.args[4].dp = (void*) data;
1158     self->simcall.args[5].d = (double) timeout;
1159     self->simcall.args[6].d = (double) rate;
1160     if (self != simix_global->maestro_process) {
1161       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1162                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1163       SIMIX_process_yield(self);
1164     } else {
1165       SIMIX_simcall_pre(&self->simcall, 0);
1166     }    
1167     
1168   }
1169   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, void* data, double rate) {
1170     smx_process_t self = SIMIX_process_self();
1171     self->simcall.call = SIMCALL_COMM_IRECV;
1172     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1173     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1174     self->simcall.args[0].dp = (void*) rdv;
1175     self->simcall.args[1].dp = (void*) dst_buff;
1176     self->simcall.args[2].dp = (void*) dst_buff_size;
1177     self->simcall.args[3].fp = (FPtr) match_fun;
1178     self->simcall.args[4].dp = (void*) data;
1179     self->simcall.args[5].d = (double) rate;
1180     if (self != simix_global->maestro_process) {
1181       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1182                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1183       SIMIX_process_yield(self);
1184     } else {
1185       SIMIX_simcall_pre(&self->simcall, 0);
1186     }    
1187     return self->simcall.result.dp;
1188   }
1189   inline static void simcall_BODY_comm_destroy(smx_action_t comm) {
1190     smx_process_t self = SIMIX_process_self();
1191     self->simcall.call = SIMCALL_COMM_DESTROY;
1192     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1193     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1194     self->simcall.args[0].dp = (void*) comm;
1195     if (self != simix_global->maestro_process) {
1196       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1197                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1198       SIMIX_process_yield(self);
1199     } else {
1200       SIMIX_simcall_pre(&self->simcall, 0);
1201     }    
1202     
1203   }
1204   inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
1205     smx_process_t self = SIMIX_process_self();
1206     self->simcall.call = SIMCALL_COMM_CANCEL;
1207     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1208     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1209     self->simcall.args[0].dp = (void*) comm;
1210     if (self != simix_global->maestro_process) {
1211       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1212                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1213       SIMIX_process_yield(self);
1214     } else {
1215       SIMIX_simcall_pre(&self->simcall, 0);
1216     }    
1217     
1218   }
1219   inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1220     smx_process_t self = SIMIX_process_self();
1221     self->simcall.call = SIMCALL_COMM_WAITANY;
1222     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1223     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1224     self->simcall.args[0].dp = (void*) comms;
1225     if (self != simix_global->maestro_process) {
1226       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1227                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1228       SIMIX_process_yield(self);
1229     } else {
1230       SIMIX_simcall_pre(&self->simcall, 0);
1231     }    
1232     return self->simcall.result.i;
1233   }
1234   inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
1235     smx_process_t self = SIMIX_process_self();
1236     self->simcall.call = SIMCALL_COMM_WAIT;
1237     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1238     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1239     self->simcall.args[0].dp = (void*) comm;
1240     self->simcall.args[1].d = (double) timeout;
1241     if (self != simix_global->maestro_process) {
1242       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1243                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1244       SIMIX_process_yield(self);
1245     } else {
1246       SIMIX_simcall_pre(&self->simcall, 0);
1247     }    
1248     
1249   }
1250   inline static int simcall_BODY_comm_test(smx_action_t comm) {
1251     smx_process_t self = SIMIX_process_self();
1252     self->simcall.call = SIMCALL_COMM_TEST;
1253     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1254     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1255     self->simcall.args[0].dp = (void*) comm;
1256     if (self != simix_global->maestro_process) {
1257       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1258                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1259       SIMIX_process_yield(self);
1260     } else {
1261       SIMIX_simcall_pre(&self->simcall, 0);
1262     }    
1263     return self->simcall.result.i;
1264   }
1265   inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1266     smx_process_t self = SIMIX_process_self();
1267     self->simcall.call = SIMCALL_COMM_TESTANY;
1268     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1269     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1270     self->simcall.args[0].dp = (void*) comms;
1271     if (self != simix_global->maestro_process) {
1272       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1273                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1274       SIMIX_process_yield(self);
1275     } else {
1276       SIMIX_simcall_pre(&self->simcall, 0);
1277     }    
1278     return self->simcall.result.i;
1279   }
1280   inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
1281     smx_process_t self = SIMIX_process_self();
1282     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1283     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1284     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1285     self->simcall.args[0].dp = (void*) comm;
1286     if (self != simix_global->maestro_process) {
1287       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1288                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1289       SIMIX_process_yield(self);
1290     } else {
1291       SIMIX_simcall_pre(&self->simcall, 0);
1292     }    
1293     return self->simcall.result.d;
1294   }
1295   inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
1296     smx_process_t self = SIMIX_process_self();
1297     self->simcall.call = SIMCALL_COMM_GET_STATE;
1298     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1299     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1300     self->simcall.args[0].dp = (void*) comm;
1301     if (self != simix_global->maestro_process) {
1302       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1303                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1304       SIMIX_process_yield(self);
1305     } else {
1306       SIMIX_simcall_pre(&self->simcall, 0);
1307     }    
1308     return self->simcall.result.i;
1309   }
1310   inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
1311     smx_process_t self = SIMIX_process_self();
1312     self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1313     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1314     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1315     self->simcall.args[0].dp = (void*) comm;
1316     if (self != simix_global->maestro_process) {
1317       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1318                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1319       SIMIX_process_yield(self);
1320     } else {
1321       SIMIX_simcall_pre(&self->simcall, 0);
1322     }    
1323     return self->simcall.result.dp;
1324   }
1325   inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
1326     smx_process_t self = SIMIX_process_self();
1327     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1328     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1329     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1330     self->simcall.args[0].dp = (void*) comm;
1331     if (self != simix_global->maestro_process) {
1332       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1333                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1334       SIMIX_process_yield(self);
1335     } else {
1336       SIMIX_simcall_pre(&self->simcall, 0);
1337     }    
1338     return self->simcall.result.dp;
1339   }
1340   inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
1341     smx_process_t self = SIMIX_process_self();
1342     self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1343     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1344     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1345     self->simcall.args[0].dp = (void*) comm;
1346     if (self != simix_global->maestro_process) {
1347       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1348                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1349       SIMIX_process_yield(self);
1350     } else {
1351       SIMIX_simcall_pre(&self->simcall, 0);
1352     }    
1353     return self->simcall.result.dp;
1354   }
1355   inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
1356     smx_process_t self = SIMIX_process_self();
1357     self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1358     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1359     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1360     self->simcall.args[0].dp = (void*) comm;
1361     if (self != simix_global->maestro_process) {
1362       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1363                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1364       SIMIX_process_yield(self);
1365     } else {
1366       SIMIX_simcall_pre(&self->simcall, 0);
1367     }    
1368     return self->simcall.result.dp;
1369   }
1370   inline static smx_mutex_t simcall_BODY_mutex_init() {
1371     smx_process_t self = SIMIX_process_self();
1372     self->simcall.call = SIMCALL_MUTEX_INIT;
1373     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1374     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1375
1376     if (self != simix_global->maestro_process) {
1377       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1378                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1379       SIMIX_process_yield(self);
1380     } else {
1381       SIMIX_simcall_pre(&self->simcall, 0);
1382     }    
1383     return self->simcall.result.dp;
1384   }
1385   inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1386     smx_process_t self = SIMIX_process_self();
1387     self->simcall.call = SIMCALL_MUTEX_DESTROY;
1388     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1389     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1390     self->simcall.args[0].dp = (void*) mutex;
1391     if (self != simix_global->maestro_process) {
1392       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1393                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1394       SIMIX_process_yield(self);
1395     } else {
1396       SIMIX_simcall_pre(&self->simcall, 0);
1397     }    
1398     
1399   }
1400   inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1401     smx_process_t self = SIMIX_process_self();
1402     self->simcall.call = SIMCALL_MUTEX_LOCK;
1403     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1404     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1405     self->simcall.args[0].dp = (void*) mutex;
1406     if (self != simix_global->maestro_process) {
1407       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1408                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1409       SIMIX_process_yield(self);
1410     } else {
1411       SIMIX_simcall_pre(&self->simcall, 0);
1412     }    
1413     
1414   }
1415   inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1416     smx_process_t self = SIMIX_process_self();
1417     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1418     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1419     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1420     self->simcall.args[0].dp = (void*) mutex;
1421     if (self != simix_global->maestro_process) {
1422       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1423                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1424       SIMIX_process_yield(self);
1425     } else {
1426       SIMIX_simcall_pre(&self->simcall, 0);
1427     }    
1428     return self->simcall.result.i;
1429   }
1430   inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1431     smx_process_t self = SIMIX_process_self();
1432     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1433     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1434     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1435     self->simcall.args[0].dp = (void*) mutex;
1436     if (self != simix_global->maestro_process) {
1437       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1438                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1439       SIMIX_process_yield(self);
1440     } else {
1441       SIMIX_simcall_pre(&self->simcall, 0);
1442     }    
1443     
1444   }
1445   inline static smx_cond_t simcall_BODY_cond_init() {
1446     smx_process_t self = SIMIX_process_self();
1447     self->simcall.call = SIMCALL_COND_INIT;
1448     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1449     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1450
1451     if (self != simix_global->maestro_process) {
1452       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1453                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1454       SIMIX_process_yield(self);
1455     } else {
1456       SIMIX_simcall_pre(&self->simcall, 0);
1457     }    
1458     return self->simcall.result.dp;
1459   }
1460   inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
1461     smx_process_t self = SIMIX_process_self();
1462     self->simcall.call = SIMCALL_COND_DESTROY;
1463     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1464     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1465     self->simcall.args[0].dp = (void*) cond;
1466     if (self != simix_global->maestro_process) {
1467       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1468                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1469       SIMIX_process_yield(self);
1470     } else {
1471       SIMIX_simcall_pre(&self->simcall, 0);
1472     }    
1473     
1474   }
1475   inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
1476     smx_process_t self = SIMIX_process_self();
1477     self->simcall.call = SIMCALL_COND_SIGNAL;
1478     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1479     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1480     self->simcall.args[0].dp = (void*) cond;
1481     if (self != simix_global->maestro_process) {
1482       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1483                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1484       SIMIX_process_yield(self);
1485     } else {
1486       SIMIX_simcall_pre(&self->simcall, 0);
1487     }    
1488     
1489   }
1490   inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
1491     smx_process_t self = SIMIX_process_self();
1492     self->simcall.call = SIMCALL_COND_WAIT;
1493     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1494     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1495     self->simcall.args[0].dp = (void*) cond;
1496     self->simcall.args[1].dp = (void*) mutex;
1497     if (self != simix_global->maestro_process) {
1498       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1499                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1500       SIMIX_process_yield(self);
1501     } else {
1502       SIMIX_simcall_pre(&self->simcall, 0);
1503     }    
1504     
1505   }
1506   inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1507     smx_process_t self = SIMIX_process_self();
1508     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
1509     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1510     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1511     self->simcall.args[0].dp = (void*) cond;
1512     self->simcall.args[1].dp = (void*) mutex;
1513     self->simcall.args[2].d = (double) timeout;
1514     if (self != simix_global->maestro_process) {
1515       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1516                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1517       SIMIX_process_yield(self);
1518     } else {
1519       SIMIX_simcall_pre(&self->simcall, 0);
1520     }    
1521     
1522   }
1523   inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1524     smx_process_t self = SIMIX_process_self();
1525     self->simcall.call = SIMCALL_COND_BROADCAST;
1526     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1527     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1528     self->simcall.args[0].dp = (void*) cond;
1529     if (self != simix_global->maestro_process) {
1530       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1531                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1532       SIMIX_process_yield(self);
1533     } else {
1534       SIMIX_simcall_pre(&self->simcall, 0);
1535     }    
1536     
1537   }
1538   inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
1539     smx_process_t self = SIMIX_process_self();
1540     self->simcall.call = SIMCALL_SEM_INIT;
1541     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1542     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1543     self->simcall.args[0].i = (int) capacity;
1544     if (self != simix_global->maestro_process) {
1545       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1546                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1547       SIMIX_process_yield(self);
1548     } else {
1549       SIMIX_simcall_pre(&self->simcall, 0);
1550     }    
1551     return self->simcall.result.dp;
1552   }
1553   inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
1554     smx_process_t self = SIMIX_process_self();
1555     self->simcall.call = SIMCALL_SEM_DESTROY;
1556     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1557     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1558     self->simcall.args[0].dp = (void*) sem;
1559     if (self != simix_global->maestro_process) {
1560       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1561                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1562       SIMIX_process_yield(self);
1563     } else {
1564       SIMIX_simcall_pre(&self->simcall, 0);
1565     }    
1566     
1567   }
1568   inline static void simcall_BODY_sem_release(smx_sem_t sem) {
1569     smx_process_t self = SIMIX_process_self();
1570     self->simcall.call = SIMCALL_SEM_RELEASE;
1571     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1572     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1573     self->simcall.args[0].dp = (void*) sem;
1574     if (self != simix_global->maestro_process) {
1575       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1576                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1577       SIMIX_process_yield(self);
1578     } else {
1579       SIMIX_simcall_pre(&self->simcall, 0);
1580     }    
1581     
1582   }
1583   inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
1584     smx_process_t self = SIMIX_process_self();
1585     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
1586     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1587     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1588     self->simcall.args[0].dp = (void*) sem;
1589     if (self != simix_global->maestro_process) {
1590       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1591                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1592       SIMIX_process_yield(self);
1593     } else {
1594       SIMIX_simcall_pre(&self->simcall, 0);
1595     }    
1596     return self->simcall.result.i;
1597   }
1598   inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
1599     smx_process_t self = SIMIX_process_self();
1600     self->simcall.call = SIMCALL_SEM_ACQUIRE;
1601     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1602     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1603     self->simcall.args[0].dp = (void*) sem;
1604     if (self != simix_global->maestro_process) {
1605       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1606                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1607       SIMIX_process_yield(self);
1608     } else {
1609       SIMIX_simcall_pre(&self->simcall, 0);
1610     }    
1611     
1612   }
1613   inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
1614     smx_process_t self = SIMIX_process_self();
1615     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
1616     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1617     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1618     self->simcall.args[0].dp = (void*) sem;
1619     self->simcall.args[1].d = (double) timeout;
1620     if (self != simix_global->maestro_process) {
1621       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1622                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1623       SIMIX_process_yield(self);
1624     } else {
1625       SIMIX_simcall_pre(&self->simcall, 0);
1626     }    
1627     
1628   }
1629   inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
1630     smx_process_t self = SIMIX_process_self();
1631     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
1632     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1633     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1634     self->simcall.args[0].dp = (void*) sem;
1635     if (self != simix_global->maestro_process) {
1636       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1637                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1638       SIMIX_process_yield(self);
1639     } else {
1640       SIMIX_simcall_pre(&self->simcall, 0);
1641     }    
1642     return self->simcall.result.i;
1643   }
1644   inline static void* simcall_BODY_file_get_data(smx_file_t fd) {
1645     smx_process_t self = SIMIX_process_self();
1646     self->simcall.call = SIMCALL_FILE_GET_DATA;
1647     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1648     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1649     self->simcall.args[0].dp = (void*) fd;
1650     if (self != simix_global->maestro_process) {
1651       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1652                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1653       SIMIX_process_yield(self);
1654     } else {
1655       SIMIX_simcall_pre(&self->simcall, 0);
1656     }    
1657     return self->simcall.result.dp;
1658   }
1659   inline static void simcall_BODY_file_set_data(smx_file_t fd, void* data) {
1660     smx_process_t self = SIMIX_process_self();
1661     self->simcall.call = SIMCALL_FILE_SET_DATA;
1662     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1663     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1664     self->simcall.args[0].dp = (void*) fd;
1665     self->simcall.args[1].dp = (void*) data;
1666     if (self != simix_global->maestro_process) {
1667       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1668                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1669       SIMIX_process_yield(self);
1670     } else {
1671       SIMIX_simcall_pre(&self->simcall, 0);
1672     }    
1673     
1674   }
1675   inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size) {
1676     smx_process_t self = SIMIX_process_self();
1677     self->simcall.call = SIMCALL_FILE_READ;
1678     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1679     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1680     self->simcall.args[0].dp = (void*) fd;
1681     self->simcall.args[1].sgsz = (sg_size_t) size;
1682     if (self != simix_global->maestro_process) {
1683       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1684                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1685       SIMIX_process_yield(self);
1686     } else {
1687       SIMIX_simcall_pre(&self->simcall, 0);
1688     }    
1689     return self->simcall.result.sgsz;
1690   }
1691   inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size) {
1692     smx_process_t self = SIMIX_process_self();
1693     self->simcall.call = SIMCALL_FILE_WRITE;
1694     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1695     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1696     self->simcall.args[0].dp = (void*) fd;
1697     self->simcall.args[1].sgsz = (sg_size_t) size;
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.sgsz;
1706   }
1707   inline static smx_file_t simcall_BODY_file_open(const char* mount, const char* path) {
1708     smx_process_t self = SIMIX_process_self();
1709     self->simcall.call = SIMCALL_FILE_OPEN;
1710     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1711     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1712     self->simcall.args[0].cc = (const char*) mount;
1713     self->simcall.args[1].cc = (const char*) path;
1714     if (self != simix_global->maestro_process) {
1715       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1716                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1717       SIMIX_process_yield(self);
1718     } else {
1719       SIMIX_simcall_pre(&self->simcall, 0);
1720     }    
1721     return self->simcall.result.dp;
1722   }
1723   inline static int simcall_BODY_file_close(smx_file_t fd) {
1724     smx_process_t self = SIMIX_process_self();
1725     self->simcall.call = SIMCALL_FILE_CLOSE;
1726     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1727     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1728     self->simcall.args[0].dp = (void*) fd;
1729     if (self != simix_global->maestro_process) {
1730       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1731                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1732       SIMIX_process_yield(self);
1733     } else {
1734       SIMIX_simcall_pre(&self->simcall, 0);
1735     }    
1736     return self->simcall.result.i;
1737   }
1738   inline static int simcall_BODY_file_unlink(smx_file_t fd) {
1739     smx_process_t self = SIMIX_process_self();
1740     self->simcall.call = SIMCALL_FILE_UNLINK;
1741     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1742     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1743     self->simcall.args[0].dp = (void*) fd;
1744     if (self != simix_global->maestro_process) {
1745       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1746                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1747       SIMIX_process_yield(self);
1748     } else {
1749       SIMIX_simcall_pre(&self->simcall, 0);
1750     }    
1751     return self->simcall.result.i;
1752   }
1753   inline static xbt_dict_t simcall_BODY_file_ls(const char* mount, const char* path) {
1754     smx_process_t self = SIMIX_process_self();
1755     self->simcall.call = SIMCALL_FILE_LS;
1756     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1757     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1758     self->simcall.args[0].cc = (const char*) mount;
1759     self->simcall.args[1].cc = (const char*) path;
1760     if (self != simix_global->maestro_process) {
1761       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1762                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1763       SIMIX_process_yield(self);
1764     } else {
1765       SIMIX_simcall_pre(&self->simcall, 0);
1766     }    
1767     return self->simcall.result.dp;
1768   }
1769   inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
1770     smx_process_t self = SIMIX_process_self();
1771     self->simcall.call = SIMCALL_FILE_GET_SIZE;
1772     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1773     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1774     self->simcall.args[0].dp = (void*) fd;
1775     if (self != simix_global->maestro_process) {
1776       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1777                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1778       SIMIX_process_yield(self);
1779     } else {
1780       SIMIX_simcall_pre(&self->simcall, 0);
1781     }    
1782     return self->simcall.result.sgsz;
1783   }
1784   inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
1785     smx_process_t self = SIMIX_process_self();
1786     self->simcall.call = SIMCALL_FILE_TELL;
1787     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1788     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1789     self->simcall.args[0].dp = (void*) fd;
1790     if (self != simix_global->maestro_process) {
1791       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1792                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1793       SIMIX_process_yield(self);
1794     } else {
1795       SIMIX_simcall_pre(&self->simcall, 0);
1796     }    
1797     return self->simcall.result.sgsz;
1798   }
1799   inline static int simcall_BODY_file_seek(smx_file_t fd, sg_size_t offset, int origin) {
1800     smx_process_t self = SIMIX_process_self();
1801     self->simcall.call = SIMCALL_FILE_SEEK;
1802     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1803     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1804     self->simcall.args[0].dp = (void*) fd;
1805     self->simcall.args[1].sgsz = (sg_size_t) offset;
1806     self->simcall.args[2].i = (int) origin;
1807     if (self != simix_global->maestro_process) {
1808       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1809                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1810       SIMIX_process_yield(self);
1811     } else {
1812       SIMIX_simcall_pre(&self->simcall, 0);
1813     }    
1814     return self->simcall.result.i;
1815   }
1816   inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
1817     smx_process_t self = SIMIX_process_self();
1818     self->simcall.call = SIMCALL_FILE_GET_INFO;
1819     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1820     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1821     self->simcall.args[0].dp = (void*) fd;
1822     if (self != simix_global->maestro_process) {
1823       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1824                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1825       SIMIX_process_yield(self);
1826     } else {
1827       SIMIX_simcall_pre(&self->simcall, 0);
1828     }    
1829     return self->simcall.result.dp;
1830   }
1831   inline static void simcall_BODY_storage_file_rename(smx_storage_t storage, const char* src, const char* dest) {
1832     smx_process_t self = SIMIX_process_self();
1833     self->simcall.call = SIMCALL_STORAGE_FILE_RENAME;
1834     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1835     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1836     self->simcall.args[0].dp = (void*) storage;
1837     self->simcall.args[1].cc = (const char*) src;
1838     self->simcall.args[2].cc = (const char*) dest;
1839     if (self != simix_global->maestro_process) {
1840       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1841                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1842       SIMIX_process_yield(self);
1843     } else {
1844       SIMIX_simcall_pre(&self->simcall, 0);
1845     }    
1846     
1847   }
1848   inline static sg_size_t simcall_BODY_storage_get_free_size(const char* name) {
1849     smx_process_t self = SIMIX_process_self();
1850     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
1851     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1852     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1853     self->simcall.args[0].cc = (const char*) name;
1854     if (self != simix_global->maestro_process) {
1855       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1856                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1857       SIMIX_process_yield(self);
1858     } else {
1859       SIMIX_simcall_pre(&self->simcall, 0);
1860     }    
1861     return self->simcall.result.sgsz;
1862   }
1863   inline static sg_size_t simcall_BODY_storage_get_used_size(const char* name) {
1864     smx_process_t self = SIMIX_process_self();
1865     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
1866     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1867     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1868     self->simcall.args[0].cc = (const char*) name;
1869     if (self != simix_global->maestro_process) {
1870       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1871                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1872       SIMIX_process_yield(self);
1873     } else {
1874       SIMIX_simcall_pre(&self->simcall, 0);
1875     }    
1876     return self->simcall.result.sgsz;
1877   }
1878   inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
1879     smx_process_t self = SIMIX_process_self();
1880     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
1881     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1882     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1883     self->simcall.args[0].dp = (void*) storage;
1884     if (self != simix_global->maestro_process) {
1885       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1886                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1887       SIMIX_process_yield(self);
1888     } else {
1889       SIMIX_simcall_pre(&self->simcall, 0);
1890     }    
1891     return self->simcall.result.dp;
1892   }
1893   inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
1894     smx_process_t self = SIMIX_process_self();
1895     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
1896     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1897     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1898     self->simcall.args[0].dp = (void*) storage;
1899     if (self != simix_global->maestro_process) {
1900       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1901                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1902       SIMIX_process_yield(self);
1903     } else {
1904       SIMIX_simcall_pre(&self->simcall, 0);
1905     }    
1906     return self->simcall.result.dp;
1907   }
1908   inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
1909     smx_process_t self = SIMIX_process_self();
1910     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
1911     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1912     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1913     self->simcall.args[0].cc = (const char*) name;
1914     if (self != simix_global->maestro_process) {
1915       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1916                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1917       SIMIX_process_yield(self);
1918     } else {
1919       SIMIX_simcall_pre(&self->simcall, 0);
1920     }    
1921     return self->simcall.result.dp;
1922   }
1923 #ifdef HAVE_LATENCY_BOUND_TRACKING
1924   inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
1925     smx_process_t self = SIMIX_process_self();
1926     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
1927     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1928     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1929     self->simcall.args[0].dp = (void*) comm;
1930     if (self != simix_global->maestro_process) {
1931       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1932                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1933       SIMIX_process_yield(self);
1934     } else {
1935       SIMIX_simcall_pre(&self->simcall, 0);
1936     }    
1937     return self->simcall.result.i;
1938   }
1939 #endif
1940
1941 #ifdef HAVE_TRACING
1942   inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
1943     smx_process_t self = SIMIX_process_self();
1944     self->simcall.call = SIMCALL_SET_CATEGORY;
1945     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1946     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1947     self->simcall.args[0].dp = (void*) action;
1948     self->simcall.args[1].cc = (const char*) category;
1949     if (self != simix_global->maestro_process) {
1950       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1951                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1952       SIMIX_process_yield(self);
1953     } else {
1954       SIMIX_simcall_pre(&self->simcall, 0);
1955     }    
1956     
1957   }
1958 #endif
1959
1960 #ifdef HAVE_MC
1961   inline static void* simcall_BODY_mc_snapshot() {
1962     smx_process_t self = SIMIX_process_self();
1963     self->simcall.call = SIMCALL_MC_SNAPSHOT;
1964     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1965     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1966
1967     if (self != simix_global->maestro_process) {
1968       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1969                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1970       SIMIX_process_yield(self);
1971     } else {
1972       SIMIX_simcall_pre(&self->simcall, 0);
1973     }    
1974     return self->simcall.result.dp;
1975   }
1976   inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
1977     smx_process_t self = SIMIX_process_self();
1978     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
1979     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1980     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1981     self->simcall.args[0].dp = (void*) s1;
1982     self->simcall.args[1].dp = (void*) s2;
1983     if (self != simix_global->maestro_process) {
1984       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1985                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1986       SIMIX_process_yield(self);
1987     } else {
1988       SIMIX_simcall_pre(&self->simcall, 0);
1989     }    
1990     return self->simcall.result.i;
1991   }
1992   inline static int simcall_BODY_mc_random(int min, int max) {
1993     smx_process_t self = SIMIX_process_self();
1994     self->simcall.call = SIMCALL_MC_RANDOM;
1995     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1996     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1997     self->simcall.args[0].i = (int) min;
1998     self->simcall.args[1].i = (int) max;
1999     if (self != simix_global->maestro_process) {
2000       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2001                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2002       SIMIX_process_yield(self);
2003     } else {
2004       SIMIX_simcall_pre(&self->simcall, 0);
2005     }    
2006     return self->simcall.result.i;
2007   }
2008 #endif