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 *********************************************/
8 inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
9 smx_process_t self = SIMIX_process_self();
11 /* Go to that function to follow the code flow through the simcall barrier */
12 if (0) SIMIX_pre_host_get_by_name(&self->simcall, name);
13 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
15 self->simcall.call = SIMCALL_HOST_GET_BY_NAME;
16 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
17 memset(self->simcall.args, 0, sizeof(self->simcall.args));
18 self->simcall.args[0].cc = (const char*) name;
19 if (self != simix_global->maestro_process) {
20 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
21 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
22 SIMIX_process_yield(self);
24 SIMIX_simcall_pre(&self->simcall, 0);
26 return self->simcall.result.dp;
28 inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
29 smx_process_t self = SIMIX_process_self();
31 /* Go to that function to follow the code flow through the simcall barrier */
32 if (0) SIMIX_pre_host_get_name(&self->simcall, host);
33 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
35 self->simcall.call = SIMCALL_HOST_GET_NAME;
36 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
37 memset(self->simcall.args, 0, sizeof(self->simcall.args));
38 self->simcall.args[0].dp = (void*) host;
39 if (self != simix_global->maestro_process) {
40 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
41 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
42 SIMIX_process_yield(self);
44 SIMIX_simcall_pre(&self->simcall, 0);
46 return self->simcall.result.cc;
48 inline static void simcall_BODY_host_on(smx_host_t host) {
49 smx_process_t self = SIMIX_process_self();
51 /* Go to that function to follow the code flow through the simcall barrier */
52 if (0) SIMIX_pre_host_on(&self->simcall, host);
53 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
55 self->simcall.call = SIMCALL_HOST_ON;
56 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
57 memset(self->simcall.args, 0, sizeof(self->simcall.args));
58 self->simcall.args[0].dp = (void*) host;
59 if (self != simix_global->maestro_process) {
60 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
61 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
62 SIMIX_process_yield(self);
64 SIMIX_simcall_pre(&self->simcall, 0);
68 inline static void simcall_BODY_host_off(smx_host_t host) {
69 smx_process_t self = SIMIX_process_self();
71 /* Go to that function to follow the code flow through the simcall barrier */
72 if (0) SIMIX_pre_host_off(&self->simcall, host);
73 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
75 self->simcall.call = SIMCALL_HOST_OFF;
76 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
77 memset(self->simcall.args, 0, sizeof(self->simcall.args));
78 self->simcall.args[0].dp = (void*) host;
79 if (self != simix_global->maestro_process) {
80 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
81 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
82 SIMIX_process_yield(self);
84 SIMIX_simcall_pre(&self->simcall, 0);
88 inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
89 smx_process_t self = SIMIX_process_self();
91 /* Go to that function to follow the code flow through the simcall barrier */
92 if (0) SIMIX_pre_host_get_properties(&self->simcall, host);
93 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
95 self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
96 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
97 memset(self->simcall.args, 0, sizeof(self->simcall.args));
98 self->simcall.args[0].dp = (void*) host;
99 if (self != simix_global->maestro_process) {
100 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
101 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
102 SIMIX_process_yield(self);
104 SIMIX_simcall_pre(&self->simcall, 0);
106 return self->simcall.result.dp;
108 inline static int simcall_BODY_host_get_core(smx_host_t host) {
109 smx_process_t self = SIMIX_process_self();
111 /* Go to that function to follow the code flow through the simcall barrier */
112 if (0) SIMIX_pre_host_get_core(&self->simcall, host);
113 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
115 self->simcall.call = SIMCALL_HOST_GET_CORE;
116 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
117 memset(self->simcall.args, 0, sizeof(self->simcall.args));
118 self->simcall.args[0].dp = (void*) host;
119 if (self != simix_global->maestro_process) {
120 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
121 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
122 SIMIX_process_yield(self);
124 SIMIX_simcall_pre(&self->simcall, 0);
126 return self->simcall.result.i;
128 inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
129 smx_process_t self = SIMIX_process_self();
131 /* Go to that function to follow the code flow through the simcall barrier */
132 if (0) SIMIX_pre_host_get_process_list(&self->simcall, host);
133 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
135 self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
136 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
137 memset(self->simcall.args, 0, sizeof(self->simcall.args));
138 self->simcall.args[0].dp = (void*) host;
139 if (self != simix_global->maestro_process) {
140 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
141 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
142 SIMIX_process_yield(self);
144 SIMIX_simcall_pre(&self->simcall, 0);
146 return self->simcall.result.dp;
148 inline static double simcall_BODY_host_get_speed(smx_host_t host) {
149 smx_process_t self = SIMIX_process_self();
151 /* Go to that function to follow the code flow through the simcall barrier */
152 if (0) SIMIX_pre_host_get_speed(&self->simcall, host);
153 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
155 self->simcall.call = SIMCALL_HOST_GET_SPEED;
156 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
157 memset(self->simcall.args, 0, sizeof(self->simcall.args));
158 self->simcall.args[0].dp = (void*) host;
159 if (self != simix_global->maestro_process) {
160 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
161 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
162 SIMIX_process_yield(self);
164 SIMIX_simcall_pre(&self->simcall, 0);
166 return self->simcall.result.d;
168 inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
169 smx_process_t self = SIMIX_process_self();
171 /* Go to that function to follow the code flow through the simcall barrier */
172 if (0) SIMIX_pre_host_get_available_speed(&self->simcall, host);
173 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
175 self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
176 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
177 memset(self->simcall.args, 0, sizeof(self->simcall.args));
178 self->simcall.args[0].dp = (void*) host;
179 if (self != simix_global->maestro_process) {
180 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
181 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
182 SIMIX_process_yield(self);
184 SIMIX_simcall_pre(&self->simcall, 0);
186 return self->simcall.result.d;
188 inline static int simcall_BODY_host_get_state(smx_host_t host) {
189 smx_process_t self = SIMIX_process_self();
191 /* Go to that function to follow the code flow through the simcall barrier */
192 if (0) SIMIX_pre_host_get_state(&self->simcall, host);
193 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
195 self->simcall.call = SIMCALL_HOST_GET_STATE;
196 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
197 memset(self->simcall.args, 0, sizeof(self->simcall.args));
198 self->simcall.args[0].dp = (void*) host;
199 if (self != simix_global->maestro_process) {
200 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
201 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
202 SIMIX_process_yield(self);
204 SIMIX_simcall_pre(&self->simcall, 0);
206 return self->simcall.result.i;
208 inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
209 smx_process_t self = SIMIX_process_self();
211 /* Go to that function to follow the code flow through the simcall barrier */
212 if (0) SIMIX_pre_host_get_current_power_peak(&self->simcall, host);
213 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
215 self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
216 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
217 memset(self->simcall.args, 0, sizeof(self->simcall.args));
218 self->simcall.args[0].dp = (void*) host;
219 if (self != simix_global->maestro_process) {
220 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
221 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
222 SIMIX_process_yield(self);
224 SIMIX_simcall_pre(&self->simcall, 0);
226 return self->simcall.result.d;
228 inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
229 smx_process_t self = SIMIX_process_self();
231 /* Go to that function to follow the code flow through the simcall barrier */
232 if (0) SIMIX_pre_host_get_power_peak_at(&self->simcall, host, pstate_index);
233 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
235 self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
236 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
237 memset(self->simcall.args, 0, sizeof(self->simcall.args));
238 self->simcall.args[0].dp = (void*) host;
239 self->simcall.args[1].i = (int) pstate_index;
240 if (self != simix_global->maestro_process) {
241 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
242 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
243 SIMIX_process_yield(self);
245 SIMIX_simcall_pre(&self->simcall, 0);
247 return self->simcall.result.d;
249 inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
250 smx_process_t self = SIMIX_process_self();
252 /* Go to that function to follow the code flow through the simcall barrier */
253 if (0) SIMIX_pre_host_get_nb_pstates(&self->simcall, host);
254 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
256 self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
257 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
258 memset(self->simcall.args, 0, sizeof(self->simcall.args));
259 self->simcall.args[0].dp = (void*) host;
260 if (self != simix_global->maestro_process) {
261 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
262 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
263 SIMIX_process_yield(self);
265 SIMIX_simcall_pre(&self->simcall, 0);
267 return self->simcall.result.i;
269 inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
270 smx_process_t self = SIMIX_process_self();
272 /* Go to that function to follow the code flow through the simcall barrier */
273 if (0) SIMIX_pre_host_set_power_peak_at(&self->simcall, host, pstate_index);
274 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
276 self->simcall.call = SIMCALL_HOST_SET_POWER_PEAK_AT;
277 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
278 memset(self->simcall.args, 0, sizeof(self->simcall.args));
279 self->simcall.args[0].dp = (void*) host;
280 self->simcall.args[1].i = (int) pstate_index;
281 if (self != simix_global->maestro_process) {
282 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
283 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
284 SIMIX_process_yield(self);
286 SIMIX_simcall_pre(&self->simcall, 0);
290 inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
291 smx_process_t self = SIMIX_process_self();
293 /* Go to that function to follow the code flow through the simcall barrier */
294 if (0) SIMIX_pre_host_get_consumed_energy(&self->simcall, host);
295 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
297 self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
298 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
299 memset(self->simcall.args, 0, sizeof(self->simcall.args));
300 self->simcall.args[0].dp = (void*) host;
301 if (self != simix_global->maestro_process) {
302 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
303 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
304 SIMIX_process_yield(self);
306 SIMIX_simcall_pre(&self->simcall, 0);
308 return self->simcall.result.d;
310 inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
311 smx_process_t self = SIMIX_process_self();
313 /* Go to that function to follow the code flow through the simcall barrier */
314 if (0) SIMIX_pre_host_execute(&self->simcall, name, host, computation_amount, priority, bound, affinity_mask);
315 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
317 self->simcall.call = SIMCALL_HOST_EXECUTE;
318 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
319 memset(self->simcall.args, 0, sizeof(self->simcall.args));
320 self->simcall.args[0].cc = (const char*) name;
321 self->simcall.args[1].dp = (void*) host;
322 self->simcall.args[2].d = (double) computation_amount;
323 self->simcall.args[3].d = (double) priority;
324 self->simcall.args[4].d = (double) bound;
325 self->simcall.args[5].ul = (unsigned long) affinity_mask;
326 if (self != simix_global->maestro_process) {
327 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
328 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
329 SIMIX_process_yield(self);
331 SIMIX_simcall_pre(&self->simcall, 0);
333 return self->simcall.result.dp;
335 inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
336 smx_process_t self = SIMIX_process_self();
338 /* Go to that function to follow the code flow through the simcall barrier */
339 if (0) SIMIX_pre_host_parallel_execute(&self->simcall, name, host_nb, host_list, computation_amount, communication_amount, amount, rate);
340 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
342 self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
343 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
344 memset(self->simcall.args, 0, sizeof(self->simcall.args));
345 self->simcall.args[0].cc = (const char*) name;
346 self->simcall.args[1].i = (int) host_nb;
347 self->simcall.args[2].dp = (void*) host_list;
348 self->simcall.args[3].dp = (void*) computation_amount;
349 self->simcall.args[4].dp = (void*) communication_amount;
350 self->simcall.args[5].d = (double) amount;
351 self->simcall.args[6].d = (double) rate;
352 if (self != simix_global->maestro_process) {
353 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
354 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
355 SIMIX_process_yield(self);
357 SIMIX_simcall_pre(&self->simcall, 0);
359 return self->simcall.result.dp;
361 inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) {
362 smx_process_t self = SIMIX_process_self();
364 /* Go to that function to follow the code flow through the simcall barrier */
365 if (0) SIMIX_pre_host_execution_destroy(&self->simcall, execution);
366 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
368 self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY;
369 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
370 memset(self->simcall.args, 0, sizeof(self->simcall.args));
371 self->simcall.args[0].dp = (void*) execution;
372 if (self != simix_global->maestro_process) {
373 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
374 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
375 SIMIX_process_yield(self);
377 SIMIX_simcall_pre(&self->simcall, 0);
381 inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) {
382 smx_process_t self = SIMIX_process_self();
384 /* Go to that function to follow the code flow through the simcall barrier */
385 if (0) SIMIX_pre_host_execution_cancel(&self->simcall, execution);
386 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
388 self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL;
389 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
390 memset(self->simcall.args, 0, sizeof(self->simcall.args));
391 self->simcall.args[0].dp = (void*) execution;
392 if (self != simix_global->maestro_process) {
393 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
394 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
395 SIMIX_process_yield(self);
397 SIMIX_simcall_pre(&self->simcall, 0);
401 inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) {
402 smx_process_t self = SIMIX_process_self();
404 /* Go to that function to follow the code flow through the simcall barrier */
405 if (0) SIMIX_pre_host_execution_get_remains(&self->simcall, execution);
406 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
408 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
409 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
410 memset(self->simcall.args, 0, sizeof(self->simcall.args));
411 self->simcall.args[0].dp = (void*) execution;
412 if (self != simix_global->maestro_process) {
413 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
414 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
415 SIMIX_process_yield(self);
417 SIMIX_simcall_pre(&self->simcall, 0);
419 return self->simcall.result.d;
421 inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
422 smx_process_t self = SIMIX_process_self();
424 /* Go to that function to follow the code flow through the simcall barrier */
425 if (0) SIMIX_pre_host_execution_get_state(&self->simcall, execution);
426 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
428 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE;
429 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
430 memset(self->simcall.args, 0, sizeof(self->simcall.args));
431 self->simcall.args[0].dp = (void*) execution;
432 if (self != simix_global->maestro_process) {
433 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
434 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
435 SIMIX_process_yield(self);
437 SIMIX_simcall_pre(&self->simcall, 0);
439 return self->simcall.result.i;
441 inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) {
442 smx_process_t self = SIMIX_process_self();
444 /* Go to that function to follow the code flow through the simcall barrier */
445 if (0) SIMIX_pre_host_execution_set_priority(&self->simcall, execution, priority);
446 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
448 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
449 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
450 memset(self->simcall.args, 0, sizeof(self->simcall.args));
451 self->simcall.args[0].dp = (void*) execution;
452 self->simcall.args[1].d = (double) priority;
453 if (self != simix_global->maestro_process) {
454 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
455 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
456 SIMIX_process_yield(self);
458 SIMIX_simcall_pre(&self->simcall, 0);
462 inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) {
463 smx_process_t self = SIMIX_process_self();
465 /* Go to that function to follow the code flow through the simcall barrier */
466 if (0) SIMIX_pre_host_execution_set_bound(&self->simcall, execution, bound);
467 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
469 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND;
470 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
471 memset(self->simcall.args, 0, sizeof(self->simcall.args));
472 self->simcall.args[0].dp = (void*) execution;
473 self->simcall.args[1].d = (double) bound;
474 if (self != simix_global->maestro_process) {
475 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
476 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
477 SIMIX_process_yield(self);
479 SIMIX_simcall_pre(&self->simcall, 0);
483 inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) {
484 smx_process_t self = SIMIX_process_self();
486 /* Go to that function to follow the code flow through the simcall barrier */
487 if (0) SIMIX_pre_host_execution_set_affinity(&self->simcall, execution, ws, mask);
488 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
490 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY;
491 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
492 memset(self->simcall.args, 0, sizeof(self->simcall.args));
493 self->simcall.args[0].dp = (void*) execution;
494 self->simcall.args[1].dp = (void*) ws;
495 self->simcall.args[2].ul = (unsigned long) mask;
496 if (self != simix_global->maestro_process) {
497 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
498 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
499 SIMIX_process_yield(self);
501 SIMIX_simcall_pre(&self->simcall, 0);
505 inline static int simcall_BODY_host_execution_wait(smx_action_t execution) {
506 smx_process_t self = SIMIX_process_self();
508 /* Go to that function to follow the code flow through the simcall barrier */
509 if (0) SIMIX_pre_host_execution_wait(&self->simcall, execution);
510 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
512 self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT;
513 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
514 memset(self->simcall.args, 0, sizeof(self->simcall.args));
515 self->simcall.args[0].dp = (void*) execution;
516 if (self != simix_global->maestro_process) {
517 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
518 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
519 SIMIX_process_yield(self);
521 SIMIX_simcall_pre(&self->simcall, 0);
523 return self->simcall.result.i;
525 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
526 smx_process_t self = SIMIX_process_self();
528 /* Go to that function to follow the code flow through the simcall barrier */
529 if (0) SIMIX_pre_host_get_mounted_storage_list(&self->simcall, host);
530 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
532 self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
533 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
534 memset(self->simcall.args, 0, sizeof(self->simcall.args));
535 self->simcall.args[0].dp = (void*) host;
536 if (self != simix_global->maestro_process) {
537 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
538 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
539 SIMIX_process_yield(self);
541 SIMIX_simcall_pre(&self->simcall, 0);
543 return self->simcall.result.dp;
545 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
546 smx_process_t self = SIMIX_process_self();
548 /* Go to that function to follow the code flow through the simcall barrier */
549 if (0) SIMIX_pre_host_get_attached_storage_list(&self->simcall, host);
550 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
552 self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
553 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
554 memset(self->simcall.args, 0, sizeof(self->simcall.args));
555 self->simcall.args[0].dp = (void*) host;
556 if (self != simix_global->maestro_process) {
557 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
558 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
559 SIMIX_process_yield(self);
561 SIMIX_simcall_pre(&self->simcall, 0);
563 return self->simcall.result.dp;
565 inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
566 smx_process_t self = SIMIX_process_self();
568 /* Go to that function to follow the code flow through the simcall barrier */
569 if (0) SIMIX_pre_host_get_params(&self->simcall, ind_vm, params);
570 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
572 self->simcall.call = SIMCALL_HOST_GET_PARAMS;
573 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
574 memset(self->simcall.args, 0, sizeof(self->simcall.args));
575 self->simcall.args[0].dp = (void*) ind_vm;
576 self->simcall.args[1].dp = (void*) params;
577 if (self != simix_global->maestro_process) {
578 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
579 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
580 SIMIX_process_yield(self);
582 SIMIX_simcall_pre(&self->simcall, 0);
586 inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
587 smx_process_t self = SIMIX_process_self();
589 /* Go to that function to follow the code flow through the simcall barrier */
590 if (0) SIMIX_pre_host_set_params(&self->simcall, ind_vm, params);
591 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
593 self->simcall.call = SIMCALL_HOST_SET_PARAMS;
594 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
595 memset(self->simcall.args, 0, sizeof(self->simcall.args));
596 self->simcall.args[0].dp = (void*) ind_vm;
597 self->simcall.args[1].dp = (void*) params;
598 if (self != simix_global->maestro_process) {
599 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
600 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
601 SIMIX_process_yield(self);
603 SIMIX_simcall_pre(&self->simcall, 0);
607 inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
608 smx_process_t self = SIMIX_process_self();
610 /* Go to that function to follow the code flow through the simcall barrier */
611 if (0) SIMIX_pre_vm_create(&self->simcall, name, ind_pm);
612 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
614 self->simcall.call = SIMCALL_VM_CREATE;
615 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
616 memset(self->simcall.args, 0, sizeof(self->simcall.args));
617 self->simcall.args[0].cc = (const char*) name;
618 self->simcall.args[1].dp = (void*) ind_pm;
619 if (self != simix_global->maestro_process) {
620 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
621 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
622 SIMIX_process_yield(self);
624 SIMIX_simcall_pre(&self->simcall, 0);
626 return self->simcall.result.dp;
628 inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
629 smx_process_t self = SIMIX_process_self();
631 /* Go to that function to follow the code flow through the simcall barrier */
632 if (0) SIMIX_pre_vm_start(&self->simcall, ind_vm);
633 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
635 self->simcall.call = SIMCALL_VM_START;
636 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
637 memset(self->simcall.args, 0, sizeof(self->simcall.args));
638 self->simcall.args[0].dp = (void*) ind_vm;
639 if (self != simix_global->maestro_process) {
640 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
641 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
642 SIMIX_process_yield(self);
644 SIMIX_simcall_pre(&self->simcall, 0);
648 inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
649 smx_process_t self = SIMIX_process_self();
651 /* Go to that function to follow the code flow through the simcall barrier */
652 if (0) SIMIX_pre_vm_get_state(&self->simcall, ind_vm);
653 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
655 self->simcall.call = SIMCALL_VM_GET_STATE;
656 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
657 memset(self->simcall.args, 0, sizeof(self->simcall.args));
658 self->simcall.args[0].dp = (void*) ind_vm;
659 if (self != simix_global->maestro_process) {
660 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
661 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
662 SIMIX_process_yield(self);
664 SIMIX_simcall_pre(&self->simcall, 0);
666 return self->simcall.result.i;
668 inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
669 smx_process_t self = SIMIX_process_self();
671 /* Go to that function to follow the code flow through the simcall barrier */
672 if (0) SIMIX_pre_vm_migrate(&self->simcall, ind_vm, ind_dst_pm);
673 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
675 self->simcall.call = SIMCALL_VM_MIGRATE;
676 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
677 memset(self->simcall.args, 0, sizeof(self->simcall.args));
678 self->simcall.args[0].dp = (void*) ind_vm;
679 self->simcall.args[1].dp = (void*) ind_dst_pm;
680 if (self != simix_global->maestro_process) {
681 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
682 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
683 SIMIX_process_yield(self);
685 SIMIX_simcall_pre(&self->simcall, 0);
689 inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
690 smx_process_t self = SIMIX_process_self();
692 /* Go to that function to follow the code flow through the simcall barrier */
693 if (0) SIMIX_pre_vm_get_pm(&self->simcall, ind_vm);
694 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
696 self->simcall.call = SIMCALL_VM_GET_PM;
697 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
698 memset(self->simcall.args, 0, sizeof(self->simcall.args));
699 self->simcall.args[0].dp = (void*) ind_vm;
700 if (self != simix_global->maestro_process) {
701 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
702 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
703 SIMIX_process_yield(self);
705 SIMIX_simcall_pre(&self->simcall, 0);
707 return self->simcall.result.dp;
709 inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
710 smx_process_t self = SIMIX_process_self();
712 /* Go to that function to follow the code flow through the simcall barrier */
713 if (0) SIMIX_pre_vm_set_bound(&self->simcall, ind_vm, bound);
714 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
716 self->simcall.call = SIMCALL_VM_SET_BOUND;
717 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
718 memset(self->simcall.args, 0, sizeof(self->simcall.args));
719 self->simcall.args[0].dp = (void*) ind_vm;
720 self->simcall.args[1].d = (double) bound;
721 if (self != simix_global->maestro_process) {
722 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
723 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
724 SIMIX_process_yield(self);
726 SIMIX_simcall_pre(&self->simcall, 0);
730 inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
731 smx_process_t self = SIMIX_process_self();
733 /* Go to that function to follow the code flow through the simcall barrier */
734 if (0) SIMIX_pre_vm_set_affinity(&self->simcall, ind_vm, ind_pm, mask);
735 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
737 self->simcall.call = SIMCALL_VM_SET_AFFINITY;
738 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
739 memset(self->simcall.args, 0, sizeof(self->simcall.args));
740 self->simcall.args[0].dp = (void*) ind_vm;
741 self->simcall.args[1].dp = (void*) ind_pm;
742 self->simcall.args[2].ul = (unsigned long) mask;
743 if (self != simix_global->maestro_process) {
744 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
745 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
746 SIMIX_process_yield(self);
748 SIMIX_simcall_pre(&self->simcall, 0);
752 inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
753 smx_process_t self = SIMIX_process_self();
755 /* Go to that function to follow the code flow through the simcall barrier */
756 if (0) SIMIX_pre_vm_destroy(&self->simcall, ind_vm);
757 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
759 self->simcall.call = SIMCALL_VM_DESTROY;
760 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
761 memset(self->simcall.args, 0, sizeof(self->simcall.args));
762 self->simcall.args[0].dp = (void*) ind_vm;
763 if (self != simix_global->maestro_process) {
764 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
765 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
766 SIMIX_process_yield(self);
768 SIMIX_simcall_pre(&self->simcall, 0);
772 inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
773 smx_process_t self = SIMIX_process_self();
775 /* Go to that function to follow the code flow through the simcall barrier */
776 if (0) SIMIX_pre_vm_suspend(&self->simcall, ind_vm);
777 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
779 self->simcall.call = SIMCALL_VM_SUSPEND;
780 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
781 memset(self->simcall.args, 0, sizeof(self->simcall.args));
782 self->simcall.args[0].dp = (void*) ind_vm;
783 if (self != simix_global->maestro_process) {
784 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
785 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
786 SIMIX_process_yield(self);
788 SIMIX_simcall_pre(&self->simcall, 0);
792 inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
793 smx_process_t self = SIMIX_process_self();
795 /* Go to that function to follow the code flow through the simcall barrier */
796 if (0) SIMIX_pre_vm_resume(&self->simcall, ind_vm);
797 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
799 self->simcall.call = SIMCALL_VM_RESUME;
800 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
801 memset(self->simcall.args, 0, sizeof(self->simcall.args));
802 self->simcall.args[0].dp = (void*) ind_vm;
803 if (self != simix_global->maestro_process) {
804 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
805 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
806 SIMIX_process_yield(self);
808 SIMIX_simcall_pre(&self->simcall, 0);
812 inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
813 smx_process_t self = SIMIX_process_self();
815 /* Go to that function to follow the code flow through the simcall barrier */
816 if (0) SIMIX_pre_vm_shutdown(&self->simcall, ind_vm);
817 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
819 self->simcall.call = SIMCALL_VM_SHUTDOWN;
820 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
821 memset(self->simcall.args, 0, sizeof(self->simcall.args));
822 self->simcall.args[0].dp = (void*) ind_vm;
823 if (self != simix_global->maestro_process) {
824 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
825 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
826 SIMIX_process_yield(self);
828 SIMIX_simcall_pre(&self->simcall, 0);
832 inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
833 smx_process_t self = SIMIX_process_self();
835 /* Go to that function to follow the code flow through the simcall barrier */
836 if (0) SIMIX_pre_vm_save(&self->simcall, ind_vm);
837 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
839 self->simcall.call = SIMCALL_VM_SAVE;
840 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
841 memset(self->simcall.args, 0, sizeof(self->simcall.args));
842 self->simcall.args[0].dp = (void*) ind_vm;
843 if (self != simix_global->maestro_process) {
844 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
845 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
846 SIMIX_process_yield(self);
848 SIMIX_simcall_pre(&self->simcall, 0);
852 inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
853 smx_process_t self = SIMIX_process_self();
855 /* Go to that function to follow the code flow through the simcall barrier */
856 if (0) SIMIX_pre_vm_restore(&self->simcall, ind_vm);
857 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
859 self->simcall.call = SIMCALL_VM_RESTORE;
860 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
861 memset(self->simcall.args, 0, sizeof(self->simcall.args));
862 self->simcall.args[0].dp = (void*) ind_vm;
863 if (self != simix_global->maestro_process) {
864 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
865 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
866 SIMIX_process_yield(self);
868 SIMIX_simcall_pre(&self->simcall, 0);
872 inline static void simcall_BODY_process_create(smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart) {
873 smx_process_t self = SIMIX_process_self();
875 /* Go to that function to follow the code flow through the simcall barrier */
876 if (0) SIMIX_pre_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
877 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
879 self->simcall.call = SIMCALL_PROCESS_CREATE;
880 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
881 memset(self->simcall.args, 0, sizeof(self->simcall.args));
882 self->simcall.args[0].dp = (void*) process;
883 self->simcall.args[1].cc = (const char*) name;
884 self->simcall.args[2].fp = (FPtr) code;
885 self->simcall.args[3].dp = (void*) data;
886 self->simcall.args[4].cc = (const char*) hostname;
887 self->simcall.args[5].d = (double) kill_time;
888 self->simcall.args[6].i = (int) argc;
889 self->simcall.args[7].dp = (void*) argv;
890 self->simcall.args[8].dp = (void*) properties;
891 self->simcall.args[9].i = (int) auto_restart;
892 if (self != simix_global->maestro_process) {
893 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
894 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
895 SIMIX_process_yield(self);
897 SIMIX_simcall_pre(&self->simcall, 0);
901 inline static void simcall_BODY_process_kill(smx_process_t process) {
902 smx_process_t self = SIMIX_process_self();
904 /* Go to that function to follow the code flow through the simcall barrier */
905 if (0) SIMIX_pre_process_kill(&self->simcall, process);
906 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
908 self->simcall.call = SIMCALL_PROCESS_KILL;
909 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
910 memset(self->simcall.args, 0, sizeof(self->simcall.args));
911 self->simcall.args[0].dp = (void*) process;
912 if (self != simix_global->maestro_process) {
913 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
914 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
915 SIMIX_process_yield(self);
917 SIMIX_simcall_pre(&self->simcall, 0);
921 inline static void simcall_BODY_process_killall(int reset_pid) {
922 smx_process_t self = SIMIX_process_self();
924 /* Go to that function to follow the code flow through the simcall barrier */
925 if (0) SIMIX_pre_process_killall(&self->simcall, reset_pid);
926 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
928 self->simcall.call = SIMCALL_PROCESS_KILLALL;
929 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
930 memset(self->simcall.args, 0, sizeof(self->simcall.args));
931 self->simcall.args[0].i = (int) reset_pid;
932 if (self != simix_global->maestro_process) {
933 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
934 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
935 SIMIX_process_yield(self);
937 SIMIX_simcall_pre(&self->simcall, 0);
941 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
942 smx_process_t self = SIMIX_process_self();
944 /* Go to that function to follow the code flow through the simcall barrier */
945 if (0) SIMIX_pre_process_cleanup(&self->simcall, process);
946 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
948 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
949 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
950 memset(self->simcall.args, 0, sizeof(self->simcall.args));
951 self->simcall.args[0].dp = (void*) process;
952 if (self != simix_global->maestro_process) {
953 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
954 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
955 SIMIX_process_yield(self);
957 SIMIX_simcall_pre(&self->simcall, 0);
961 inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
962 smx_process_t self = SIMIX_process_self();
964 /* Go to that function to follow the code flow through the simcall barrier */
965 if (0) SIMIX_pre_process_change_host(&self->simcall, process, dest);
966 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
968 self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
969 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
970 memset(self->simcall.args, 0, sizeof(self->simcall.args));
971 self->simcall.args[0].dp = (void*) process;
972 self->simcall.args[1].dp = (void*) dest;
973 if (self != simix_global->maestro_process) {
974 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
975 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
976 SIMIX_process_yield(self);
978 SIMIX_simcall_pre(&self->simcall, 0);
982 inline static void simcall_BODY_process_suspend(smx_process_t process) {
983 smx_process_t self = SIMIX_process_self();
985 /* Go to that function to follow the code flow through the simcall barrier */
986 if (0) SIMIX_pre_process_suspend(&self->simcall, process);
987 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
989 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
990 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
991 memset(self->simcall.args, 0, sizeof(self->simcall.args));
992 self->simcall.args[0].dp = (void*) process;
993 if (self != simix_global->maestro_process) {
994 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
995 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
996 SIMIX_process_yield(self);
998 SIMIX_simcall_pre(&self->simcall, 0);
1002 inline static void simcall_BODY_process_resume(smx_process_t process) {
1003 smx_process_t self = SIMIX_process_self();
1005 /* Go to that function to follow the code flow through the simcall barrier */
1006 if (0) SIMIX_pre_process_resume(&self->simcall, process);
1007 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1009 self->simcall.call = SIMCALL_PROCESS_RESUME;
1010 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1011 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1012 self->simcall.args[0].dp = (void*) process;
1013 if (self != simix_global->maestro_process) {
1014 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1015 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1016 SIMIX_process_yield(self);
1018 SIMIX_simcall_pre(&self->simcall, 0);
1022 inline static int simcall_BODY_process_count() {
1023 smx_process_t self = SIMIX_process_self();
1025 /* Go to that function to follow the code flow through the simcall barrier */
1026 if (0) SIMIX_pre_process_count(&self->simcall);
1027 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1029 self->simcall.call = SIMCALL_PROCESS_COUNT;
1030 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1031 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1033 if (self != simix_global->maestro_process) {
1034 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1035 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1036 SIMIX_process_yield(self);
1038 SIMIX_simcall_pre(&self->simcall, 0);
1040 return self->simcall.result.i;
1042 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
1043 smx_process_t self = SIMIX_process_self();
1045 /* Go to that function to follow the code flow through the simcall barrier */
1046 if (0) SIMIX_pre_process_get_PID(&self->simcall, process);
1047 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1049 self->simcall.call = SIMCALL_PROCESS_GET_PID;
1050 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1051 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1052 self->simcall.args[0].dp = (void*) process;
1053 if (self != simix_global->maestro_process) {
1054 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1055 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1056 SIMIX_process_yield(self);
1058 SIMIX_simcall_pre(&self->simcall, 0);
1060 return self->simcall.result.i;
1062 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
1063 smx_process_t self = SIMIX_process_self();
1065 /* Go to that function to follow the code flow through the simcall barrier */
1066 if (0) SIMIX_pre_process_get_PPID(&self->simcall, process);
1067 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1069 self->simcall.call = SIMCALL_PROCESS_GET_PPID;
1070 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1071 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1072 self->simcall.args[0].dp = (void*) process;
1073 if (self != simix_global->maestro_process) {
1074 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1075 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1076 SIMIX_process_yield(self);
1078 SIMIX_simcall_pre(&self->simcall, 0);
1080 return self->simcall.result.i;
1082 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
1083 smx_process_t self = SIMIX_process_self();
1085 /* Go to that function to follow the code flow through the simcall barrier */
1086 if (0) SIMIX_pre_process_get_data(&self->simcall, process);
1087 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1089 self->simcall.call = SIMCALL_PROCESS_GET_DATA;
1090 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1091 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1092 self->simcall.args[0].dp = (void*) process;
1093 if (self != simix_global->maestro_process) {
1094 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1095 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1096 SIMIX_process_yield(self);
1098 SIMIX_simcall_pre(&self->simcall, 0);
1100 return self->simcall.result.dp;
1102 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
1103 smx_process_t self = SIMIX_process_self();
1105 /* Go to that function to follow the code flow through the simcall barrier */
1106 if (0) SIMIX_pre_process_set_data(&self->simcall, process, data);
1107 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1109 self->simcall.call = SIMCALL_PROCESS_SET_DATA;
1110 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1111 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1112 self->simcall.args[0].dp = (void*) process;
1113 self->simcall.args[1].dp = (void*) data;
1114 if (self != simix_global->maestro_process) {
1115 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1116 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1117 SIMIX_process_yield(self);
1119 SIMIX_simcall_pre(&self->simcall, 0);
1123 inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
1124 smx_process_t self = SIMIX_process_self();
1126 /* Go to that function to follow the code flow through the simcall barrier */
1127 if (0) SIMIX_pre_process_get_host(&self->simcall, process);
1128 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1130 self->simcall.call = SIMCALL_PROCESS_GET_HOST;
1131 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1132 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1133 self->simcall.args[0].dp = (void*) process;
1134 if (self != simix_global->maestro_process) {
1135 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1136 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1137 SIMIX_process_yield(self);
1139 SIMIX_simcall_pre(&self->simcall, 0);
1141 return self->simcall.result.dp;
1143 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
1144 smx_process_t self = SIMIX_process_self();
1146 /* Go to that function to follow the code flow through the simcall barrier */
1147 if (0) SIMIX_pre_process_get_name(&self->simcall, process);
1148 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1150 self->simcall.call = SIMCALL_PROCESS_GET_NAME;
1151 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1152 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1153 self->simcall.args[0].dp = (void*) process;
1154 if (self != simix_global->maestro_process) {
1155 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1156 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1157 SIMIX_process_yield(self);
1159 SIMIX_simcall_pre(&self->simcall, 0);
1161 return self->simcall.result.cc;
1163 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
1164 smx_process_t self = SIMIX_process_self();
1166 /* Go to that function to follow the code flow through the simcall barrier */
1167 if (0) SIMIX_pre_process_is_suspended(&self->simcall, process);
1168 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1170 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
1171 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1172 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1173 self->simcall.args[0].dp = (void*) process;
1174 if (self != simix_global->maestro_process) {
1175 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1176 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1177 SIMIX_process_yield(self);
1179 SIMIX_simcall_pre(&self->simcall, 0);
1181 return self->simcall.result.i;
1183 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
1184 smx_process_t self = SIMIX_process_self();
1186 /* Go to that function to follow the code flow through the simcall barrier */
1187 if (0) SIMIX_pre_process_get_properties(&self->simcall, process);
1188 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1190 self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
1191 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1192 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1193 self->simcall.args[0].dp = (void*) process;
1194 if (self != simix_global->maestro_process) {
1195 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1196 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1197 SIMIX_process_yield(self);
1199 SIMIX_simcall_pre(&self->simcall, 0);
1201 return self->simcall.result.dp;
1203 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
1204 smx_process_t self = SIMIX_process_self();
1206 /* Go to that function to follow the code flow through the simcall barrier */
1207 if (0) SIMIX_pre_process_join(&self->simcall, process, timeout);
1208 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1210 self->simcall.call = SIMCALL_PROCESS_JOIN;
1211 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1212 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1213 self->simcall.args[0].dp = (void*) process;
1214 self->simcall.args[1].d = (double) timeout;
1215 if (self != simix_global->maestro_process) {
1216 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1217 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1218 SIMIX_process_yield(self);
1220 SIMIX_simcall_pre(&self->simcall, 0);
1222 return self->simcall.result.i;
1224 inline static int simcall_BODY_process_sleep(double duration) {
1225 smx_process_t self = SIMIX_process_self();
1227 /* Go to that function to follow the code flow through the simcall barrier */
1228 if (0) SIMIX_pre_process_sleep(&self->simcall, duration);
1229 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1231 self->simcall.call = SIMCALL_PROCESS_SLEEP;
1232 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1233 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1234 self->simcall.args[0].d = (double) duration;
1235 if (self != simix_global->maestro_process) {
1236 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1237 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1238 SIMIX_process_yield(self);
1240 SIMIX_simcall_pre(&self->simcall, 0);
1242 return self->simcall.result.i;
1244 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1245 smx_process_t self = SIMIX_process_self();
1247 /* Go to that function to follow the code flow through the simcall barrier */
1248 if (0) SIMIX_pre_process_on_exit(&self->simcall, process, fun, data);
1249 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1251 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1252 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1253 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1254 self->simcall.args[0].dp = (void*) process;
1255 self->simcall.args[1].fp = (FPtr) fun;
1256 self->simcall.args[2].dp = (void*) data;
1257 if (self != simix_global->maestro_process) {
1258 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1259 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1260 SIMIX_process_yield(self);
1262 SIMIX_simcall_pre(&self->simcall, 0);
1266 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
1267 smx_process_t self = SIMIX_process_self();
1269 /* Go to that function to follow the code flow through the simcall barrier */
1270 if (0) SIMIX_pre_process_auto_restart_set(&self->simcall, process, auto_restart);
1271 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1273 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
1274 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1275 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1276 self->simcall.args[0].dp = (void*) process;
1277 self->simcall.args[1].i = (int) auto_restart;
1278 if (self != simix_global->maestro_process) {
1279 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1280 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1281 SIMIX_process_yield(self);
1283 SIMIX_simcall_pre(&self->simcall, 0);
1287 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1288 smx_process_t self = SIMIX_process_self();
1290 /* Go to that function to follow the code flow through the simcall barrier */
1291 if (0) SIMIX_pre_process_restart(&self->simcall, process);
1292 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1294 self->simcall.call = SIMCALL_PROCESS_RESTART;
1295 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1296 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1297 self->simcall.args[0].dp = (void*) process;
1298 if (self != simix_global->maestro_process) {
1299 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1300 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1301 SIMIX_process_yield(self);
1303 SIMIX_simcall_pre(&self->simcall, 0);
1305 return self->simcall.result.dp;
1307 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1308 smx_process_t self = SIMIX_process_self();
1310 /* Go to that function to follow the code flow through the simcall barrier */
1311 if (0) SIMIX_pre_rdv_create(&self->simcall, name);
1312 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1314 self->simcall.call = SIMCALL_RDV_CREATE;
1315 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1316 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1317 self->simcall.args[0].cc = (const char*) name;
1318 if (self != simix_global->maestro_process) {
1319 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1320 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1321 SIMIX_process_yield(self);
1323 SIMIX_simcall_pre(&self->simcall, 0);
1325 return self->simcall.result.dp;
1327 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1328 smx_process_t self = SIMIX_process_self();
1330 /* Go to that function to follow the code flow through the simcall barrier */
1331 if (0) SIMIX_pre_rdv_destroy(&self->simcall, rdv);
1332 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1334 self->simcall.call = SIMCALL_RDV_DESTROY;
1335 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1336 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1337 self->simcall.args[0].dp = (void*) rdv;
1338 if (self != simix_global->maestro_process) {
1339 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1340 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1341 SIMIX_process_yield(self);
1343 SIMIX_simcall_pre(&self->simcall, 0);
1347 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
1348 smx_process_t self = SIMIX_process_self();
1350 /* Go to that function to follow the code flow through the simcall barrier */
1351 if (0) SIMIX_pre_rdv_comm_count_by_host(&self->simcall, rdv, host);
1352 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1354 self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1355 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1356 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1357 self->simcall.args[0].dp = (void*) rdv;
1358 self->simcall.args[1].dp = (void*) host;
1359 if (self != simix_global->maestro_process) {
1360 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1361 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1362 SIMIX_process_yield(self);
1364 SIMIX_simcall_pre(&self->simcall, 0);
1366 return self->simcall.result.ui;
1368 inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1369 smx_process_t self = SIMIX_process_self();
1371 /* Go to that function to follow the code flow through the simcall barrier */
1372 if (0) SIMIX_pre_rdv_get_head(&self->simcall, rdv);
1373 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1375 self->simcall.call = SIMCALL_RDV_GET_HEAD;
1376 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1377 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1378 self->simcall.args[0].dp = (void*) rdv;
1379 if (self != simix_global->maestro_process) {
1380 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1381 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1382 SIMIX_process_yield(self);
1384 SIMIX_simcall_pre(&self->simcall, 0);
1386 return self->simcall.result.dp;
1388 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1389 smx_process_t self = SIMIX_process_self();
1391 /* Go to that function to follow the code flow through the simcall barrier */
1392 if (0) SIMIX_pre_rdv_set_receiver(&self->simcall, rdv, receiver);
1393 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1395 self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1396 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1397 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1398 self->simcall.args[0].dp = (void*) rdv;
1399 self->simcall.args[1].dp = (void*) receiver;
1400 if (self != simix_global->maestro_process) {
1401 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1402 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1403 SIMIX_process_yield(self);
1405 SIMIX_simcall_pre(&self->simcall, 0);
1409 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1410 smx_process_t self = SIMIX_process_self();
1412 /* Go to that function to follow the code flow through the simcall barrier */
1413 if (0) SIMIX_pre_rdv_get_receiver(&self->simcall, rdv);
1414 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1416 self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1417 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1418 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1419 self->simcall.args[0].dp = (void*) rdv;
1420 if (self != simix_global->maestro_process) {
1421 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1422 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1423 SIMIX_process_yield(self);
1425 SIMIX_simcall_pre(&self->simcall, 0);
1427 return self->simcall.result.dp;
1429 inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
1430 smx_process_t self = SIMIX_process_self();
1432 /* Go to that function to follow the code flow through the simcall barrier */
1433 if (0) SIMIX_pre_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1434 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1436 self->simcall.call = SIMCALL_COMM_IPROBE;
1437 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1438 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1439 self->simcall.args[0].dp = (void*) rdv;
1440 self->simcall.args[1].i = (int) type;
1441 self->simcall.args[2].i = (int) src;
1442 self->simcall.args[3].i = (int) tag;
1443 self->simcall.args[4].fp = (FPtr) match_fun;
1444 self->simcall.args[5].dp = (void*) data;
1445 if (self != simix_global->maestro_process) {
1446 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1447 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1448 SIMIX_process_yield(self);
1450 SIMIX_simcall_pre(&self->simcall, 0);
1452 return self->simcall.result.dp;
1454 inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
1455 smx_process_t self = SIMIX_process_self();
1457 /* Go to that function to follow the code flow through the simcall barrier */
1458 if (0) SIMIX_pre_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
1459 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1461 self->simcall.call = SIMCALL_COMM_SEND;
1462 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1463 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1464 self->simcall.args[0].dp = (void*) src;
1465 self->simcall.args[1].dp = (void*) rdv;
1466 self->simcall.args[2].d = (double) task_size;
1467 self->simcall.args[3].d = (double) rate;
1468 self->simcall.args[4].dp = (void*) src_buff;
1469 self->simcall.args[5].sz = (size_t) src_buff_size;
1470 self->simcall.args[6].fp = (FPtr) match_fun;
1471 self->simcall.args[7].fp = (FPtr) copy_data_fun;
1472 self->simcall.args[8].dp = (void*) data;
1473 self->simcall.args[9].d = (double) timeout;
1474 if (self != simix_global->maestro_process) {
1475 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1476 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1477 SIMIX_process_yield(self);
1479 SIMIX_simcall_pre(&self->simcall, 0);
1483 inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
1484 smx_process_t self = SIMIX_process_self();
1486 /* Go to that function to follow the code flow through the simcall barrier */
1487 if (0) SIMIX_pre_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
1488 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1490 self->simcall.call = SIMCALL_COMM_ISEND;
1491 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1492 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1493 self->simcall.args[0].dp = (void*) src;
1494 self->simcall.args[1].dp = (void*) rdv;
1495 self->simcall.args[2].d = (double) task_size;
1496 self->simcall.args[3].d = (double) rate;
1497 self->simcall.args[4].dp = (void*) src_buff;
1498 self->simcall.args[5].sz = (size_t) src_buff_size;
1499 self->simcall.args[6].fp = (FPtr) match_fun;
1500 self->simcall.args[7].fp = (FPtr) clean_fun;
1501 self->simcall.args[8].fp = (FPtr) copy_data_fun;
1502 self->simcall.args[9].dp = (void*) data;
1503 self->simcall.args[10].i = (int) detached;
1504 if (self != simix_global->maestro_process) {
1505 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1506 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1507 SIMIX_process_yield(self);
1509 SIMIX_simcall_pre(&self->simcall, 0);
1511 return self->simcall.result.dp;
1513 inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
1514 smx_process_t self = SIMIX_process_self();
1516 /* Go to that function to follow the code flow through the simcall barrier */
1517 if (0) SIMIX_pre_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1518 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1520 self->simcall.call = SIMCALL_COMM_RECV;
1521 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1522 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1523 self->simcall.args[0].dp = (void*) rdv;
1524 self->simcall.args[1].dp = (void*) dst_buff;
1525 self->simcall.args[2].dp = (void*) dst_buff_size;
1526 self->simcall.args[3].fp = (FPtr) match_fun;
1527 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1528 self->simcall.args[5].dp = (void*) data;
1529 self->simcall.args[6].d = (double) timeout;
1530 self->simcall.args[7].d = (double) rate;
1531 if (self != simix_global->maestro_process) {
1532 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1533 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1534 SIMIX_process_yield(self);
1536 SIMIX_simcall_pre(&self->simcall, 0);
1540 inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
1541 smx_process_t self = SIMIX_process_self();
1543 /* Go to that function to follow the code flow through the simcall barrier */
1544 if (0) SIMIX_pre_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1545 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1547 self->simcall.call = SIMCALL_COMM_IRECV;
1548 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1549 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1550 self->simcall.args[0].dp = (void*) rdv;
1551 self->simcall.args[1].dp = (void*) dst_buff;
1552 self->simcall.args[2].dp = (void*) dst_buff_size;
1553 self->simcall.args[3].fp = (FPtr) match_fun;
1554 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1555 self->simcall.args[5].dp = (void*) data;
1556 self->simcall.args[6].d = (double) rate;
1557 if (self != simix_global->maestro_process) {
1558 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1559 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1560 SIMIX_process_yield(self);
1562 SIMIX_simcall_pre(&self->simcall, 0);
1564 return self->simcall.result.dp;
1566 inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
1567 smx_process_t self = SIMIX_process_self();
1569 /* Go to that function to follow the code flow through the simcall barrier */
1570 if (0) SIMIX_pre_comm_cancel(&self->simcall, comm);
1571 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1573 self->simcall.call = SIMCALL_COMM_CANCEL;
1574 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1575 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1576 self->simcall.args[0].dp = (void*) comm;
1577 if (self != simix_global->maestro_process) {
1578 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1579 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1580 SIMIX_process_yield(self);
1582 SIMIX_simcall_pre(&self->simcall, 0);
1586 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1587 smx_process_t self = SIMIX_process_self();
1589 /* Go to that function to follow the code flow through the simcall barrier */
1590 if (0) SIMIX_pre_comm_waitany(&self->simcall, comms);
1591 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1593 self->simcall.call = SIMCALL_COMM_WAITANY;
1594 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1595 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1596 self->simcall.args[0].dp = (void*) comms;
1597 if (self != simix_global->maestro_process) {
1598 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1599 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1600 SIMIX_process_yield(self);
1602 SIMIX_simcall_pre(&self->simcall, 0);
1604 return self->simcall.result.i;
1606 inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
1607 smx_process_t self = SIMIX_process_self();
1609 /* Go to that function to follow the code flow through the simcall barrier */
1610 if (0) SIMIX_pre_comm_wait(&self->simcall, comm, timeout);
1611 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1613 self->simcall.call = SIMCALL_COMM_WAIT;
1614 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1615 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1616 self->simcall.args[0].dp = (void*) comm;
1617 self->simcall.args[1].d = (double) timeout;
1618 if (self != simix_global->maestro_process) {
1619 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1620 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1621 SIMIX_process_yield(self);
1623 SIMIX_simcall_pre(&self->simcall, 0);
1627 inline static int simcall_BODY_comm_test(smx_action_t comm) {
1628 smx_process_t self = SIMIX_process_self();
1630 /* Go to that function to follow the code flow through the simcall barrier */
1631 if (0) SIMIX_pre_comm_test(&self->simcall, comm);
1632 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1634 self->simcall.call = SIMCALL_COMM_TEST;
1635 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1636 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1637 self->simcall.args[0].dp = (void*) comm;
1638 if (self != simix_global->maestro_process) {
1639 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1640 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1641 SIMIX_process_yield(self);
1643 SIMIX_simcall_pre(&self->simcall, 0);
1645 return self->simcall.result.i;
1647 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1648 smx_process_t self = SIMIX_process_self();
1650 /* Go to that function to follow the code flow through the simcall barrier */
1651 if (0) SIMIX_pre_comm_testany(&self->simcall, comms);
1652 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1654 self->simcall.call = SIMCALL_COMM_TESTANY;
1655 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1656 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1657 self->simcall.args[0].dp = (void*) comms;
1658 if (self != simix_global->maestro_process) {
1659 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1660 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1661 SIMIX_process_yield(self);
1663 SIMIX_simcall_pre(&self->simcall, 0);
1665 return self->simcall.result.i;
1667 inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
1668 smx_process_t self = SIMIX_process_self();
1670 /* Go to that function to follow the code flow through the simcall barrier */
1671 if (0) SIMIX_pre_comm_get_remains(&self->simcall, comm);
1672 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1674 self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1675 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1676 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1677 self->simcall.args[0].dp = (void*) comm;
1678 if (self != simix_global->maestro_process) {
1679 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1680 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1681 SIMIX_process_yield(self);
1683 SIMIX_simcall_pre(&self->simcall, 0);
1685 return self->simcall.result.d;
1687 inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
1688 smx_process_t self = SIMIX_process_self();
1690 /* Go to that function to follow the code flow through the simcall barrier */
1691 if (0) SIMIX_pre_comm_get_state(&self->simcall, comm);
1692 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1694 self->simcall.call = SIMCALL_COMM_GET_STATE;
1695 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1696 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1697 self->simcall.args[0].dp = (void*) comm;
1698 if (self != simix_global->maestro_process) {
1699 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1700 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1701 SIMIX_process_yield(self);
1703 SIMIX_simcall_pre(&self->simcall, 0);
1705 return self->simcall.result.i;
1707 inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
1708 smx_process_t self = SIMIX_process_self();
1710 /* Go to that function to follow the code flow through the simcall barrier */
1711 if (0) SIMIX_pre_comm_get_src_data(&self->simcall, comm);
1712 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1714 self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1715 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1716 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1717 self->simcall.args[0].dp = (void*) comm;
1718 if (self != simix_global->maestro_process) {
1719 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1720 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1721 SIMIX_process_yield(self);
1723 SIMIX_simcall_pre(&self->simcall, 0);
1725 return self->simcall.result.dp;
1727 inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
1728 smx_process_t self = SIMIX_process_self();
1730 /* Go to that function to follow the code flow through the simcall barrier */
1731 if (0) SIMIX_pre_comm_get_dst_data(&self->simcall, comm);
1732 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1734 self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1735 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1736 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1737 self->simcall.args[0].dp = (void*) comm;
1738 if (self != simix_global->maestro_process) {
1739 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1740 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1741 SIMIX_process_yield(self);
1743 SIMIX_simcall_pre(&self->simcall, 0);
1745 return self->simcall.result.dp;
1747 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
1748 smx_process_t self = SIMIX_process_self();
1750 /* Go to that function to follow the code flow through the simcall barrier */
1751 if (0) SIMIX_pre_comm_get_src_proc(&self->simcall, comm);
1752 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1754 self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1755 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1756 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1757 self->simcall.args[0].dp = (void*) comm;
1758 if (self != simix_global->maestro_process) {
1759 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1760 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1761 SIMIX_process_yield(self);
1763 SIMIX_simcall_pre(&self->simcall, 0);
1765 return self->simcall.result.dp;
1767 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
1768 smx_process_t self = SIMIX_process_self();
1770 /* Go to that function to follow the code flow through the simcall barrier */
1771 if (0) SIMIX_pre_comm_get_dst_proc(&self->simcall, comm);
1772 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1774 self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1775 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1776 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1777 self->simcall.args[0].dp = (void*) comm;
1778 if (self != simix_global->maestro_process) {
1779 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1780 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1781 SIMIX_process_yield(self);
1783 SIMIX_simcall_pre(&self->simcall, 0);
1785 return self->simcall.result.dp;
1787 inline static smx_mutex_t simcall_BODY_mutex_init() {
1788 smx_process_t self = SIMIX_process_self();
1790 /* Go to that function to follow the code flow through the simcall barrier */
1791 if (0) SIMIX_pre_mutex_init(&self->simcall);
1792 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1794 self->simcall.call = SIMCALL_MUTEX_INIT;
1795 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1796 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1798 if (self != simix_global->maestro_process) {
1799 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1800 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1801 SIMIX_process_yield(self);
1803 SIMIX_simcall_pre(&self->simcall, 0);
1805 return self->simcall.result.dp;
1807 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1808 smx_process_t self = SIMIX_process_self();
1810 /* Go to that function to follow the code flow through the simcall barrier */
1811 if (0) SIMIX_pre_mutex_destroy(&self->simcall, mutex);
1812 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1814 self->simcall.call = SIMCALL_MUTEX_DESTROY;
1815 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1816 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1817 self->simcall.args[0].dp = (void*) mutex;
1818 if (self != simix_global->maestro_process) {
1819 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1820 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1821 SIMIX_process_yield(self);
1823 SIMIX_simcall_pre(&self->simcall, 0);
1827 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1828 smx_process_t self = SIMIX_process_self();
1830 /* Go to that function to follow the code flow through the simcall barrier */
1831 if (0) SIMIX_pre_mutex_lock(&self->simcall, mutex);
1832 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1834 self->simcall.call = SIMCALL_MUTEX_LOCK;
1835 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1836 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1837 self->simcall.args[0].dp = (void*) mutex;
1838 if (self != simix_global->maestro_process) {
1839 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1840 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1841 SIMIX_process_yield(self);
1843 SIMIX_simcall_pre(&self->simcall, 0);
1847 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1848 smx_process_t self = SIMIX_process_self();
1850 /* Go to that function to follow the code flow through the simcall barrier */
1851 if (0) SIMIX_pre_mutex_trylock(&self->simcall, mutex);
1852 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1854 self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1855 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1856 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1857 self->simcall.args[0].dp = (void*) mutex;
1858 if (self != simix_global->maestro_process) {
1859 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1860 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1861 SIMIX_process_yield(self);
1863 SIMIX_simcall_pre(&self->simcall, 0);
1865 return self->simcall.result.i;
1867 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1868 smx_process_t self = SIMIX_process_self();
1870 /* Go to that function to follow the code flow through the simcall barrier */
1871 if (0) SIMIX_pre_mutex_unlock(&self->simcall, mutex);
1872 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1874 self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1875 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1876 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1877 self->simcall.args[0].dp = (void*) mutex;
1878 if (self != simix_global->maestro_process) {
1879 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1880 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1881 SIMIX_process_yield(self);
1883 SIMIX_simcall_pre(&self->simcall, 0);
1887 inline static smx_cond_t simcall_BODY_cond_init() {
1888 smx_process_t self = SIMIX_process_self();
1890 /* Go to that function to follow the code flow through the simcall barrier */
1891 if (0) SIMIX_pre_cond_init(&self->simcall);
1892 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1894 self->simcall.call = SIMCALL_COND_INIT;
1895 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1896 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1898 if (self != simix_global->maestro_process) {
1899 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1900 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1901 SIMIX_process_yield(self);
1903 SIMIX_simcall_pre(&self->simcall, 0);
1905 return self->simcall.result.dp;
1907 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
1908 smx_process_t self = SIMIX_process_self();
1910 /* Go to that function to follow the code flow through the simcall barrier */
1911 if (0) SIMIX_pre_cond_destroy(&self->simcall, cond);
1912 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1914 self->simcall.call = SIMCALL_COND_DESTROY;
1915 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1916 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1917 self->simcall.args[0].dp = (void*) cond;
1918 if (self != simix_global->maestro_process) {
1919 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1920 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1921 SIMIX_process_yield(self);
1923 SIMIX_simcall_pre(&self->simcall, 0);
1927 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
1928 smx_process_t self = SIMIX_process_self();
1930 /* Go to that function to follow the code flow through the simcall barrier */
1931 if (0) SIMIX_pre_cond_signal(&self->simcall, cond);
1932 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1934 self->simcall.call = SIMCALL_COND_SIGNAL;
1935 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1936 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1937 self->simcall.args[0].dp = (void*) cond;
1938 if (self != simix_global->maestro_process) {
1939 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1940 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1941 SIMIX_process_yield(self);
1943 SIMIX_simcall_pre(&self->simcall, 0);
1947 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
1948 smx_process_t self = SIMIX_process_self();
1950 /* Go to that function to follow the code flow through the simcall barrier */
1951 if (0) SIMIX_pre_cond_wait(&self->simcall, cond, mutex);
1952 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1954 self->simcall.call = SIMCALL_COND_WAIT;
1955 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1956 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1957 self->simcall.args[0].dp = (void*) cond;
1958 self->simcall.args[1].dp = (void*) mutex;
1959 if (self != simix_global->maestro_process) {
1960 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1961 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1962 SIMIX_process_yield(self);
1964 SIMIX_simcall_pre(&self->simcall, 0);
1968 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1969 smx_process_t self = SIMIX_process_self();
1971 /* Go to that function to follow the code flow through the simcall barrier */
1972 if (0) SIMIX_pre_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
1973 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1975 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
1976 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1977 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1978 self->simcall.args[0].dp = (void*) cond;
1979 self->simcall.args[1].dp = (void*) mutex;
1980 self->simcall.args[2].d = (double) timeout;
1981 if (self != simix_global->maestro_process) {
1982 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1983 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1984 SIMIX_process_yield(self);
1986 SIMIX_simcall_pre(&self->simcall, 0);
1990 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1991 smx_process_t self = SIMIX_process_self();
1993 /* Go to that function to follow the code flow through the simcall barrier */
1994 if (0) SIMIX_pre_cond_broadcast(&self->simcall, cond);
1995 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1997 self->simcall.call = SIMCALL_COND_BROADCAST;
1998 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1999 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2000 self->simcall.args[0].dp = (void*) cond;
2001 if (self != simix_global->maestro_process) {
2002 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2003 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2004 SIMIX_process_yield(self);
2006 SIMIX_simcall_pre(&self->simcall, 0);
2010 inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
2011 smx_process_t self = SIMIX_process_self();
2013 /* Go to that function to follow the code flow through the simcall barrier */
2014 if (0) SIMIX_pre_sem_init(&self->simcall, capacity);
2015 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2017 self->simcall.call = SIMCALL_SEM_INIT;
2018 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2019 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2020 self->simcall.args[0].i = (int) capacity;
2021 if (self != simix_global->maestro_process) {
2022 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2023 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2024 SIMIX_process_yield(self);
2026 SIMIX_simcall_pre(&self->simcall, 0);
2028 return self->simcall.result.dp;
2030 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2031 smx_process_t self = SIMIX_process_self();
2033 /* Go to that function to follow the code flow through the simcall barrier */
2034 if (0) SIMIX_pre_sem_destroy(&self->simcall, sem);
2035 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2037 self->simcall.call = SIMCALL_SEM_DESTROY;
2038 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2039 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2040 self->simcall.args[0].dp = (void*) sem;
2041 if (self != simix_global->maestro_process) {
2042 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2043 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2044 SIMIX_process_yield(self);
2046 SIMIX_simcall_pre(&self->simcall, 0);
2050 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2051 smx_process_t self = SIMIX_process_self();
2053 /* Go to that function to follow the code flow through the simcall barrier */
2054 if (0) SIMIX_pre_sem_release(&self->simcall, sem);
2055 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2057 self->simcall.call = SIMCALL_SEM_RELEASE;
2058 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2059 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2060 self->simcall.args[0].dp = (void*) sem;
2061 if (self != simix_global->maestro_process) {
2062 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2063 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2064 SIMIX_process_yield(self);
2066 SIMIX_simcall_pre(&self->simcall, 0);
2070 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2071 smx_process_t self = SIMIX_process_self();
2073 /* Go to that function to follow the code flow through the simcall barrier */
2074 if (0) SIMIX_pre_sem_would_block(&self->simcall, sem);
2075 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2077 self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2078 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2079 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2080 self->simcall.args[0].dp = (void*) sem;
2081 if (self != simix_global->maestro_process) {
2082 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2083 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2084 SIMIX_process_yield(self);
2086 SIMIX_simcall_pre(&self->simcall, 0);
2088 return self->simcall.result.i;
2090 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2091 smx_process_t self = SIMIX_process_self();
2093 /* Go to that function to follow the code flow through the simcall barrier */
2094 if (0) SIMIX_pre_sem_acquire(&self->simcall, sem);
2095 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2097 self->simcall.call = SIMCALL_SEM_ACQUIRE;
2098 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2099 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2100 self->simcall.args[0].dp = (void*) sem;
2101 if (self != simix_global->maestro_process) {
2102 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2103 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2104 SIMIX_process_yield(self);
2106 SIMIX_simcall_pre(&self->simcall, 0);
2110 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2111 smx_process_t self = SIMIX_process_self();
2113 /* Go to that function to follow the code flow through the simcall barrier */
2114 if (0) SIMIX_pre_sem_acquire_timeout(&self->simcall, sem, timeout);
2115 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2117 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2118 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2119 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2120 self->simcall.args[0].dp = (void*) sem;
2121 self->simcall.args[1].d = (double) timeout;
2122 if (self != simix_global->maestro_process) {
2123 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2124 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2125 SIMIX_process_yield(self);
2127 SIMIX_simcall_pre(&self->simcall, 0);
2131 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2132 smx_process_t self = SIMIX_process_self();
2134 /* Go to that function to follow the code flow through the simcall barrier */
2135 if (0) SIMIX_pre_sem_get_capacity(&self->simcall, sem);
2136 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2138 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2139 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2140 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2141 self->simcall.args[0].dp = (void*) sem;
2142 if (self != simix_global->maestro_process) {
2143 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2144 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2145 SIMIX_process_yield(self);
2147 SIMIX_simcall_pre(&self->simcall, 0);
2149 return self->simcall.result.i;
2151 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
2152 smx_process_t self = SIMIX_process_self();
2154 /* Go to that function to follow the code flow through the simcall barrier */
2155 if (0) SIMIX_pre_file_read(&self->simcall, fd, size, host);
2156 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2158 self->simcall.call = SIMCALL_FILE_READ;
2159 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2160 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2161 self->simcall.args[0].dp = (void*) fd;
2162 self->simcall.args[1].sgsz = (sg_size_t) size;
2163 self->simcall.args[2].dp = (void*) host;
2164 if (self != simix_global->maestro_process) {
2165 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2166 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2167 SIMIX_process_yield(self);
2169 SIMIX_simcall_pre(&self->simcall, 0);
2171 return self->simcall.result.sgsz;
2173 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
2174 smx_process_t self = SIMIX_process_self();
2176 /* Go to that function to follow the code flow through the simcall barrier */
2177 if (0) SIMIX_pre_file_write(&self->simcall, fd, size, host);
2178 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2180 self->simcall.call = SIMCALL_FILE_WRITE;
2181 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2182 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2183 self->simcall.args[0].dp = (void*) fd;
2184 self->simcall.args[1].sgsz = (sg_size_t) size;
2185 self->simcall.args[2].dp = (void*) host;
2186 if (self != simix_global->maestro_process) {
2187 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2188 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2189 SIMIX_process_yield(self);
2191 SIMIX_simcall_pre(&self->simcall, 0);
2193 return self->simcall.result.sgsz;
2195 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
2196 smx_process_t self = SIMIX_process_self();
2198 /* Go to that function to follow the code flow through the simcall barrier */
2199 if (0) SIMIX_pre_file_open(&self->simcall, fullpath, host);
2200 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2202 self->simcall.call = SIMCALL_FILE_OPEN;
2203 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2204 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2205 self->simcall.args[0].cc = (const char*) fullpath;
2206 self->simcall.args[1].dp = (void*) host;
2207 if (self != simix_global->maestro_process) {
2208 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2209 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2210 SIMIX_process_yield(self);
2212 SIMIX_simcall_pre(&self->simcall, 0);
2214 return self->simcall.result.dp;
2216 inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
2217 smx_process_t self = SIMIX_process_self();
2219 /* Go to that function to follow the code flow through the simcall barrier */
2220 if (0) SIMIX_pre_file_close(&self->simcall, fd, host);
2221 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2223 self->simcall.call = SIMCALL_FILE_CLOSE;
2224 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2225 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2226 self->simcall.args[0].dp = (void*) fd;
2227 self->simcall.args[1].dp = (void*) host;
2228 if (self != simix_global->maestro_process) {
2229 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2230 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2231 SIMIX_process_yield(self);
2233 SIMIX_simcall_pre(&self->simcall, 0);
2235 return self->simcall.result.i;
2237 inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
2238 smx_process_t self = SIMIX_process_self();
2240 /* Go to that function to follow the code flow through the simcall barrier */
2241 if (0) SIMIX_pre_file_unlink(&self->simcall, fd, host);
2242 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2244 self->simcall.call = SIMCALL_FILE_UNLINK;
2245 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2246 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2247 self->simcall.args[0].dp = (void*) fd;
2248 self->simcall.args[1].dp = (void*) host;
2249 if (self != simix_global->maestro_process) {
2250 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2251 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2252 SIMIX_process_yield(self);
2254 SIMIX_simcall_pre(&self->simcall, 0);
2256 return self->simcall.result.i;
2258 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2259 smx_process_t self = SIMIX_process_self();
2261 /* Go to that function to follow the code flow through the simcall barrier */
2262 if (0) SIMIX_pre_file_get_size(&self->simcall, fd);
2263 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2265 self->simcall.call = SIMCALL_FILE_GET_SIZE;
2266 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2267 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2268 self->simcall.args[0].dp = (void*) fd;
2269 if (self != simix_global->maestro_process) {
2270 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2271 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2272 SIMIX_process_yield(self);
2274 SIMIX_simcall_pre(&self->simcall, 0);
2276 return self->simcall.result.sgsz;
2278 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2279 smx_process_t self = SIMIX_process_self();
2281 /* Go to that function to follow the code flow through the simcall barrier */
2282 if (0) SIMIX_pre_file_tell(&self->simcall, fd);
2283 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2285 self->simcall.call = SIMCALL_FILE_TELL;
2286 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2287 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2288 self->simcall.args[0].dp = (void*) fd;
2289 if (self != simix_global->maestro_process) {
2290 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2291 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2292 SIMIX_process_yield(self);
2294 SIMIX_simcall_pre(&self->simcall, 0);
2296 return self->simcall.result.sgsz;
2298 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2299 smx_process_t self = SIMIX_process_self();
2301 /* Go to that function to follow the code flow through the simcall barrier */
2302 if (0) SIMIX_pre_file_seek(&self->simcall, fd, offset, origin);
2303 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2305 self->simcall.call = SIMCALL_FILE_SEEK;
2306 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2307 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2308 self->simcall.args[0].dp = (void*) fd;
2309 self->simcall.args[1].sgoff = (sg_offset_t) offset;
2310 self->simcall.args[2].i = (int) origin;
2311 if (self != simix_global->maestro_process) {
2312 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2313 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2314 SIMIX_process_yield(self);
2316 SIMIX_simcall_pre(&self->simcall, 0);
2318 return self->simcall.result.i;
2320 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2321 smx_process_t self = SIMIX_process_self();
2323 /* Go to that function to follow the code flow through the simcall barrier */
2324 if (0) SIMIX_pre_file_get_info(&self->simcall, fd);
2325 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2327 self->simcall.call = SIMCALL_FILE_GET_INFO;
2328 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2329 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2330 self->simcall.args[0].dp = (void*) fd;
2331 if (self != simix_global->maestro_process) {
2332 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2333 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2334 SIMIX_process_yield(self);
2336 SIMIX_simcall_pre(&self->simcall, 0);
2338 return self->simcall.result.dp;
2340 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2341 smx_process_t self = SIMIX_process_self();
2343 /* Go to that function to follow the code flow through the simcall barrier */
2344 if (0) SIMIX_pre_file_move(&self->simcall, fd, fullpath);
2345 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2347 self->simcall.call = SIMCALL_FILE_MOVE;
2348 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2349 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2350 self->simcall.args[0].dp = (void*) fd;
2351 self->simcall.args[1].cc = (const char*) fullpath;
2352 if (self != simix_global->maestro_process) {
2353 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2354 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2355 SIMIX_process_yield(self);
2357 SIMIX_simcall_pre(&self->simcall, 0);
2359 return self->simcall.result.i;
2361 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2362 smx_process_t self = SIMIX_process_self();
2364 /* Go to that function to follow the code flow through the simcall barrier */
2365 if (0) SIMIX_pre_storage_get_free_size(&self->simcall, storage);
2366 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2368 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2369 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2370 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2371 self->simcall.args[0].dp = (void*) storage;
2372 if (self != simix_global->maestro_process) {
2373 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2374 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2375 SIMIX_process_yield(self);
2377 SIMIX_simcall_pre(&self->simcall, 0);
2379 return self->simcall.result.sgsz;
2381 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2382 smx_process_t self = SIMIX_process_self();
2384 /* Go to that function to follow the code flow through the simcall barrier */
2385 if (0) SIMIX_pre_storage_get_used_size(&self->simcall, name);
2386 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2388 self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2389 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2390 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2391 self->simcall.args[0].dp = (void*) name;
2392 if (self != simix_global->maestro_process) {
2393 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2394 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2395 SIMIX_process_yield(self);
2397 SIMIX_simcall_pre(&self->simcall, 0);
2399 return self->simcall.result.sgsz;
2401 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2402 smx_process_t self = SIMIX_process_self();
2404 /* Go to that function to follow the code flow through the simcall barrier */
2405 if (0) SIMIX_pre_storage_get_properties(&self->simcall, storage);
2406 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2408 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2409 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2410 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2411 self->simcall.args[0].dp = (void*) storage;
2412 if (self != simix_global->maestro_process) {
2413 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2414 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2415 SIMIX_process_yield(self);
2417 SIMIX_simcall_pre(&self->simcall, 0);
2419 return self->simcall.result.dp;
2421 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2422 smx_process_t self = SIMIX_process_self();
2424 /* Go to that function to follow the code flow through the simcall barrier */
2425 if (0) SIMIX_pre_storage_get_content(&self->simcall, storage);
2426 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2428 self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2429 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2430 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2431 self->simcall.args[0].dp = (void*) storage;
2432 if (self != simix_global->maestro_process) {
2433 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2434 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2435 SIMIX_process_yield(self);
2437 SIMIX_simcall_pre(&self->simcall, 0);
2439 return self->simcall.result.dp;
2441 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2442 smx_process_t self = SIMIX_process_self();
2444 /* Go to that function to follow the code flow through the simcall barrier */
2445 if (0) SIMIX_pre_asr_get_properties(&self->simcall, name);
2446 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2448 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2449 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2450 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2451 self->simcall.args[0].cc = (const char*) name;
2452 if (self != simix_global->maestro_process) {
2453 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2454 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2455 SIMIX_process_yield(self);
2457 SIMIX_simcall_pre(&self->simcall, 0);
2459 return self->simcall.result.dp;
2461 #ifdef HAVE_LATENCY_BOUND_TRACKING
2462 inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
2463 smx_process_t self = SIMIX_process_self();
2465 /* Go to that function to follow the code flow through the simcall barrier */
2466 if (0) SIMIX_pre_comm_is_latency_bounded(&self->simcall, comm);
2467 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2469 self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2470 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2471 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2472 self->simcall.args[0].dp = (void*) comm;
2473 if (self != simix_global->maestro_process) {
2474 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2475 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2476 SIMIX_process_yield(self);
2478 SIMIX_simcall_pre(&self->simcall, 0);
2480 return self->simcall.result.i;
2485 inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
2486 smx_process_t self = SIMIX_process_self();
2488 /* Go to that function to follow the code flow through the simcall barrier */
2489 if (0) SIMIX_pre_set_category(&self->simcall, action, category);
2490 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2492 self->simcall.call = SIMCALL_SET_CATEGORY;
2493 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2494 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2495 self->simcall.args[0].dp = (void*) action;
2496 self->simcall.args[1].cc = (const char*) category;
2497 if (self != simix_global->maestro_process) {
2498 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2499 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2500 SIMIX_process_yield(self);
2502 SIMIX_simcall_pre(&self->simcall, 0);
2509 inline static void* simcall_BODY_mc_snapshot() {
2510 smx_process_t self = SIMIX_process_self();
2512 /* Go to that function to follow the code flow through the simcall barrier */
2513 if (0) SIMIX_pre_mc_snapshot(&self->simcall);
2514 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2516 self->simcall.call = SIMCALL_MC_SNAPSHOT;
2517 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2518 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2520 if (self != simix_global->maestro_process) {
2521 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2522 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2523 SIMIX_process_yield(self);
2525 SIMIX_simcall_pre(&self->simcall, 0);
2527 return self->simcall.result.dp;
2529 inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
2530 smx_process_t self = SIMIX_process_self();
2532 /* Go to that function to follow the code flow through the simcall barrier */
2533 if (0) SIMIX_pre_mc_compare_snapshots(&self->simcall, s1, s2);
2534 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2536 self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2537 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2538 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2539 self->simcall.args[0].dp = (void*) s1;
2540 self->simcall.args[1].dp = (void*) s2;
2541 if (self != simix_global->maestro_process) {
2542 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2543 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2544 SIMIX_process_yield(self);
2546 SIMIX_simcall_pre(&self->simcall, 0);
2548 return self->simcall.result.i;
2550 inline static int simcall_BODY_mc_random(int min, int max) {
2551 smx_process_t self = SIMIX_process_self();
2553 /* Go to that function to follow the code flow through the simcall barrier */
2554 if (0) SIMIX_pre_mc_random(&self->simcall, min, max);
2555 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2557 self->simcall.call = SIMCALL_MC_RANDOM;
2558 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2559 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2560 self->simcall.args[0].i = (int) min;
2561 self->simcall.args[1].i = (int) max;
2562 if (self != simix_global->maestro_process) {
2563 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2564 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2565 SIMIX_process_yield(self);
2567 SIMIX_simcall_pre(&self->simcall, 0);
2569 return self->simcall.result.i;