Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
b81e906b868d761100015562d3cd1aa8d5c55772
[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 int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
479     smx_process_t self = SIMIX_process_self();
480     self->simcall.call = SIMCALL_VM_GET_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     if (self != simix_global->maestro_process) {
485       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
486                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
487       SIMIX_process_yield(self);
488     } else {
489       SIMIX_simcall_pre(&self->simcall, 0);
490     }    
491     return self->simcall.result.i;
492   }
493   inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
494     smx_process_t self = SIMIX_process_self();
495     self->simcall.call = SIMCALL_VM_MIGRATE;
496     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
497     memset(self->simcall.args, 0, sizeof(self->simcall.args));
498     self->simcall.args[0].dp = (void*) ind_vm;
499     self->simcall.args[1].dp = (void*) ind_dst_pm;
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     
508   }
509   inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
510     smx_process_t self = SIMIX_process_self();
511     self->simcall.call = SIMCALL_VM_GET_PM;
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     if (self != simix_global->maestro_process) {
516       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
517                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
518       SIMIX_process_yield(self);
519     } else {
520       SIMIX_simcall_pre(&self->simcall, 0);
521     }    
522     return self->simcall.result.dp;
523   }
524   inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
525     smx_process_t self = SIMIX_process_self();
526     self->simcall.call = SIMCALL_VM_SET_BOUND;
527     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
528     memset(self->simcall.args, 0, sizeof(self->simcall.args));
529     self->simcall.args[0].dp = (void*) ind_vm;
530     self->simcall.args[1].d = (double) bound;
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     
539   }
540   inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
541     smx_process_t self = SIMIX_process_self();
542     self->simcall.call = SIMCALL_VM_SET_AFFINITY;
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].dp = (void*) ind_pm;
547     self->simcall.args[2].ul = (unsigned long) mask;
548     if (self != simix_global->maestro_process) {
549       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
550                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
551       SIMIX_process_yield(self);
552     } else {
553       SIMIX_simcall_pre(&self->simcall, 0);
554     }    
555     
556   }
557   inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
558     smx_process_t self = SIMIX_process_self();
559     self->simcall.call = SIMCALL_VM_DESTROY;
560     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
561     memset(self->simcall.args, 0, sizeof(self->simcall.args));
562     self->simcall.args[0].dp = (void*) ind_vm;
563     if (self != simix_global->maestro_process) {
564       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
565                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
566       SIMIX_process_yield(self);
567     } else {
568       SIMIX_simcall_pre(&self->simcall, 0);
569     }    
570     
571   }
572   inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
573     smx_process_t self = SIMIX_process_self();
574     self->simcall.call = SIMCALL_VM_SUSPEND;
575     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
576     memset(self->simcall.args, 0, sizeof(self->simcall.args));
577     self->simcall.args[0].dp = (void*) ind_vm;
578     if (self != simix_global->maestro_process) {
579       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
580                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
581       SIMIX_process_yield(self);
582     } else {
583       SIMIX_simcall_pre(&self->simcall, 0);
584     }    
585     
586   }
587   inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
588     smx_process_t self = SIMIX_process_self();
589     self->simcall.call = SIMCALL_VM_RESUME;
590     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
591     memset(self->simcall.args, 0, sizeof(self->simcall.args));
592     self->simcall.args[0].dp = (void*) ind_vm;
593     if (self != simix_global->maestro_process) {
594       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
595                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
596       SIMIX_process_yield(self);
597     } else {
598       SIMIX_simcall_pre(&self->simcall, 0);
599     }    
600     
601   }
602   inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
603     smx_process_t self = SIMIX_process_self();
604     self->simcall.call = SIMCALL_VM_SHUTDOWN;
605     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
606     memset(self->simcall.args, 0, sizeof(self->simcall.args));
607     self->simcall.args[0].dp = (void*) ind_vm;
608     if (self != simix_global->maestro_process) {
609       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
610                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
611       SIMIX_process_yield(self);
612     } else {
613       SIMIX_simcall_pre(&self->simcall, 0);
614     }    
615     
616   }
617   inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
618     smx_process_t self = SIMIX_process_self();
619     self->simcall.call = SIMCALL_VM_SAVE;
620     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
621     memset(self->simcall.args, 0, sizeof(self->simcall.args));
622     self->simcall.args[0].dp = (void*) ind_vm;
623     if (self != simix_global->maestro_process) {
624       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
625                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
626       SIMIX_process_yield(self);
627     } else {
628       SIMIX_simcall_pre(&self->simcall, 0);
629     }    
630     
631   }
632   inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
633     smx_process_t self = SIMIX_process_self();
634     self->simcall.call = SIMCALL_VM_RESTORE;
635     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
636     memset(self->simcall.args, 0, sizeof(self->simcall.args));
637     self->simcall.args[0].dp = (void*) ind_vm;
638     if (self != simix_global->maestro_process) {
639       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
640                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
641       SIMIX_process_yield(self);
642     } else {
643       SIMIX_simcall_pre(&self->simcall, 0);
644     }    
645     
646   }
647   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) {
648     smx_process_t self = SIMIX_process_self();
649     self->simcall.call = SIMCALL_PROCESS_CREATE;
650     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
651     memset(self->simcall.args, 0, sizeof(self->simcall.args));
652     self->simcall.args[0].dp = (void*) process;
653     self->simcall.args[1].cc = (const char*) name;
654     self->simcall.args[2].fp = (FPtr) code;
655     self->simcall.args[3].dp = (void*) data;
656     self->simcall.args[4].cc = (const char*) hostname;
657     self->simcall.args[5].d = (double) kill_time;
658     self->simcall.args[6].i = (int) argc;
659     self->simcall.args[7].dp = (void*) argv;
660     self->simcall.args[8].dp = (void*) properties;
661     self->simcall.args[9].i = (int) auto_restart;
662     if (self != simix_global->maestro_process) {
663       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
664                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
665       SIMIX_process_yield(self);
666     } else {
667       SIMIX_simcall_pre(&self->simcall, 0);
668     }    
669     
670   }
671   inline static void simcall_BODY_process_kill(smx_process_t process) {
672     smx_process_t self = SIMIX_process_self();
673     self->simcall.call = SIMCALL_PROCESS_KILL;
674     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
675     memset(self->simcall.args, 0, sizeof(self->simcall.args));
676     self->simcall.args[0].dp = (void*) process;
677     if (self != simix_global->maestro_process) {
678       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
679                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
680       SIMIX_process_yield(self);
681     } else {
682       SIMIX_simcall_pre(&self->simcall, 0);
683     }    
684     
685   }
686   inline static void simcall_BODY_process_killall(int reset_pid) {
687     smx_process_t self = SIMIX_process_self();
688     self->simcall.call = SIMCALL_PROCESS_KILLALL;
689     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
690     memset(self->simcall.args, 0, sizeof(self->simcall.args));
691     self->simcall.args[0].i = (int) reset_pid;
692     if (self != simix_global->maestro_process) {
693       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
694                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
695       SIMIX_process_yield(self);
696     } else {
697       SIMIX_simcall_pre(&self->simcall, 0);
698     }    
699     
700   }
701   inline static void simcall_BODY_process_cleanup(smx_process_t process) {
702     smx_process_t self = SIMIX_process_self();
703     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
704     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
705     memset(self->simcall.args, 0, sizeof(self->simcall.args));
706     self->simcall.args[0].dp = (void*) process;
707     if (self != simix_global->maestro_process) {
708       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
709                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
710       SIMIX_process_yield(self);
711     } else {
712       SIMIX_simcall_pre(&self->simcall, 0);
713     }    
714     
715   }
716   inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
717     smx_process_t self = SIMIX_process_self();
718     self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
719     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
720     memset(self->simcall.args, 0, sizeof(self->simcall.args));
721     self->simcall.args[0].dp = (void*) process;
722     self->simcall.args[1].dp = (void*) dest;
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_suspend(smx_process_t process) {
733     smx_process_t self = SIMIX_process_self();
734     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
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     if (self != simix_global->maestro_process) {
739       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
740                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
741       SIMIX_process_yield(self);
742     } else {
743       SIMIX_simcall_pre(&self->simcall, 0);
744     }    
745     
746   }
747   inline static void simcall_BODY_process_resume(smx_process_t process) {
748     smx_process_t self = SIMIX_process_self();
749     self->simcall.call = SIMCALL_PROCESS_RESUME;
750     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
751     memset(self->simcall.args, 0, sizeof(self->simcall.args));
752     self->simcall.args[0].dp = (void*) process;
753     if (self != simix_global->maestro_process) {
754       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
755                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
756       SIMIX_process_yield(self);
757     } else {
758       SIMIX_simcall_pre(&self->simcall, 0);
759     }    
760     
761   }
762   inline static int simcall_BODY_process_count() {
763     smx_process_t self = SIMIX_process_self();
764     self->simcall.call = SIMCALL_PROCESS_COUNT;
765     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
766     memset(self->simcall.args, 0, sizeof(self->simcall.args));
767
768     if (self != simix_global->maestro_process) {
769       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
770                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
771       SIMIX_process_yield(self);
772     } else {
773       SIMIX_simcall_pre(&self->simcall, 0);
774     }    
775     return self->simcall.result.i;
776   }
777   inline static int simcall_BODY_process_get_PID(smx_process_t process) {
778     smx_process_t self = SIMIX_process_self();
779     self->simcall.call = SIMCALL_PROCESS_GET_PID;
780     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
781     memset(self->simcall.args, 0, sizeof(self->simcall.args));
782     self->simcall.args[0].dp = (void*) process;
783     if (self != simix_global->maestro_process) {
784       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
785                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
786       SIMIX_process_yield(self);
787     } else {
788       SIMIX_simcall_pre(&self->simcall, 0);
789     }    
790     return self->simcall.result.i;
791   }
792   inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
793     smx_process_t self = SIMIX_process_self();
794     self->simcall.call = SIMCALL_PROCESS_GET_PPID;
795     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
796     memset(self->simcall.args, 0, sizeof(self->simcall.args));
797     self->simcall.args[0].dp = (void*) process;
798     if (self != simix_global->maestro_process) {
799       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
800                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
801       SIMIX_process_yield(self);
802     } else {
803       SIMIX_simcall_pre(&self->simcall, 0);
804     }    
805     return self->simcall.result.i;
806   }
807   inline static void* simcall_BODY_process_get_data(smx_process_t process) {
808     smx_process_t self = SIMIX_process_self();
809     self->simcall.call = SIMCALL_PROCESS_GET_DATA;
810     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
811     memset(self->simcall.args, 0, sizeof(self->simcall.args));
812     self->simcall.args[0].dp = (void*) process;
813     if (self != simix_global->maestro_process) {
814       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
815                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
816       SIMIX_process_yield(self);
817     } else {
818       SIMIX_simcall_pre(&self->simcall, 0);
819     }    
820     return self->simcall.result.dp;
821   }
822   inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
823     smx_process_t self = SIMIX_process_self();
824     self->simcall.call = SIMCALL_PROCESS_SET_DATA;
825     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
826     memset(self->simcall.args, 0, sizeof(self->simcall.args));
827     self->simcall.args[0].dp = (void*) process;
828     self->simcall.args[1].dp = (void*) data;
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     
837   }
838   inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
839     smx_process_t self = SIMIX_process_self();
840     self->simcall.call = SIMCALL_PROCESS_GET_HOST;
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     if (self != simix_global->maestro_process) {
845       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
846                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
847       SIMIX_process_yield(self);
848     } else {
849       SIMIX_simcall_pre(&self->simcall, 0);
850     }    
851     return self->simcall.result.dp;
852   }
853   inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
854     smx_process_t self = SIMIX_process_self();
855     self->simcall.call = SIMCALL_PROCESS_GET_NAME;
856     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
857     memset(self->simcall.args, 0, sizeof(self->simcall.args));
858     self->simcall.args[0].dp = (void*) process;
859     if (self != simix_global->maestro_process) {
860       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
861                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
862       SIMIX_process_yield(self);
863     } else {
864       SIMIX_simcall_pre(&self->simcall, 0);
865     }    
866     return self->simcall.result.cc;
867   }
868   inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
869     smx_process_t self = SIMIX_process_self();
870     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
871     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
872     memset(self->simcall.args, 0, sizeof(self->simcall.args));
873     self->simcall.args[0].dp = (void*) process;
874     if (self != simix_global->maestro_process) {
875       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
876                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
877       SIMIX_process_yield(self);
878     } else {
879       SIMIX_simcall_pre(&self->simcall, 0);
880     }    
881     return self->simcall.result.i;
882   }
883   inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
884     smx_process_t self = SIMIX_process_self();
885     self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
886     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
887     memset(self->simcall.args, 0, sizeof(self->simcall.args));
888     self->simcall.args[0].dp = (void*) process;
889     if (self != simix_global->maestro_process) {
890       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
891                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
892       SIMIX_process_yield(self);
893     } else {
894       SIMIX_simcall_pre(&self->simcall, 0);
895     }    
896     return self->simcall.result.dp;
897   }
898   inline static int simcall_BODY_process_sleep(double duration) {
899     smx_process_t self = SIMIX_process_self();
900     self->simcall.call = SIMCALL_PROCESS_SLEEP;
901     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
902     memset(self->simcall.args, 0, sizeof(self->simcall.args));
903     self->simcall.args[0].d = (double) duration;
904     if (self != simix_global->maestro_process) {
905       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
906                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
907       SIMIX_process_yield(self);
908     } else {
909       SIMIX_simcall_pre(&self->simcall, 0);
910     }    
911     return self->simcall.result.i;
912   }
913   inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void* data) {
914     smx_process_t self = SIMIX_process_self();
915     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
916     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
917     memset(self->simcall.args, 0, sizeof(self->simcall.args));
918     self->simcall.args[0].dp = (void*) process;
919     self->simcall.args[1].fp = (FPtr) fun;
920     self->simcall.args[2].dp = (void*) data;
921     if (self != simix_global->maestro_process) {
922       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
923                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
924       SIMIX_process_yield(self);
925     } else {
926       SIMIX_simcall_pre(&self->simcall, 0);
927     }    
928     
929   }
930   inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
931     smx_process_t self = SIMIX_process_self();
932     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
933     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
934     memset(self->simcall.args, 0, sizeof(self->simcall.args));
935     self->simcall.args[0].dp = (void*) process;
936     self->simcall.args[1].i = (int) auto_restart;
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 smx_process_t simcall_BODY_process_restart(smx_process_t process) {
947     smx_process_t self = SIMIX_process_self();
948     self->simcall.call = SIMCALL_PROCESS_RESTART;
949     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
950     memset(self->simcall.args, 0, sizeof(self->simcall.args));
951     self->simcall.args[0].dp = (void*) process;
952     if (self != simix_global->maestro_process) {
953       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
954                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
955       SIMIX_process_yield(self);
956     } else {
957       SIMIX_simcall_pre(&self->simcall, 0);
958     }    
959     return self->simcall.result.dp;
960   }
961   inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
962     smx_process_t self = SIMIX_process_self();
963     self->simcall.call = SIMCALL_RDV_CREATE;
964     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
965     memset(self->simcall.args, 0, sizeof(self->simcall.args));
966     self->simcall.args[0].cc = (const char*) name;
967     if (self != simix_global->maestro_process) {
968       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
969                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
970       SIMIX_process_yield(self);
971     } else {
972       SIMIX_simcall_pre(&self->simcall, 0);
973     }    
974     return self->simcall.result.dp;
975   }
976   inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
977     smx_process_t self = SIMIX_process_self();
978     self->simcall.call = SIMCALL_RDV_DESTROY;
979     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
980     memset(self->simcall.args, 0, sizeof(self->simcall.args));
981     self->simcall.args[0].dp = (void*) rdv;
982     if (self != simix_global->maestro_process) {
983       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
984                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
985       SIMIX_process_yield(self);
986     } else {
987       SIMIX_simcall_pre(&self->simcall, 0);
988     }    
989     
990   }
991   inline static smx_host_t simcall_BODY_rdv_get_by_name(const char* name) {
992     smx_process_t self = SIMIX_process_self();
993     self->simcall.call = SIMCALL_RDV_GET_BY_NAME;
994     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
995     memset(self->simcall.args, 0, sizeof(self->simcall.args));
996     self->simcall.args[0].cc = (const char*) name;
997     if (self != simix_global->maestro_process) {
998       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
999                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1000       SIMIX_process_yield(self);
1001     } else {
1002       SIMIX_simcall_pre(&self->simcall, 0);
1003     }    
1004     return self->simcall.result.dp;
1005   }
1006   inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
1007     smx_process_t self = SIMIX_process_self();
1008     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1009     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1010     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1011     self->simcall.args[0].dp = (void*) rdv;
1012     self->simcall.args[1].dp = (void*) host;
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.ui;
1021   }
1022   inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1023     smx_process_t self = SIMIX_process_self();
1024     self->simcall.call = SIMCALL_RDV_GET_HEAD;
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     if (self != simix_global->maestro_process) {
1029       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1030                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1031       SIMIX_process_yield(self);
1032     } else {
1033       SIMIX_simcall_pre(&self->simcall, 0);
1034     }    
1035     return self->simcall.result.dp;
1036   }
1037   inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1038     smx_process_t self = SIMIX_process_self();
1039     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1040     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1041     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1042     self->simcall.args[0].dp = (void*) rdv;
1043     self->simcall.args[1].dp = (void*) receiver;
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     
1052   }
1053   inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1054     smx_process_t self = SIMIX_process_self();
1055     self->simcall.call = SIMCALL_RDV_GET_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     if (self != simix_global->maestro_process) {
1060       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1061                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1062       SIMIX_process_yield(self);
1063     } else {
1064       SIMIX_simcall_pre(&self->simcall, 0);
1065     }    
1066     return self->simcall.result.dp;
1067   }
1068   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) {
1069     smx_process_t self = SIMIX_process_self();
1070     self->simcall.call = SIMCALL_COMM_IPROBE;
1071     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1072     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1073     self->simcall.args[0].dp = (void*) rdv;
1074     self->simcall.args[1].i = (int) src;
1075     self->simcall.args[2].i = (int) tag;
1076     self->simcall.args[3].fp = (FPtr) match_fun;
1077     self->simcall.args[4].dp = (void*) data;
1078     if (self != simix_global->maestro_process) {
1079       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1080                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1081       SIMIX_process_yield(self);
1082     } else {
1083       SIMIX_simcall_pre(&self->simcall, 0);
1084     }    
1085     return self->simcall.result.dp;
1086   }
1087   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) {
1088     smx_process_t self = SIMIX_process_self();
1089     self->simcall.call = SIMCALL_COMM_SEND;
1090     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1091     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1092     self->simcall.args[0].dp = (void*) rdv;
1093     self->simcall.args[1].d = (double) task_size;
1094     self->simcall.args[2].d = (double) rate;
1095     self->simcall.args[3].dp = (void*) src_buff;
1096     self->simcall.args[4].sz = (size_t) src_buff_size;
1097     self->simcall.args[5].fp = (FPtr) match_fun;
1098     self->simcall.args[6].dp = (void*) data;
1099     self->simcall.args[7].d = (double) timeout;
1100     if (self != simix_global->maestro_process) {
1101       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1102                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1103       SIMIX_process_yield(self);
1104     } else {
1105       SIMIX_simcall_pre(&self->simcall, 0);
1106     }    
1107     
1108   }
1109   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) {
1110     smx_process_t self = SIMIX_process_self();
1111     self->simcall.call = SIMCALL_COMM_ISEND;
1112     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1113     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1114     self->simcall.args[0].dp = (void*) rdv;
1115     self->simcall.args[1].d = (double) task_size;
1116     self->simcall.args[2].d = (double) rate;
1117     self->simcall.args[3].dp = (void*) src_buff;
1118     self->simcall.args[4].sz = (size_t) src_buff_size;
1119     self->simcall.args[5].fp = (FPtr) match_fun;
1120     self->simcall.args[6].fp = (FPtr) clean_fun;
1121     self->simcall.args[7].dp = (void*) data;
1122     self->simcall.args[8].i = (int) detached;
1123     if (self != simix_global->maestro_process) {
1124       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1125                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1126       SIMIX_process_yield(self);
1127     } else {
1128       SIMIX_simcall_pre(&self->simcall, 0);
1129     }    
1130     return self->simcall.result.dp;
1131   }
1132   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) {
1133     smx_process_t self = SIMIX_process_self();
1134     self->simcall.call = SIMCALL_COMM_RECV;
1135     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1136     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1137     self->simcall.args[0].dp = (void*) rdv;
1138     self->simcall.args[1].dp = (void*) dst_buff;
1139     self->simcall.args[2].dp = (void*) dst_buff_size;
1140     self->simcall.args[3].fp = (FPtr) match_fun;
1141     self->simcall.args[4].dp = (void*) data;
1142     self->simcall.args[5].d = (double) timeout;
1143     self->simcall.args[6].d = (double) rate;
1144     if (self != simix_global->maestro_process) {
1145       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1146                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1147       SIMIX_process_yield(self);
1148     } else {
1149       SIMIX_simcall_pre(&self->simcall, 0);
1150     }    
1151     
1152   }
1153   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) {
1154     smx_process_t self = SIMIX_process_self();
1155     self->simcall.call = SIMCALL_COMM_IRECV;
1156     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1157     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1158     self->simcall.args[0].dp = (void*) rdv;
1159     self->simcall.args[1].dp = (void*) dst_buff;
1160     self->simcall.args[2].dp = (void*) dst_buff_size;
1161     self->simcall.args[3].fp = (FPtr) match_fun;
1162     self->simcall.args[4].dp = (void*) data;
1163     self->simcall.args[5].d = (double) rate;
1164     if (self != simix_global->maestro_process) {
1165       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1166                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1167       SIMIX_process_yield(self);
1168     } else {
1169       SIMIX_simcall_pre(&self->simcall, 0);
1170     }    
1171     return self->simcall.result.dp;
1172   }
1173   inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
1174     smx_process_t self = SIMIX_process_self();
1175     self->simcall.call = SIMCALL_COMM_CANCEL;
1176     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1177     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1178     self->simcall.args[0].dp = (void*) comm;
1179     if (self != simix_global->maestro_process) {
1180       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1181                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1182       SIMIX_process_yield(self);
1183     } else {
1184       SIMIX_simcall_pre(&self->simcall, 0);
1185     }    
1186     
1187   }
1188   inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1189     smx_process_t self = SIMIX_process_self();
1190     self->simcall.call = SIMCALL_COMM_WAITANY;
1191     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1192     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1193     self->simcall.args[0].dp = (void*) comms;
1194     if (self != simix_global->maestro_process) {
1195       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1196                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1197       SIMIX_process_yield(self);
1198     } else {
1199       SIMIX_simcall_pre(&self->simcall, 0);
1200     }    
1201     return self->simcall.result.i;
1202   }
1203   inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
1204     smx_process_t self = SIMIX_process_self();
1205     self->simcall.call = SIMCALL_COMM_WAIT;
1206     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1207     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1208     self->simcall.args[0].dp = (void*) comm;
1209     self->simcall.args[1].d = (double) timeout;
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_test(smx_action_t comm) {
1220     smx_process_t self = SIMIX_process_self();
1221     self->simcall.call = SIMCALL_COMM_TEST;
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*) comm;
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 int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1235     smx_process_t self = SIMIX_process_self();
1236     self->simcall.call = SIMCALL_COMM_TESTANY;
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*) comms;
1240     if (self != simix_global->maestro_process) {
1241       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1242                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1243       SIMIX_process_yield(self);
1244     } else {
1245       SIMIX_simcall_pre(&self->simcall, 0);
1246     }    
1247     return self->simcall.result.i;
1248   }
1249   inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
1250     smx_process_t self = SIMIX_process_self();
1251     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1252     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1253     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1254     self->simcall.args[0].dp = (void*) comm;
1255     if (self != simix_global->maestro_process) {
1256       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1257                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1258       SIMIX_process_yield(self);
1259     } else {
1260       SIMIX_simcall_pre(&self->simcall, 0);
1261     }    
1262     return self->simcall.result.d;
1263   }
1264   inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
1265     smx_process_t self = SIMIX_process_self();
1266     self->simcall.call = SIMCALL_COMM_GET_STATE;
1267     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1268     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1269     self->simcall.args[0].dp = (void*) comm;
1270     if (self != simix_global->maestro_process) {
1271       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1272                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1273       SIMIX_process_yield(self);
1274     } else {
1275       SIMIX_simcall_pre(&self->simcall, 0);
1276     }    
1277     return self->simcall.result.i;
1278   }
1279   inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
1280     smx_process_t self = SIMIX_process_self();
1281     self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1282     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1283     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1284     self->simcall.args[0].dp = (void*) comm;
1285     if (self != simix_global->maestro_process) {
1286       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1287                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1288       SIMIX_process_yield(self);
1289     } else {
1290       SIMIX_simcall_pre(&self->simcall, 0);
1291     }    
1292     return self->simcall.result.dp;
1293   }
1294   inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
1295     smx_process_t self = SIMIX_process_self();
1296     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1297     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1298     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1299     self->simcall.args[0].dp = (void*) comm;
1300     if (self != simix_global->maestro_process) {
1301       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1302                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1303       SIMIX_process_yield(self);
1304     } else {
1305       SIMIX_simcall_pre(&self->simcall, 0);
1306     }    
1307     return self->simcall.result.dp;
1308   }
1309   inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
1310     smx_process_t self = SIMIX_process_self();
1311     self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1312     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1313     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1314     self->simcall.args[0].dp = (void*) comm;
1315     if (self != simix_global->maestro_process) {
1316       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1317                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1318       SIMIX_process_yield(self);
1319     } else {
1320       SIMIX_simcall_pre(&self->simcall, 0);
1321     }    
1322     return self->simcall.result.dp;
1323   }
1324   inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
1325     smx_process_t self = SIMIX_process_self();
1326     self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1327     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1328     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1329     self->simcall.args[0].dp = (void*) comm;
1330     if (self != simix_global->maestro_process) {
1331       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1332                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1333       SIMIX_process_yield(self);
1334     } else {
1335       SIMIX_simcall_pre(&self->simcall, 0);
1336     }    
1337     return self->simcall.result.dp;
1338   }
1339   inline static smx_mutex_t simcall_BODY_mutex_init() {
1340     smx_process_t self = SIMIX_process_self();
1341     self->simcall.call = SIMCALL_MUTEX_INIT;
1342     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1343     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1344
1345     if (self != simix_global->maestro_process) {
1346       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1347                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1348       SIMIX_process_yield(self);
1349     } else {
1350       SIMIX_simcall_pre(&self->simcall, 0);
1351     }    
1352     return self->simcall.result.dp;
1353   }
1354   inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1355     smx_process_t self = SIMIX_process_self();
1356     self->simcall.call = SIMCALL_MUTEX_DESTROY;
1357     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1358     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1359     self->simcall.args[0].dp = (void*) mutex;
1360     if (self != simix_global->maestro_process) {
1361       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1362                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1363       SIMIX_process_yield(self);
1364     } else {
1365       SIMIX_simcall_pre(&self->simcall, 0);
1366     }    
1367     
1368   }
1369   inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1370     smx_process_t self = SIMIX_process_self();
1371     self->simcall.call = SIMCALL_MUTEX_LOCK;
1372     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1373     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1374     self->simcall.args[0].dp = (void*) mutex;
1375     if (self != simix_global->maestro_process) {
1376       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1377                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1378       SIMIX_process_yield(self);
1379     } else {
1380       SIMIX_simcall_pre(&self->simcall, 0);
1381     }    
1382     
1383   }
1384   inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1385     smx_process_t self = SIMIX_process_self();
1386     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1387     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1388     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1389     self->simcall.args[0].dp = (void*) mutex;
1390     if (self != simix_global->maestro_process) {
1391       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1392                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1393       SIMIX_process_yield(self);
1394     } else {
1395       SIMIX_simcall_pre(&self->simcall, 0);
1396     }    
1397     return self->simcall.result.i;
1398   }
1399   inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1400     smx_process_t self = SIMIX_process_self();
1401     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1402     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1403     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1404     self->simcall.args[0].dp = (void*) mutex;
1405     if (self != simix_global->maestro_process) {
1406       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1407                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1408       SIMIX_process_yield(self);
1409     } else {
1410       SIMIX_simcall_pre(&self->simcall, 0);
1411     }    
1412     
1413   }
1414   inline static smx_cond_t simcall_BODY_cond_init() {
1415     smx_process_t self = SIMIX_process_self();
1416     self->simcall.call = SIMCALL_COND_INIT;
1417     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1418     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1419
1420     if (self != simix_global->maestro_process) {
1421       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1422                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1423       SIMIX_process_yield(self);
1424     } else {
1425       SIMIX_simcall_pre(&self->simcall, 0);
1426     }    
1427     return self->simcall.result.dp;
1428   }
1429   inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
1430     smx_process_t self = SIMIX_process_self();
1431     self->simcall.call = SIMCALL_COND_DESTROY;
1432     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1433     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1434     self->simcall.args[0].dp = (void*) cond;
1435     if (self != simix_global->maestro_process) {
1436       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1437                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1438       SIMIX_process_yield(self);
1439     } else {
1440       SIMIX_simcall_pre(&self->simcall, 0);
1441     }    
1442     
1443   }
1444   inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
1445     smx_process_t self = SIMIX_process_self();
1446     self->simcall.call = SIMCALL_COND_SIGNAL;
1447     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1448     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1449     self->simcall.args[0].dp = (void*) cond;
1450     if (self != simix_global->maestro_process) {
1451       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1452                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1453       SIMIX_process_yield(self);
1454     } else {
1455       SIMIX_simcall_pre(&self->simcall, 0);
1456     }    
1457     
1458   }
1459   inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
1460     smx_process_t self = SIMIX_process_self();
1461     self->simcall.call = SIMCALL_COND_WAIT;
1462     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1463     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1464     self->simcall.args[0].dp = (void*) cond;
1465     self->simcall.args[1].dp = (void*) mutex;
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_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1476     smx_process_t self = SIMIX_process_self();
1477     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
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     self->simcall.args[1].dp = (void*) mutex;
1482     self->simcall.args[2].d = (double) timeout;
1483     if (self != simix_global->maestro_process) {
1484       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1485                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1486       SIMIX_process_yield(self);
1487     } else {
1488       SIMIX_simcall_pre(&self->simcall, 0);
1489     }    
1490     
1491   }
1492   inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1493     smx_process_t self = SIMIX_process_self();
1494     self->simcall.call = SIMCALL_COND_BROADCAST;
1495     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1496     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1497     self->simcall.args[0].dp = (void*) cond;
1498     if (self != simix_global->maestro_process) {
1499       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1500                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1501       SIMIX_process_yield(self);
1502     } else {
1503       SIMIX_simcall_pre(&self->simcall, 0);
1504     }    
1505     
1506   }
1507   inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
1508     smx_process_t self = SIMIX_process_self();
1509     self->simcall.call = SIMCALL_SEM_INIT;
1510     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1511     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1512     self->simcall.args[0].i = (int) capacity;
1513     if (self != simix_global->maestro_process) {
1514       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1515                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1516       SIMIX_process_yield(self);
1517     } else {
1518       SIMIX_simcall_pre(&self->simcall, 0);
1519     }    
1520     return self->simcall.result.dp;
1521   }
1522   inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
1523     smx_process_t self = SIMIX_process_self();
1524     self->simcall.call = SIMCALL_SEM_DESTROY;
1525     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1526     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1527     self->simcall.args[0].dp = (void*) sem;
1528     if (self != simix_global->maestro_process) {
1529       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1530                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1531       SIMIX_process_yield(self);
1532     } else {
1533       SIMIX_simcall_pre(&self->simcall, 0);
1534     }    
1535     
1536   }
1537   inline static void simcall_BODY_sem_release(smx_sem_t sem) {
1538     smx_process_t self = SIMIX_process_self();
1539     self->simcall.call = SIMCALL_SEM_RELEASE;
1540     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1541     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1542     self->simcall.args[0].dp = (void*) sem;
1543     if (self != simix_global->maestro_process) {
1544       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1545                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1546       SIMIX_process_yield(self);
1547     } else {
1548       SIMIX_simcall_pre(&self->simcall, 0);
1549     }    
1550     
1551   }
1552   inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
1553     smx_process_t self = SIMIX_process_self();
1554     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
1555     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1556     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1557     self->simcall.args[0].dp = (void*) sem;
1558     if (self != simix_global->maestro_process) {
1559       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1560                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1561       SIMIX_process_yield(self);
1562     } else {
1563       SIMIX_simcall_pre(&self->simcall, 0);
1564     }    
1565     return self->simcall.result.i;
1566   }
1567   inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
1568     smx_process_t self = SIMIX_process_self();
1569     self->simcall.call = SIMCALL_SEM_ACQUIRE;
1570     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1571     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1572     self->simcall.args[0].dp = (void*) sem;
1573     if (self != simix_global->maestro_process) {
1574       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1575                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1576       SIMIX_process_yield(self);
1577     } else {
1578       SIMIX_simcall_pre(&self->simcall, 0);
1579     }    
1580     
1581   }
1582   inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
1583     smx_process_t self = SIMIX_process_self();
1584     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
1585     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1586     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1587     self->simcall.args[0].dp = (void*) sem;
1588     self->simcall.args[1].d = (double) timeout;
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     
1597   }
1598   inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
1599     smx_process_t self = SIMIX_process_self();
1600     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
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     return self->simcall.result.i;
1612   }
1613   inline static void* simcall_BODY_file_get_data(smx_file_t fd) {
1614     smx_process_t self = SIMIX_process_self();
1615     self->simcall.call = SIMCALL_FILE_GET_DATA;
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*) fd;
1619     if (self != simix_global->maestro_process) {
1620       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1621                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1622       SIMIX_process_yield(self);
1623     } else {
1624       SIMIX_simcall_pre(&self->simcall, 0);
1625     }    
1626     return self->simcall.result.dp;
1627   }
1628   inline static void simcall_BODY_file_set_data(smx_file_t fd, void* data) {
1629     smx_process_t self = SIMIX_process_self();
1630     self->simcall.call = SIMCALL_FILE_SET_DATA;
1631     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1632     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1633     self->simcall.args[0].dp = (void*) fd;
1634     self->simcall.args[1].dp = (void*) data;
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     
1643   }
1644   inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size) {
1645     smx_process_t self = SIMIX_process_self();
1646     self->simcall.call = SIMCALL_FILE_READ;
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     self->simcall.args[1].sgsz = (sg_size_t) size;
1651     if (self != simix_global->maestro_process) {
1652       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1653                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1654       SIMIX_process_yield(self);
1655     } else {
1656       SIMIX_simcall_pre(&self->simcall, 0);
1657     }    
1658     return self->simcall.result.sgsz;
1659   }
1660   inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size) {
1661     smx_process_t self = SIMIX_process_self();
1662     self->simcall.call = SIMCALL_FILE_WRITE;
1663     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1664     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1665     self->simcall.args[0].dp = (void*) fd;
1666     self->simcall.args[1].sgsz = (sg_size_t) size;
1667     if (self != simix_global->maestro_process) {
1668       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1669                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1670       SIMIX_process_yield(self);
1671     } else {
1672       SIMIX_simcall_pre(&self->simcall, 0);
1673     }    
1674     return self->simcall.result.sgsz;
1675   }
1676   inline static smx_file_t simcall_BODY_file_open(const char* mount, const char* path) {
1677     smx_process_t self = SIMIX_process_self();
1678     self->simcall.call = SIMCALL_FILE_OPEN;
1679     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1680     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1681     self->simcall.args[0].cc = (const char*) mount;
1682     self->simcall.args[1].cc = (const char*) path;
1683     if (self != simix_global->maestro_process) {
1684       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1685                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1686       SIMIX_process_yield(self);
1687     } else {
1688       SIMIX_simcall_pre(&self->simcall, 0);
1689     }    
1690     return self->simcall.result.dp;
1691   }
1692   inline static int simcall_BODY_file_close(smx_file_t fd) {
1693     smx_process_t self = SIMIX_process_self();
1694     self->simcall.call = SIMCALL_FILE_CLOSE;
1695     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1696     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1697     self->simcall.args[0].dp = (void*) fd;
1698     if (self != simix_global->maestro_process) {
1699       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1700                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1701       SIMIX_process_yield(self);
1702     } else {
1703       SIMIX_simcall_pre(&self->simcall, 0);
1704     }    
1705     return self->simcall.result.i;
1706   }
1707   inline static int simcall_BODY_file_unlink(smx_file_t fd) {
1708     smx_process_t self = SIMIX_process_self();
1709     self->simcall.call = SIMCALL_FILE_UNLINK;
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].dp = (void*) fd;
1713     if (self != simix_global->maestro_process) {
1714       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1715                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1716       SIMIX_process_yield(self);
1717     } else {
1718       SIMIX_simcall_pre(&self->simcall, 0);
1719     }    
1720     return self->simcall.result.i;
1721   }
1722   inline static xbt_dict_t simcall_BODY_file_ls(const char* mount, const char* path) {
1723     smx_process_t self = SIMIX_process_self();
1724     self->simcall.call = SIMCALL_FILE_LS;
1725     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1726     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1727     self->simcall.args[0].cc = (const char*) mount;
1728     self->simcall.args[1].cc = (const char*) path;
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.dp;
1737   }
1738   inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
1739     smx_process_t self = SIMIX_process_self();
1740     self->simcall.call = SIMCALL_FILE_GET_SIZE;
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.sgsz;
1752   }
1753   inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
1754     smx_process_t self = SIMIX_process_self();
1755     self->simcall.call = SIMCALL_FILE_TELL;
1756     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1757     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1758     self->simcall.args[0].dp = (void*) fd;
1759     if (self != simix_global->maestro_process) {
1760       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1761                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1762       SIMIX_process_yield(self);
1763     } else {
1764       SIMIX_simcall_pre(&self->simcall, 0);
1765     }    
1766     return self->simcall.result.sgsz;
1767   }
1768   inline static int simcall_BODY_file_seek(smx_file_t fd, sg_size_t offset, int origin) {
1769     smx_process_t self = SIMIX_process_self();
1770     self->simcall.call = SIMCALL_FILE_SEEK;
1771     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1772     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1773     self->simcall.args[0].dp = (void*) fd;
1774     self->simcall.args[1].sgsz = (sg_size_t) offset;
1775     self->simcall.args[2].i = (int) origin;
1776     if (self != simix_global->maestro_process) {
1777       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1778                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1779       SIMIX_process_yield(self);
1780     } else {
1781       SIMIX_simcall_pre(&self->simcall, 0);
1782     }    
1783     return self->simcall.result.i;
1784   }
1785   inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
1786     smx_process_t self = SIMIX_process_self();
1787     self->simcall.call = SIMCALL_FILE_GET_INFO;
1788     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1789     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1790     self->simcall.args[0].dp = (void*) fd;
1791     if (self != simix_global->maestro_process) {
1792       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1793                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1794       SIMIX_process_yield(self);
1795     } else {
1796       SIMIX_simcall_pre(&self->simcall, 0);
1797     }    
1798     return self->simcall.result.dp;
1799   }
1800   inline static void simcall_BODY_storage_file_rename(smx_storage_t storage, const char* src, const char* dest) {
1801     smx_process_t self = SIMIX_process_self();
1802     self->simcall.call = SIMCALL_STORAGE_FILE_RENAME;
1803     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1804     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1805     self->simcall.args[0].dp = (void*) storage;
1806     self->simcall.args[1].cc = (const char*) src;
1807     self->simcall.args[2].cc = (const char*) dest;
1808     if (self != simix_global->maestro_process) {
1809       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1810                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1811       SIMIX_process_yield(self);
1812     } else {
1813       SIMIX_simcall_pre(&self->simcall, 0);
1814     }    
1815     
1816   }
1817   inline static sg_size_t simcall_BODY_storage_get_free_size(const char* name) {
1818     smx_process_t self = SIMIX_process_self();
1819     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
1820     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1821     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1822     self->simcall.args[0].cc = (const char*) name;
1823     if (self != simix_global->maestro_process) {
1824       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1825                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1826       SIMIX_process_yield(self);
1827     } else {
1828       SIMIX_simcall_pre(&self->simcall, 0);
1829     }    
1830     return self->simcall.result.sgsz;
1831   }
1832   inline static sg_size_t simcall_BODY_storage_get_used_size(const char* name) {
1833     smx_process_t self = SIMIX_process_self();
1834     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
1835     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1836     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1837     self->simcall.args[0].cc = (const char*) name;
1838     if (self != simix_global->maestro_process) {
1839       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1840                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1841       SIMIX_process_yield(self);
1842     } else {
1843       SIMIX_simcall_pre(&self->simcall, 0);
1844     }    
1845     return self->simcall.result.sgsz;
1846   }
1847   inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
1848     smx_process_t self = SIMIX_process_self();
1849     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
1850     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1851     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1852     self->simcall.args[0].dp = (void*) storage;
1853     if (self != simix_global->maestro_process) {
1854       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1855                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1856       SIMIX_process_yield(self);
1857     } else {
1858       SIMIX_simcall_pre(&self->simcall, 0);
1859     }    
1860     return self->simcall.result.dp;
1861   }
1862   inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
1863     smx_process_t self = SIMIX_process_self();
1864     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
1865     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1866     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1867     self->simcall.args[0].dp = (void*) storage;
1868     if (self != simix_global->maestro_process) {
1869       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1870                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1871       SIMIX_process_yield(self);
1872     } else {
1873       SIMIX_simcall_pre(&self->simcall, 0);
1874     }    
1875     return self->simcall.result.dp;
1876   }
1877   inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
1878     smx_process_t self = SIMIX_process_self();
1879     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
1880     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1881     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1882     self->simcall.args[0].cc = (const char*) name;
1883     if (self != simix_global->maestro_process) {
1884       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1885                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1886       SIMIX_process_yield(self);
1887     } else {
1888       SIMIX_simcall_pre(&self->simcall, 0);
1889     }    
1890     return self->simcall.result.dp;
1891   }
1892 #ifdef HAVE_LATENCY_BOUND_TRACKING
1893   inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
1894     smx_process_t self = SIMIX_process_self();
1895     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
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*) comm;
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.i;
1907   }
1908 #endif
1909
1910 #ifdef HAVE_TRACING
1911   inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
1912     smx_process_t self = SIMIX_process_self();
1913     self->simcall.call = SIMCALL_SET_CATEGORY;
1914     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1915     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1916     self->simcall.args[0].dp = (void*) action;
1917     self->simcall.args[1].cc = (const char*) category;
1918     if (self != simix_global->maestro_process) {
1919       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1920                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1921       SIMIX_process_yield(self);
1922     } else {
1923       SIMIX_simcall_pre(&self->simcall, 0);
1924     }    
1925     
1926   }
1927 #endif
1928
1929 #ifdef HAVE_MC
1930   inline static void* simcall_BODY_mc_snapshot() {
1931     smx_process_t self = SIMIX_process_self();
1932     self->simcall.call = SIMCALL_MC_SNAPSHOT;
1933     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1934     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1935
1936     if (self != simix_global->maestro_process) {
1937       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1938                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1939       SIMIX_process_yield(self);
1940     } else {
1941       SIMIX_simcall_pre(&self->simcall, 0);
1942     }    
1943     return self->simcall.result.dp;
1944   }
1945   inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
1946     smx_process_t self = SIMIX_process_self();
1947     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
1948     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1949     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1950     self->simcall.args[0].dp = (void*) s1;
1951     self->simcall.args[1].dp = (void*) s2;
1952     if (self != simix_global->maestro_process) {
1953       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1954                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1955       SIMIX_process_yield(self);
1956     } else {
1957       SIMIX_simcall_pre(&self->simcall, 0);
1958     }    
1959     return self->simcall.result.i;
1960   }
1961   inline static int simcall_BODY_mc_random(int min, int max) {
1962     smx_process_t self = SIMIX_process_self();
1963     self->simcall.call = SIMCALL_MC_RANDOM;
1964     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1965     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1966     self->simcall.args[0].i = (int) min;
1967     self->simcall.args[1].i = (int) max;
1968     if (self != simix_global->maestro_process) {
1969       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1970                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1971       SIMIX_process_yield(self);
1972     } else {
1973       SIMIX_simcall_pre(&self->simcall, 0);
1974     }    
1975     return self->simcall.result.i;
1976   }
1977 #endif