Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[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_mounted_storage_list(smx_host_t host) {
401     smx_process_t self = SIMIX_process_self();
402     self->simcall.call = SIMCALL_HOST_GET_MOUNTED_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 xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
416     smx_process_t self = SIMIX_process_self();
417     self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
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*) host;
421     if (self != simix_global->maestro_process) {
422       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
423                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
424       SIMIX_process_yield(self);
425     } else {
426       SIMIX_simcall_pre(&self->simcall, 0);
427     }    
428     return self->simcall.result.dp;
429   }
430   inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
431     smx_process_t self = SIMIX_process_self();
432     self->simcall.call = SIMCALL_HOST_GET_PARAMS;
433     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
434     memset(self->simcall.args, 0, sizeof(self->simcall.args));
435     self->simcall.args[0].dp = (void*) ind_vm;
436     self->simcall.args[1].dp = (void*) params;
437     if (self != simix_global->maestro_process) {
438       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
439                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
440       SIMIX_process_yield(self);
441     } else {
442       SIMIX_simcall_pre(&self->simcall, 0);
443     }    
444     
445   }
446   inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
447     smx_process_t self = SIMIX_process_self();
448     self->simcall.call = SIMCALL_HOST_SET_PARAMS;
449     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
450     memset(self->simcall.args, 0, sizeof(self->simcall.args));
451     self->simcall.args[0].dp = (void*) ind_vm;
452     self->simcall.args[1].dp = (void*) params;
453     if (self != simix_global->maestro_process) {
454       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
455                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
456       SIMIX_process_yield(self);
457     } else {
458       SIMIX_simcall_pre(&self->simcall, 0);
459     }    
460     
461   }
462   inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
463     smx_process_t self = SIMIX_process_self();
464     self->simcall.call = SIMCALL_VM_CREATE;
465     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
466     memset(self->simcall.args, 0, sizeof(self->simcall.args));
467     self->simcall.args[0].cc = (const char*) name;
468     self->simcall.args[1].dp = (void*) ind_pm;
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     return self->simcall.result.dp;
477   }
478   inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
479     smx_process_t self = SIMIX_process_self();
480     self->simcall.call = SIMCALL_VM_START;
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     
492   }
493   inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
494     smx_process_t self = SIMIX_process_self();
495     self->simcall.call = SIMCALL_VM_GET_STATE;
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     if (self != simix_global->maestro_process) {
500       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
501                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
502       SIMIX_process_yield(self);
503     } else {
504       SIMIX_simcall_pre(&self->simcall, 0);
505     }    
506     return self->simcall.result.i;
507   }
508   inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
509     smx_process_t self = SIMIX_process_self();
510     self->simcall.call = SIMCALL_VM_MIGRATE;
511     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
512     memset(self->simcall.args, 0, sizeof(self->simcall.args));
513     self->simcall.args[0].dp = (void*) ind_vm;
514     self->simcall.args[1].dp = (void*) ind_dst_pm;
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     
523   }
524   inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
525     smx_process_t self = SIMIX_process_self();
526     self->simcall.call = SIMCALL_VM_GET_PM;
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     if (self != simix_global->maestro_process) {
531       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
532                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
533       SIMIX_process_yield(self);
534     } else {
535       SIMIX_simcall_pre(&self->simcall, 0);
536     }    
537     return self->simcall.result.dp;
538   }
539   inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
540     smx_process_t self = SIMIX_process_self();
541     self->simcall.call = SIMCALL_VM_SET_BOUND;
542     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
543     memset(self->simcall.args, 0, sizeof(self->simcall.args));
544     self->simcall.args[0].dp = (void*) ind_vm;
545     self->simcall.args[1].d = (double) bound;
546     if (self != simix_global->maestro_process) {
547       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
548                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
549       SIMIX_process_yield(self);
550     } else {
551       SIMIX_simcall_pre(&self->simcall, 0);
552     }    
553     
554   }
555   inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
556     smx_process_t self = SIMIX_process_self();
557     self->simcall.call = SIMCALL_VM_SET_AFFINITY;
558     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
559     memset(self->simcall.args, 0, sizeof(self->simcall.args));
560     self->simcall.args[0].dp = (void*) ind_vm;
561     self->simcall.args[1].dp = (void*) ind_pm;
562     self->simcall.args[2].ul = (unsigned long) mask;
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_destroy(smx_host_t ind_vm) {
573     smx_process_t self = SIMIX_process_self();
574     self->simcall.call = SIMCALL_VM_DESTROY;
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_suspend(smx_host_t ind_vm) {
588     smx_process_t self = SIMIX_process_self();
589     self->simcall.call = SIMCALL_VM_SUSPEND;
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_resume(smx_host_t ind_vm) {
603     smx_process_t self = SIMIX_process_self();
604     self->simcall.call = SIMCALL_VM_RESUME;
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_shutdown(smx_host_t ind_vm) {
618     smx_process_t self = SIMIX_process_self();
619     self->simcall.call = SIMCALL_VM_SHUTDOWN;
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_save(smx_host_t ind_vm) {
633     smx_process_t self = SIMIX_process_self();
634     self->simcall.call = SIMCALL_VM_SAVE;
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_vm_restore(smx_host_t ind_vm) {
648     smx_process_t self = SIMIX_process_self();
649     self->simcall.call = SIMCALL_VM_RESTORE;
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*) ind_vm;
653     if (self != simix_global->maestro_process) {
654       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
655                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
656       SIMIX_process_yield(self);
657     } else {
658       SIMIX_simcall_pre(&self->simcall, 0);
659     }    
660     
661   }
662   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) {
663     smx_process_t self = SIMIX_process_self();
664     self->simcall.call = SIMCALL_PROCESS_CREATE;
665     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
666     memset(self->simcall.args, 0, sizeof(self->simcall.args));
667     self->simcall.args[0].dp = (void*) process;
668     self->simcall.args[1].cc = (const char*) name;
669     self->simcall.args[2].fp = (FPtr) code;
670     self->simcall.args[3].dp = (void*) data;
671     self->simcall.args[4].cc = (const char*) hostname;
672     self->simcall.args[5].d = (double) kill_time;
673     self->simcall.args[6].i = (int) argc;
674     self->simcall.args[7].dp = (void*) argv;
675     self->simcall.args[8].dp = (void*) properties;
676     self->simcall.args[9].i = (int) auto_restart;
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_kill(smx_process_t process) {
687     smx_process_t self = SIMIX_process_self();
688     self->simcall.call = SIMCALL_PROCESS_KILL;
689     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
690     memset(self->simcall.args, 0, sizeof(self->simcall.args));
691     self->simcall.args[0].dp = (void*) process;
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_killall(int reset_pid) {
702     smx_process_t self = SIMIX_process_self();
703     self->simcall.call = SIMCALL_PROCESS_KILLALL;
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].i = (int) reset_pid;
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_cleanup(smx_process_t process) {
717     smx_process_t self = SIMIX_process_self();
718     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
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     if (self != simix_global->maestro_process) {
723       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
724                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
725       SIMIX_process_yield(self);
726     } else {
727       SIMIX_simcall_pre(&self->simcall, 0);
728     }    
729     
730   }
731   inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
732     smx_process_t self = SIMIX_process_self();
733     self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
734     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
735     memset(self->simcall.args, 0, sizeof(self->simcall.args));
736     self->simcall.args[0].dp = (void*) process;
737     self->simcall.args[1].dp = (void*) dest;
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_suspend(smx_process_t process) {
748     smx_process_t self = SIMIX_process_self();
749     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
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 void simcall_BODY_process_resume(smx_process_t process) {
763     smx_process_t self = SIMIX_process_self();
764     self->simcall.call = SIMCALL_PROCESS_RESUME;
765     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
766     memset(self->simcall.args, 0, sizeof(self->simcall.args));
767     self->simcall.args[0].dp = (void*) process;
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     
776   }
777   inline static int simcall_BODY_process_count() {
778     smx_process_t self = SIMIX_process_self();
779     self->simcall.call = SIMCALL_PROCESS_COUNT;
780     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
781     memset(self->simcall.args, 0, sizeof(self->simcall.args));
782
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_PID(smx_process_t process) {
793     smx_process_t self = SIMIX_process_self();
794     self->simcall.call = SIMCALL_PROCESS_GET_PID;
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 int simcall_BODY_process_get_PPID(smx_process_t process) {
808     smx_process_t self = SIMIX_process_self();
809     self->simcall.call = SIMCALL_PROCESS_GET_PPID;
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.i;
821   }
822   inline static void* simcall_BODY_process_get_data(smx_process_t process) {
823     smx_process_t self = SIMIX_process_self();
824     self->simcall.call = SIMCALL_PROCESS_GET_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     if (self != simix_global->maestro_process) {
829       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
830                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
831       SIMIX_process_yield(self);
832     } else {
833       SIMIX_simcall_pre(&self->simcall, 0);
834     }    
835     return self->simcall.result.dp;
836   }
837   inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
838     smx_process_t self = SIMIX_process_self();
839     self->simcall.call = SIMCALL_PROCESS_SET_DATA;
840     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
841     memset(self->simcall.args, 0, sizeof(self->simcall.args));
842     self->simcall.args[0].dp = (void*) process;
843     self->simcall.args[1].dp = (void*) data;
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     
852   }
853   inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
854     smx_process_t self = SIMIX_process_self();
855     self->simcall.call = SIMCALL_PROCESS_GET_HOST;
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.dp;
867   }
868   inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
869     smx_process_t self = SIMIX_process_self();
870     self->simcall.call = SIMCALL_PROCESS_GET_NAME;
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.cc;
882   }
883   inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
884     smx_process_t self = SIMIX_process_self();
885     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
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.i;
897   }
898   inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
899     smx_process_t self = SIMIX_process_self();
900     self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
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].dp = (void*) process;
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.dp;
912   }
913   inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
914     smx_process_t self = SIMIX_process_self();
915     self->simcall.call = SIMCALL_PROCESS_JOIN;
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].d = (double) timeout;
920     if (self != simix_global->maestro_process) {
921       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
922                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
923       SIMIX_process_yield(self);
924     } else {
925       SIMIX_simcall_pre(&self->simcall, 0);
926     }    
927     return self->simcall.result.i;
928   }
929   inline static int simcall_BODY_process_sleep(double duration) {
930     smx_process_t self = SIMIX_process_self();
931     self->simcall.call = SIMCALL_PROCESS_SLEEP;
932     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
933     memset(self->simcall.args, 0, sizeof(self->simcall.args));
934     self->simcall.args[0].d = (double) duration;
935     if (self != simix_global->maestro_process) {
936       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
937                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
938       SIMIX_process_yield(self);
939     } else {
940       SIMIX_simcall_pre(&self->simcall, 0);
941     }    
942     return self->simcall.result.i;
943   }
944   inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
945     smx_process_t self = SIMIX_process_self();
946     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
947     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
948     memset(self->simcall.args, 0, sizeof(self->simcall.args));
949     self->simcall.args[0].dp = (void*) process;
950     self->simcall.args[1].fp = (FPtr) fun;
951     self->simcall.args[2].dp = (void*) data;
952     if (self != simix_global->maestro_process) {
953       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
954                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
955       SIMIX_process_yield(self);
956     } else {
957       SIMIX_simcall_pre(&self->simcall, 0);
958     }    
959     
960   }
961   inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
962     smx_process_t self = SIMIX_process_self();
963     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
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].dp = (void*) process;
967     self->simcall.args[1].i = (int) auto_restart;
968     if (self != simix_global->maestro_process) {
969       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
970                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
971       SIMIX_process_yield(self);
972     } else {
973       SIMIX_simcall_pre(&self->simcall, 0);
974     }    
975     
976   }
977   inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
978     smx_process_t self = SIMIX_process_self();
979     self->simcall.call = SIMCALL_PROCESS_RESTART;
980     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
981     memset(self->simcall.args, 0, sizeof(self->simcall.args));
982     self->simcall.args[0].dp = (void*) process;
983     if (self != simix_global->maestro_process) {
984       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
985                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
986       SIMIX_process_yield(self);
987     } else {
988       SIMIX_simcall_pre(&self->simcall, 0);
989     }    
990     return self->simcall.result.dp;
991   }
992   inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
993     smx_process_t self = SIMIX_process_self();
994     self->simcall.call = SIMCALL_RDV_CREATE;
995     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
996     memset(self->simcall.args, 0, sizeof(self->simcall.args));
997     self->simcall.args[0].cc = (const char*) name;
998     if (self != simix_global->maestro_process) {
999       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1000                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1001       SIMIX_process_yield(self);
1002     } else {
1003       SIMIX_simcall_pre(&self->simcall, 0);
1004     }    
1005     return self->simcall.result.dp;
1006   }
1007   inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1008     smx_process_t self = SIMIX_process_self();
1009     self->simcall.call = SIMCALL_RDV_DESTROY;
1010     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1011     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1012     self->simcall.args[0].dp = (void*) rdv;
1013     if (self != simix_global->maestro_process) {
1014       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1015                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1016       SIMIX_process_yield(self);
1017     } else {
1018       SIMIX_simcall_pre(&self->simcall, 0);
1019     }    
1020     
1021   }
1022   inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
1023     smx_process_t self = SIMIX_process_self();
1024     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1025     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1026     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1027     self->simcall.args[0].dp = (void*) rdv;
1028     self->simcall.args[1].dp = (void*) host;
1029     if (self != simix_global->maestro_process) {
1030       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1031                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1032       SIMIX_process_yield(self);
1033     } else {
1034       SIMIX_simcall_pre(&self->simcall, 0);
1035     }    
1036     return self->simcall.result.ui;
1037   }
1038   inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1039     smx_process_t self = SIMIX_process_self();
1040     self->simcall.call = SIMCALL_RDV_GET_HEAD;
1041     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1042     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1043     self->simcall.args[0].dp = (void*) rdv;
1044     if (self != simix_global->maestro_process) {
1045       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1046                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1047       SIMIX_process_yield(self);
1048     } else {
1049       SIMIX_simcall_pre(&self->simcall, 0);
1050     }    
1051     return self->simcall.result.dp;
1052   }
1053   inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1054     smx_process_t self = SIMIX_process_self();
1055     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1056     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1057     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1058     self->simcall.args[0].dp = (void*) rdv;
1059     self->simcall.args[1].dp = (void*) receiver;
1060     if (self != simix_global->maestro_process) {
1061       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1062                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1063       SIMIX_process_yield(self);
1064     } else {
1065       SIMIX_simcall_pre(&self->simcall, 0);
1066     }    
1067     
1068   }
1069   inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1070     smx_process_t self = SIMIX_process_self();
1071     self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1072     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1073     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1074     self->simcall.args[0].dp = (void*) rdv;
1075     if (self != simix_global->maestro_process) {
1076       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1077                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1078       SIMIX_process_yield(self);
1079     } else {
1080       SIMIX_simcall_pre(&self->simcall, 0);
1081     }    
1082     return self->simcall.result.dp;
1083   }
1084   inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int src, int tag, simix_match_func_t match_fun, void* data) {
1085     smx_process_t self = SIMIX_process_self();
1086     self->simcall.call = SIMCALL_COMM_IPROBE;
1087     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1088     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1089     self->simcall.args[0].dp = (void*) rdv;
1090     self->simcall.args[1].i = (int) src;
1091     self->simcall.args[2].i = (int) tag;
1092     self->simcall.args[3].fp = (FPtr) match_fun;
1093     self->simcall.args[4].dp = (void*) data;
1094     if (self != simix_global->maestro_process) {
1095       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1096                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1097       SIMIX_process_yield(self);
1098     } else {
1099       SIMIX_simcall_pre(&self->simcall, 0);
1100     }    
1101     return self->simcall.result.dp;
1102   }
1103   inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
1104     smx_process_t self = SIMIX_process_self();
1105     self->simcall.call = SIMCALL_COMM_SEND;
1106     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1107     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1108     self->simcall.args[0].dp = (void*) src;
1109     self->simcall.args[1].dp = (void*) rdv;
1110     self->simcall.args[2].d = (double) task_size;
1111     self->simcall.args[3].d = (double) rate;
1112     self->simcall.args[4].dp = (void*) src_buff;
1113     self->simcall.args[5].sz = (size_t) src_buff_size;
1114     self->simcall.args[6].fp = (FPtr) match_fun;
1115     self->simcall.args[7].fp = (FPtr) copy_data_fun;
1116     self->simcall.args[8].dp = (void*) data;
1117     self->simcall.args[9].d = (double) timeout;
1118     if (self != simix_global->maestro_process) {
1119       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1120                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1121       SIMIX_process_yield(self);
1122     } else {
1123       SIMIX_simcall_pre(&self->simcall, 0);
1124     }    
1125     
1126   }
1127   inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
1128     smx_process_t self = SIMIX_process_self();
1129     self->simcall.call = SIMCALL_COMM_ISEND;
1130     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1131     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1132     self->simcall.args[0].dp = (void*) src;
1133     self->simcall.args[1].dp = (void*) rdv;
1134     self->simcall.args[2].d = (double) task_size;
1135     self->simcall.args[3].d = (double) rate;
1136     self->simcall.args[4].dp = (void*) src_buff;
1137     self->simcall.args[5].sz = (size_t) src_buff_size;
1138     self->simcall.args[6].fp = (FPtr) match_fun;
1139     self->simcall.args[7].fp = (FPtr) clean_fun;
1140     self->simcall.args[8].fp = (FPtr) copy_data_fun;
1141     self->simcall.args[9].dp = (void*) data;
1142     self->simcall.args[10].i = (int) detached;
1143     if (self != simix_global->maestro_process) {
1144       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1145                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1146       SIMIX_process_yield(self);
1147     } else {
1148       SIMIX_simcall_pre(&self->simcall, 0);
1149     }    
1150     return self->simcall.result.dp;
1151   }
1152   inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
1153     smx_process_t self = SIMIX_process_self();
1154     self->simcall.call = SIMCALL_COMM_RECV;
1155     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1156     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1157     self->simcall.args[0].dp = (void*) rdv;
1158     self->simcall.args[1].dp = (void*) dst_buff;
1159     self->simcall.args[2].dp = (void*) dst_buff_size;
1160     self->simcall.args[3].fp = (FPtr) match_fun;
1161     self->simcall.args[4].fp = (FPtr) copy_data_fun;
1162     self->simcall.args[5].dp = (void*) data;
1163     self->simcall.args[6].d = (double) timeout;
1164     self->simcall.args[7].d = (double) rate;
1165     if (self != simix_global->maestro_process) {
1166       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1167                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1168       SIMIX_process_yield(self);
1169     } else {
1170       SIMIX_simcall_pre(&self->simcall, 0);
1171     }    
1172     
1173   }
1174   inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
1175     smx_process_t self = SIMIX_process_self();
1176     self->simcall.call = SIMCALL_COMM_IRECV;
1177     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1178     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1179     self->simcall.args[0].dp = (void*) rdv;
1180     self->simcall.args[1].dp = (void*) dst_buff;
1181     self->simcall.args[2].dp = (void*) dst_buff_size;
1182     self->simcall.args[3].fp = (FPtr) match_fun;
1183     self->simcall.args[4].fp = (FPtr) copy_data_fun;
1184     self->simcall.args[5].dp = (void*) data;
1185     self->simcall.args[6].d = (double) rate;
1186     if (self != simix_global->maestro_process) {
1187       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1188                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1189       SIMIX_process_yield(self);
1190     } else {
1191       SIMIX_simcall_pre(&self->simcall, 0);
1192     }    
1193     return self->simcall.result.dp;
1194   }
1195   inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
1196     smx_process_t self = SIMIX_process_self();
1197     self->simcall.call = SIMCALL_COMM_CANCEL;
1198     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1199     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1200     self->simcall.args[0].dp = (void*) comm;
1201     if (self != simix_global->maestro_process) {
1202       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1203                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1204       SIMIX_process_yield(self);
1205     } else {
1206       SIMIX_simcall_pre(&self->simcall, 0);
1207     }    
1208     
1209   }
1210   inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1211     smx_process_t self = SIMIX_process_self();
1212     self->simcall.call = SIMCALL_COMM_WAITANY;
1213     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1214     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1215     self->simcall.args[0].dp = (void*) comms;
1216     if (self != simix_global->maestro_process) {
1217       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1218                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1219       SIMIX_process_yield(self);
1220     } else {
1221       SIMIX_simcall_pre(&self->simcall, 0);
1222     }    
1223     return self->simcall.result.i;
1224   }
1225   inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
1226     smx_process_t self = SIMIX_process_self();
1227     self->simcall.call = SIMCALL_COMM_WAIT;
1228     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1229     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1230     self->simcall.args[0].dp = (void*) comm;
1231     self->simcall.args[1].d = (double) timeout;
1232     if (self != simix_global->maestro_process) {
1233       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1234                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1235       SIMIX_process_yield(self);
1236     } else {
1237       SIMIX_simcall_pre(&self->simcall, 0);
1238     }    
1239     
1240   }
1241   inline static int simcall_BODY_comm_test(smx_action_t comm) {
1242     smx_process_t self = SIMIX_process_self();
1243     self->simcall.call = SIMCALL_COMM_TEST;
1244     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1245     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1246     self->simcall.args[0].dp = (void*) comm;
1247     if (self != simix_global->maestro_process) {
1248       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1249                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1250       SIMIX_process_yield(self);
1251     } else {
1252       SIMIX_simcall_pre(&self->simcall, 0);
1253     }    
1254     return self->simcall.result.i;
1255   }
1256   inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1257     smx_process_t self = SIMIX_process_self();
1258     self->simcall.call = SIMCALL_COMM_TESTANY;
1259     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1260     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1261     self->simcall.args[0].dp = (void*) comms;
1262     if (self != simix_global->maestro_process) {
1263       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1264                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1265       SIMIX_process_yield(self);
1266     } else {
1267       SIMIX_simcall_pre(&self->simcall, 0);
1268     }    
1269     return self->simcall.result.i;
1270   }
1271   inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
1272     smx_process_t self = SIMIX_process_self();
1273     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1274     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1275     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1276     self->simcall.args[0].dp = (void*) comm;
1277     if (self != simix_global->maestro_process) {
1278       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1279                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1280       SIMIX_process_yield(self);
1281     } else {
1282       SIMIX_simcall_pre(&self->simcall, 0);
1283     }    
1284     return self->simcall.result.d;
1285   }
1286   inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
1287     smx_process_t self = SIMIX_process_self();
1288     self->simcall.call = SIMCALL_COMM_GET_STATE;
1289     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1290     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1291     self->simcall.args[0].dp = (void*) comm;
1292     if (self != simix_global->maestro_process) {
1293       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1294                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1295       SIMIX_process_yield(self);
1296     } else {
1297       SIMIX_simcall_pre(&self->simcall, 0);
1298     }    
1299     return self->simcall.result.i;
1300   }
1301   inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
1302     smx_process_t self = SIMIX_process_self();
1303     self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1304     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1305     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1306     self->simcall.args[0].dp = (void*) comm;
1307     if (self != simix_global->maestro_process) {
1308       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1309                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1310       SIMIX_process_yield(self);
1311     } else {
1312       SIMIX_simcall_pre(&self->simcall, 0);
1313     }    
1314     return self->simcall.result.dp;
1315   }
1316   inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
1317     smx_process_t self = SIMIX_process_self();
1318     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1319     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1320     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1321     self->simcall.args[0].dp = (void*) comm;
1322     if (self != simix_global->maestro_process) {
1323       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1324                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1325       SIMIX_process_yield(self);
1326     } else {
1327       SIMIX_simcall_pre(&self->simcall, 0);
1328     }    
1329     return self->simcall.result.dp;
1330   }
1331   inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
1332     smx_process_t self = SIMIX_process_self();
1333     self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1334     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1335     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1336     self->simcall.args[0].dp = (void*) comm;
1337     if (self != simix_global->maestro_process) {
1338       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1339                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1340       SIMIX_process_yield(self);
1341     } else {
1342       SIMIX_simcall_pre(&self->simcall, 0);
1343     }    
1344     return self->simcall.result.dp;
1345   }
1346   inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
1347     smx_process_t self = SIMIX_process_self();
1348     self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1349     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1350     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1351     self->simcall.args[0].dp = (void*) comm;
1352     if (self != simix_global->maestro_process) {
1353       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1354                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1355       SIMIX_process_yield(self);
1356     } else {
1357       SIMIX_simcall_pre(&self->simcall, 0);
1358     }    
1359     return self->simcall.result.dp;
1360   }
1361   inline static smx_mutex_t simcall_BODY_mutex_init() {
1362     smx_process_t self = SIMIX_process_self();
1363     self->simcall.call = SIMCALL_MUTEX_INIT;
1364     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1365     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1366
1367     if (self != simix_global->maestro_process) {
1368       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1369                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1370       SIMIX_process_yield(self);
1371     } else {
1372       SIMIX_simcall_pre(&self->simcall, 0);
1373     }    
1374     return self->simcall.result.dp;
1375   }
1376   inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1377     smx_process_t self = SIMIX_process_self();
1378     self->simcall.call = SIMCALL_MUTEX_DESTROY;
1379     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1380     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1381     self->simcall.args[0].dp = (void*) mutex;
1382     if (self != simix_global->maestro_process) {
1383       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1384                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1385       SIMIX_process_yield(self);
1386     } else {
1387       SIMIX_simcall_pre(&self->simcall, 0);
1388     }    
1389     
1390   }
1391   inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1392     smx_process_t self = SIMIX_process_self();
1393     self->simcall.call = SIMCALL_MUTEX_LOCK;
1394     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1395     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1396     self->simcall.args[0].dp = (void*) mutex;
1397     if (self != simix_global->maestro_process) {
1398       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1399                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1400       SIMIX_process_yield(self);
1401     } else {
1402       SIMIX_simcall_pre(&self->simcall, 0);
1403     }    
1404     
1405   }
1406   inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1407     smx_process_t self = SIMIX_process_self();
1408     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1409     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1410     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1411     self->simcall.args[0].dp = (void*) mutex;
1412     if (self != simix_global->maestro_process) {
1413       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1414                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1415       SIMIX_process_yield(self);
1416     } else {
1417       SIMIX_simcall_pre(&self->simcall, 0);
1418     }    
1419     return self->simcall.result.i;
1420   }
1421   inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1422     smx_process_t self = SIMIX_process_self();
1423     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1424     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1425     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1426     self->simcall.args[0].dp = (void*) mutex;
1427     if (self != simix_global->maestro_process) {
1428       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1429                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1430       SIMIX_process_yield(self);
1431     } else {
1432       SIMIX_simcall_pre(&self->simcall, 0);
1433     }    
1434     
1435   }
1436   inline static smx_cond_t simcall_BODY_cond_init() {
1437     smx_process_t self = SIMIX_process_self();
1438     self->simcall.call = SIMCALL_COND_INIT;
1439     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1440     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1441
1442     if (self != simix_global->maestro_process) {
1443       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1444                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1445       SIMIX_process_yield(self);
1446     } else {
1447       SIMIX_simcall_pre(&self->simcall, 0);
1448     }    
1449     return self->simcall.result.dp;
1450   }
1451   inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
1452     smx_process_t self = SIMIX_process_self();
1453     self->simcall.call = SIMCALL_COND_DESTROY;
1454     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1455     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1456     self->simcall.args[0].dp = (void*) cond;
1457     if (self != simix_global->maestro_process) {
1458       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1459                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1460       SIMIX_process_yield(self);
1461     } else {
1462       SIMIX_simcall_pre(&self->simcall, 0);
1463     }    
1464     
1465   }
1466   inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
1467     smx_process_t self = SIMIX_process_self();
1468     self->simcall.call = SIMCALL_COND_SIGNAL;
1469     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1470     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1471     self->simcall.args[0].dp = (void*) cond;
1472     if (self != simix_global->maestro_process) {
1473       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1474                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1475       SIMIX_process_yield(self);
1476     } else {
1477       SIMIX_simcall_pre(&self->simcall, 0);
1478     }    
1479     
1480   }
1481   inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
1482     smx_process_t self = SIMIX_process_self();
1483     self->simcall.call = SIMCALL_COND_WAIT;
1484     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1485     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1486     self->simcall.args[0].dp = (void*) cond;
1487     self->simcall.args[1].dp = (void*) mutex;
1488     if (self != simix_global->maestro_process) {
1489       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1490                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1491       SIMIX_process_yield(self);
1492     } else {
1493       SIMIX_simcall_pre(&self->simcall, 0);
1494     }    
1495     
1496   }
1497   inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1498     smx_process_t self = SIMIX_process_self();
1499     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
1500     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1501     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1502     self->simcall.args[0].dp = (void*) cond;
1503     self->simcall.args[1].dp = (void*) mutex;
1504     self->simcall.args[2].d = (double) timeout;
1505     if (self != simix_global->maestro_process) {
1506       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1507                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1508       SIMIX_process_yield(self);
1509     } else {
1510       SIMIX_simcall_pre(&self->simcall, 0);
1511     }    
1512     
1513   }
1514   inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1515     smx_process_t self = SIMIX_process_self();
1516     self->simcall.call = SIMCALL_COND_BROADCAST;
1517     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1518     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1519     self->simcall.args[0].dp = (void*) cond;
1520     if (self != simix_global->maestro_process) {
1521       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1522                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1523       SIMIX_process_yield(self);
1524     } else {
1525       SIMIX_simcall_pre(&self->simcall, 0);
1526     }    
1527     
1528   }
1529   inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
1530     smx_process_t self = SIMIX_process_self();
1531     self->simcall.call = SIMCALL_SEM_INIT;
1532     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1533     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1534     self->simcall.args[0].i = (int) capacity;
1535     if (self != simix_global->maestro_process) {
1536       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1537                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1538       SIMIX_process_yield(self);
1539     } else {
1540       SIMIX_simcall_pre(&self->simcall, 0);
1541     }    
1542     return self->simcall.result.dp;
1543   }
1544   inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
1545     smx_process_t self = SIMIX_process_self();
1546     self->simcall.call = SIMCALL_SEM_DESTROY;
1547     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1548     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1549     self->simcall.args[0].dp = (void*) sem;
1550     if (self != simix_global->maestro_process) {
1551       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1552                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1553       SIMIX_process_yield(self);
1554     } else {
1555       SIMIX_simcall_pre(&self->simcall, 0);
1556     }    
1557     
1558   }
1559   inline static void simcall_BODY_sem_release(smx_sem_t sem) {
1560     smx_process_t self = SIMIX_process_self();
1561     self->simcall.call = SIMCALL_SEM_RELEASE;
1562     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1563     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1564     self->simcall.args[0].dp = (void*) sem;
1565     if (self != simix_global->maestro_process) {
1566       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1567                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1568       SIMIX_process_yield(self);
1569     } else {
1570       SIMIX_simcall_pre(&self->simcall, 0);
1571     }    
1572     
1573   }
1574   inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
1575     smx_process_t self = SIMIX_process_self();
1576     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
1577     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1578     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1579     self->simcall.args[0].dp = (void*) sem;
1580     if (self != simix_global->maestro_process) {
1581       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1582                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1583       SIMIX_process_yield(self);
1584     } else {
1585       SIMIX_simcall_pre(&self->simcall, 0);
1586     }    
1587     return self->simcall.result.i;
1588   }
1589   inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
1590     smx_process_t self = SIMIX_process_self();
1591     self->simcall.call = SIMCALL_SEM_ACQUIRE;
1592     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1593     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1594     self->simcall.args[0].dp = (void*) sem;
1595     if (self != simix_global->maestro_process) {
1596       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1597                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1598       SIMIX_process_yield(self);
1599     } else {
1600       SIMIX_simcall_pre(&self->simcall, 0);
1601     }    
1602     
1603   }
1604   inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
1605     smx_process_t self = SIMIX_process_self();
1606     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
1607     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1608     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1609     self->simcall.args[0].dp = (void*) sem;
1610     self->simcall.args[1].d = (double) timeout;
1611     if (self != simix_global->maestro_process) {
1612       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1613                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1614       SIMIX_process_yield(self);
1615     } else {
1616       SIMIX_simcall_pre(&self->simcall, 0);
1617     }    
1618     
1619   }
1620   inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
1621     smx_process_t self = SIMIX_process_self();
1622     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
1623     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1624     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1625     self->simcall.args[0].dp = (void*) sem;
1626     if (self != simix_global->maestro_process) {
1627       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1628                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1629       SIMIX_process_yield(self);
1630     } else {
1631       SIMIX_simcall_pre(&self->simcall, 0);
1632     }    
1633     return self->simcall.result.i;
1634   }
1635   inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
1636     smx_process_t self = SIMIX_process_self();
1637     self->simcall.call = SIMCALL_FILE_READ;
1638     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1639     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1640     self->simcall.args[0].dp = (void*) fd;
1641     self->simcall.args[1].sgsz = (sg_size_t) size;
1642     self->simcall.args[2].dp = (void*) host;
1643     if (self != simix_global->maestro_process) {
1644       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1645                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1646       SIMIX_process_yield(self);
1647     } else {
1648       SIMIX_simcall_pre(&self->simcall, 0);
1649     }    
1650     return self->simcall.result.sgsz;
1651   }
1652   inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
1653     smx_process_t self = SIMIX_process_self();
1654     self->simcall.call = SIMCALL_FILE_WRITE;
1655     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1656     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1657     self->simcall.args[0].dp = (void*) fd;
1658     self->simcall.args[1].sgsz = (sg_size_t) size;
1659     self->simcall.args[2].dp = (void*) host;
1660     if (self != simix_global->maestro_process) {
1661       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1662                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1663       SIMIX_process_yield(self);
1664     } else {
1665       SIMIX_simcall_pre(&self->simcall, 0);
1666     }    
1667     return self->simcall.result.sgsz;
1668   }
1669   inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
1670     smx_process_t self = SIMIX_process_self();
1671     self->simcall.call = SIMCALL_FILE_OPEN;
1672     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1673     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1674     self->simcall.args[0].cc = (const char*) fullpath;
1675     self->simcall.args[1].dp = (void*) host;
1676     if (self != simix_global->maestro_process) {
1677       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1678                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1679       SIMIX_process_yield(self);
1680     } else {
1681       SIMIX_simcall_pre(&self->simcall, 0);
1682     }    
1683     return self->simcall.result.dp;
1684   }
1685   inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
1686     smx_process_t self = SIMIX_process_self();
1687     self->simcall.call = SIMCALL_FILE_CLOSE;
1688     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1689     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1690     self->simcall.args[0].dp = (void*) fd;
1691     self->simcall.args[1].dp = (void*) host;
1692     if (self != simix_global->maestro_process) {
1693       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1694                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1695       SIMIX_process_yield(self);
1696     } else {
1697       SIMIX_simcall_pre(&self->simcall, 0);
1698     }    
1699     return self->simcall.result.i;
1700   }
1701   inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
1702     smx_process_t self = SIMIX_process_self();
1703     self->simcall.call = SIMCALL_FILE_UNLINK;
1704     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1705     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1706     self->simcall.args[0].dp = (void*) fd;
1707     self->simcall.args[1].dp = (void*) host;
1708     if (self != simix_global->maestro_process) {
1709       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1710                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1711       SIMIX_process_yield(self);
1712     } else {
1713       SIMIX_simcall_pre(&self->simcall, 0);
1714     }    
1715     return self->simcall.result.i;
1716   }
1717   inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
1718     smx_process_t self = SIMIX_process_self();
1719     self->simcall.call = SIMCALL_FILE_GET_SIZE;
1720     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1721     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1722     self->simcall.args[0].dp = (void*) fd;
1723     if (self != simix_global->maestro_process) {
1724       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1725                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1726       SIMIX_process_yield(self);
1727     } else {
1728       SIMIX_simcall_pre(&self->simcall, 0);
1729     }    
1730     return self->simcall.result.sgsz;
1731   }
1732   inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
1733     smx_process_t self = SIMIX_process_self();
1734     self->simcall.call = SIMCALL_FILE_TELL;
1735     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1736     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1737     self->simcall.args[0].dp = (void*) fd;
1738     if (self != simix_global->maestro_process) {
1739       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1740                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1741       SIMIX_process_yield(self);
1742     } else {
1743       SIMIX_simcall_pre(&self->simcall, 0);
1744     }    
1745     return self->simcall.result.sgsz;
1746   }
1747   inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
1748     smx_process_t self = SIMIX_process_self();
1749     self->simcall.call = SIMCALL_FILE_SEEK;
1750     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1751     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1752     self->simcall.args[0].dp = (void*) fd;
1753     self->simcall.args[1].sgoff = (sg_offset_t) offset;
1754     self->simcall.args[2].i = (int) origin;
1755     if (self != simix_global->maestro_process) {
1756       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1757                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1758       SIMIX_process_yield(self);
1759     } else {
1760       SIMIX_simcall_pre(&self->simcall, 0);
1761     }    
1762     return self->simcall.result.i;
1763   }
1764   inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
1765     smx_process_t self = SIMIX_process_self();
1766     self->simcall.call = SIMCALL_FILE_GET_INFO;
1767     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1768     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1769     self->simcall.args[0].dp = (void*) fd;
1770     if (self != simix_global->maestro_process) {
1771       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1772                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1773       SIMIX_process_yield(self);
1774     } else {
1775       SIMIX_simcall_pre(&self->simcall, 0);
1776     }    
1777     return self->simcall.result.dp;
1778   }
1779   inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
1780     smx_process_t self = SIMIX_process_self();
1781     self->simcall.call = SIMCALL_FILE_MOVE;
1782     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1783     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1784     self->simcall.args[0].dp = (void*) fd;
1785     self->simcall.args[1].cc = (const char*) fullpath;
1786     if (self != simix_global->maestro_process) {
1787       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1788                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1789       SIMIX_process_yield(self);
1790     } else {
1791       SIMIX_simcall_pre(&self->simcall, 0);
1792     }    
1793     return self->simcall.result.i;
1794   }
1795   inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
1796     smx_process_t self = SIMIX_process_self();
1797     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
1798     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1799     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1800     self->simcall.args[0].dp = (void*) storage;
1801     if (self != simix_global->maestro_process) {
1802       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1803                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1804       SIMIX_process_yield(self);
1805     } else {
1806       SIMIX_simcall_pre(&self->simcall, 0);
1807     }    
1808     return self->simcall.result.sgsz;
1809   }
1810   inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
1811     smx_process_t self = SIMIX_process_self();
1812     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
1813     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1814     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1815     self->simcall.args[0].dp = (void*) name;
1816     if (self != simix_global->maestro_process) {
1817       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1818                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1819       SIMIX_process_yield(self);
1820     } else {
1821       SIMIX_simcall_pre(&self->simcall, 0);
1822     }    
1823     return self->simcall.result.sgsz;
1824   }
1825   inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
1826     smx_process_t self = SIMIX_process_self();
1827     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
1828     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1829     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1830     self->simcall.args[0].dp = (void*) storage;
1831     if (self != simix_global->maestro_process) {
1832       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1833                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1834       SIMIX_process_yield(self);
1835     } else {
1836       SIMIX_simcall_pre(&self->simcall, 0);
1837     }    
1838     return self->simcall.result.dp;
1839   }
1840   inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
1841     smx_process_t self = SIMIX_process_self();
1842     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
1843     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1844     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1845     self->simcall.args[0].dp = (void*) storage;
1846     if (self != simix_global->maestro_process) {
1847       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1848                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1849       SIMIX_process_yield(self);
1850     } else {
1851       SIMIX_simcall_pre(&self->simcall, 0);
1852     }    
1853     return self->simcall.result.dp;
1854   }
1855   inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
1856     smx_process_t self = SIMIX_process_self();
1857     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
1858     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1859     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1860     self->simcall.args[0].cc = (const char*) name;
1861     if (self != simix_global->maestro_process) {
1862       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1863                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1864       SIMIX_process_yield(self);
1865     } else {
1866       SIMIX_simcall_pre(&self->simcall, 0);
1867     }    
1868     return self->simcall.result.dp;
1869   }
1870 #ifdef HAVE_LATENCY_BOUND_TRACKING
1871   inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
1872     smx_process_t self = SIMIX_process_self();
1873     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
1874     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1875     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1876     self->simcall.args[0].dp = (void*) comm;
1877     if (self != simix_global->maestro_process) {
1878       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1879                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1880       SIMIX_process_yield(self);
1881     } else {
1882       SIMIX_simcall_pre(&self->simcall, 0);
1883     }    
1884     return self->simcall.result.i;
1885   }
1886 #endif
1887
1888 #ifdef HAVE_TRACING
1889   inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
1890     smx_process_t self = SIMIX_process_self();
1891     self->simcall.call = SIMCALL_SET_CATEGORY;
1892     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1893     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1894     self->simcall.args[0].dp = (void*) action;
1895     self->simcall.args[1].cc = (const char*) category;
1896     if (self != simix_global->maestro_process) {
1897       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1898                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1899       SIMIX_process_yield(self);
1900     } else {
1901       SIMIX_simcall_pre(&self->simcall, 0);
1902     }    
1903     
1904   }
1905 #endif
1906
1907 #ifdef HAVE_MC
1908   inline static void* simcall_BODY_mc_snapshot() {
1909     smx_process_t self = SIMIX_process_self();
1910     self->simcall.call = SIMCALL_MC_SNAPSHOT;
1911     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1912     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1913
1914     if (self != simix_global->maestro_process) {
1915       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1916                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1917       SIMIX_process_yield(self);
1918     } else {
1919       SIMIX_simcall_pre(&self->simcall, 0);
1920     }    
1921     return self->simcall.result.dp;
1922   }
1923   inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
1924     smx_process_t self = SIMIX_process_self();
1925     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
1926     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1927     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1928     self->simcall.args[0].dp = (void*) s1;
1929     self->simcall.args[1].dp = (void*) s2;
1930     if (self != simix_global->maestro_process) {
1931       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1932                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1933       SIMIX_process_yield(self);
1934     } else {
1935       SIMIX_simcall_pre(&self->simcall, 0);
1936     }    
1937     return self->simcall.result.i;
1938   }
1939   inline static int simcall_BODY_mc_random(int min, int max) {
1940     smx_process_t self = SIMIX_process_self();
1941     self->simcall.call = SIMCALL_MC_RANDOM;
1942     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1943     memset(self->simcall.args, 0, sizeof(self->simcall.args));
1944     self->simcall.args[0].i = (int) min;
1945     self->simcall.args[1].i = (int) max;
1946     if (self != simix_global->maestro_process) {
1947       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1948                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1949       SIMIX_process_yield(self);
1950     } else {
1951       SIMIX_simcall_pre(&self->simcall, 0);
1952     }    
1953     return self->simcall.result.i;
1954   }
1955 #endif