Logo AND Algorithmique Numérique Distribuée

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