1 /**********************************************************************/
2 /* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
4 /* DO NOT EVER CHANGE THIS FILE */
6 /* change simcalls specification in src/simix/simcalls.in */
7 /**********************************************************************/
10 * Note that the name comes from http://en.wikipedia.org/wiki/Popping
11 * Indeed, the control flow is doing a strange dance in there.
13 * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
17 inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
18 smx_process_t self = SIMIX_process_self();
20 /* Go to that function to follow the code flow through the simcall barrier */
21 if (0) SIMIX_pre_host_get_by_name(&self->simcall, name);
22 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
24 self->simcall.call = SIMCALL_HOST_GET_BY_NAME;
25 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
26 memset(self->simcall.args, 0, sizeof(self->simcall.args));
27 self->simcall.args[0].cc = (const char*) name;
28 if (self != simix_global->maestro_process) {
29 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
30 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
31 SIMIX_process_yield(self);
33 SIMIX_simcall_enter(&self->simcall, 0);
35 return self->simcall.result.dp;
38 inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
39 smx_process_t self = SIMIX_process_self();
41 /* Go to that function to follow the code flow through the simcall barrier */
42 if (0) SIMIX_pre_host_get_name(&self->simcall, host);
43 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
45 self->simcall.call = SIMCALL_HOST_GET_NAME;
46 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
47 memset(self->simcall.args, 0, sizeof(self->simcall.args));
48 self->simcall.args[0].dp = (void*) host;
49 if (self != simix_global->maestro_process) {
50 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
51 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
52 SIMIX_process_yield(self);
54 SIMIX_simcall_enter(&self->simcall, 0);
56 return self->simcall.result.cc;
59 inline static void simcall_BODY_host_on(smx_host_t host) {
60 smx_process_t self = SIMIX_process_self();
62 /* Go to that function to follow the code flow through the simcall barrier */
63 if (0) SIMIX_pre_host_on(&self->simcall, host);
64 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
66 self->simcall.call = SIMCALL_HOST_ON;
67 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
68 memset(self->simcall.args, 0, sizeof(self->simcall.args));
69 self->simcall.args[0].dp = (void*) host;
70 if (self != simix_global->maestro_process) {
71 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
72 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
73 SIMIX_process_yield(self);
75 SIMIX_simcall_enter(&self->simcall, 0);
80 inline static void simcall_BODY_host_off(smx_host_t host) {
81 smx_process_t self = SIMIX_process_self();
83 /* Go to that function to follow the code flow through the simcall barrier */
84 if (0) SIMIX_pre_host_off(&self->simcall, host);
85 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
87 self->simcall.call = SIMCALL_HOST_OFF;
88 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
89 memset(self->simcall.args, 0, sizeof(self->simcall.args));
90 self->simcall.args[0].dp = (void*) host;
91 if (self != simix_global->maestro_process) {
92 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
93 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
94 SIMIX_process_yield(self);
96 SIMIX_simcall_enter(&self->simcall, 0);
101 inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
102 smx_process_t self = SIMIX_process_self();
104 /* Go to that function to follow the code flow through the simcall barrier */
105 if (0) SIMIX_pre_host_get_properties(&self->simcall, host);
106 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
108 self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
109 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
110 memset(self->simcall.args, 0, sizeof(self->simcall.args));
111 self->simcall.args[0].dp = (void*) host;
112 if (self != simix_global->maestro_process) {
113 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
114 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
115 SIMIX_process_yield(self);
117 SIMIX_simcall_enter(&self->simcall, 0);
119 return self->simcall.result.dp;
122 inline static int simcall_BODY_host_get_core(smx_host_t host) {
123 smx_process_t self = SIMIX_process_self();
125 /* Go to that function to follow the code flow through the simcall barrier */
126 if (0) SIMIX_pre_host_get_core(&self->simcall, host);
127 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
129 self->simcall.call = SIMCALL_HOST_GET_CORE;
130 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
131 memset(self->simcall.args, 0, sizeof(self->simcall.args));
132 self->simcall.args[0].dp = (void*) host;
133 if (self != simix_global->maestro_process) {
134 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
135 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
136 SIMIX_process_yield(self);
138 SIMIX_simcall_enter(&self->simcall, 0);
140 return self->simcall.result.i;
143 inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
144 smx_process_t self = SIMIX_process_self();
146 /* Go to that function to follow the code flow through the simcall barrier */
147 if (0) SIMIX_pre_host_get_process_list(&self->simcall, host);
148 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
150 self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
151 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
152 memset(self->simcall.args, 0, sizeof(self->simcall.args));
153 self->simcall.args[0].dp = (void*) host;
154 if (self != simix_global->maestro_process) {
155 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
156 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
157 SIMIX_process_yield(self);
159 SIMIX_simcall_enter(&self->simcall, 0);
161 return self->simcall.result.dp;
164 inline static double simcall_BODY_host_get_speed(smx_host_t host) {
165 smx_process_t self = SIMIX_process_self();
167 /* Go to that function to follow the code flow through the simcall barrier */
168 if (0) SIMIX_pre_host_get_speed(&self->simcall, host);
169 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
171 self->simcall.call = SIMCALL_HOST_GET_SPEED;
172 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
173 memset(self->simcall.args, 0, sizeof(self->simcall.args));
174 self->simcall.args[0].dp = (void*) host;
175 if (self != simix_global->maestro_process) {
176 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
177 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
178 SIMIX_process_yield(self);
180 SIMIX_simcall_enter(&self->simcall, 0);
182 return self->simcall.result.d;
185 inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
186 smx_process_t self = SIMIX_process_self();
188 /* Go to that function to follow the code flow through the simcall barrier */
189 if (0) SIMIX_pre_host_get_available_speed(&self->simcall, host);
190 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
192 self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
193 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
194 memset(self->simcall.args, 0, sizeof(self->simcall.args));
195 self->simcall.args[0].dp = (void*) host;
196 if (self != simix_global->maestro_process) {
197 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
198 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
199 SIMIX_process_yield(self);
201 SIMIX_simcall_enter(&self->simcall, 0);
203 return self->simcall.result.d;
206 inline static int simcall_BODY_host_get_state(smx_host_t host) {
207 smx_process_t self = SIMIX_process_self();
209 /* Go to that function to follow the code flow through the simcall barrier */
210 if (0) SIMIX_pre_host_get_state(&self->simcall, host);
211 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
213 self->simcall.call = SIMCALL_HOST_GET_STATE;
214 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
215 memset(self->simcall.args, 0, sizeof(self->simcall.args));
216 self->simcall.args[0].dp = (void*) host;
217 if (self != simix_global->maestro_process) {
218 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
219 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
220 SIMIX_process_yield(self);
222 SIMIX_simcall_enter(&self->simcall, 0);
224 return self->simcall.result.i;
227 inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
228 smx_process_t self = SIMIX_process_self();
230 /* Go to that function to follow the code flow through the simcall barrier */
231 if (0) SIMIX_pre_host_get_current_power_peak(&self->simcall, host);
232 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
234 self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
235 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
236 memset(self->simcall.args, 0, sizeof(self->simcall.args));
237 self->simcall.args[0].dp = (void*) host;
238 if (self != simix_global->maestro_process) {
239 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
240 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
241 SIMIX_process_yield(self);
243 SIMIX_simcall_enter(&self->simcall, 0);
245 return self->simcall.result.d;
248 inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
249 smx_process_t self = SIMIX_process_self();
251 /* Go to that function to follow the code flow through the simcall barrier */
252 if (0) SIMIX_pre_host_get_power_peak_at(&self->simcall, host, pstate_index);
253 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
255 self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
256 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
257 memset(self->simcall.args, 0, sizeof(self->simcall.args));
258 self->simcall.args[0].dp = (void*) host;
259 self->simcall.args[1].i = (int) pstate_index;
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_enter(&self->simcall, 0);
267 return self->simcall.result.d;
270 inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
271 smx_process_t self = SIMIX_process_self();
273 /* Go to that function to follow the code flow through the simcall barrier */
274 if (0) SIMIX_pre_host_get_nb_pstates(&self->simcall, host);
275 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
277 self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
278 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
279 memset(self->simcall.args, 0, sizeof(self->simcall.args));
280 self->simcall.args[0].dp = (void*) host;
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_enter(&self->simcall, 0);
288 return self->simcall.result.i;
291 inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
292 smx_process_t self = SIMIX_process_self();
294 /* Go to that function to follow the code flow through the simcall barrier */
295 if (0) SIMIX_pre_host_set_power_peak_at(&self->simcall, host, pstate_index);
296 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
298 self->simcall.call = SIMCALL_HOST_SET_POWER_PEAK_AT;
299 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
300 memset(self->simcall.args, 0, sizeof(self->simcall.args));
301 self->simcall.args[0].dp = (void*) host;
302 self->simcall.args[1].i = (int) pstate_index;
303 if (self != simix_global->maestro_process) {
304 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
305 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
306 SIMIX_process_yield(self);
308 SIMIX_simcall_enter(&self->simcall, 0);
313 inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
314 smx_process_t self = SIMIX_process_self();
316 /* Go to that function to follow the code flow through the simcall barrier */
317 if (0) SIMIX_pre_host_get_consumed_energy(&self->simcall, host);
318 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
320 self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
321 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
322 memset(self->simcall.args, 0, sizeof(self->simcall.args));
323 self->simcall.args[0].dp = (void*) host;
324 if (self != simix_global->maestro_process) {
325 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
326 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
327 SIMIX_process_yield(self);
329 SIMIX_simcall_enter(&self->simcall, 0);
331 return self->simcall.result.d;
334 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) {
335 smx_process_t self = SIMIX_process_self();
337 /* Go to that function to follow the code flow through the simcall barrier */
338 if (0) SIMIX_pre_host_execute(&self->simcall, name, host, computation_amount, priority, bound, affinity_mask);
339 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
341 self->simcall.call = SIMCALL_HOST_EXECUTE;
342 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
343 memset(self->simcall.args, 0, sizeof(self->simcall.args));
344 self->simcall.args[0].cc = (const char*) name;
345 self->simcall.args[1].dp = (void*) host;
346 self->simcall.args[2].d = (double) computation_amount;
347 self->simcall.args[3].d = (double) priority;
348 self->simcall.args[4].d = (double) bound;
349 self->simcall.args[5].ul = (unsigned long) affinity_mask;
350 if (self != simix_global->maestro_process) {
351 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
352 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
353 SIMIX_process_yield(self);
355 SIMIX_simcall_enter(&self->simcall, 0);
357 return self->simcall.result.dp;
360 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) {
361 smx_process_t self = SIMIX_process_self();
363 /* Go to that function to follow the code flow through the simcall barrier */
364 if (0) SIMIX_pre_host_parallel_execute(&self->simcall, name, host_nb, host_list, computation_amount, communication_amount, amount, rate);
365 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
367 self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
368 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
369 memset(self->simcall.args, 0, sizeof(self->simcall.args));
370 self->simcall.args[0].cc = (const char*) name;
371 self->simcall.args[1].i = (int) host_nb;
372 self->simcall.args[2].dp = (void*) host_list;
373 self->simcall.args[3].dp = (void*) computation_amount;
374 self->simcall.args[4].dp = (void*) communication_amount;
375 self->simcall.args[5].d = (double) amount;
376 self->simcall.args[6].d = (double) rate;
377 if (self != simix_global->maestro_process) {
378 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
379 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
380 SIMIX_process_yield(self);
382 SIMIX_simcall_enter(&self->simcall, 0);
384 return self->simcall.result.dp;
387 inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) {
388 smx_process_t self = SIMIX_process_self();
390 /* Go to that function to follow the code flow through the simcall barrier */
391 if (0) SIMIX_pre_host_execution_destroy(&self->simcall, execution);
392 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
394 self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY;
395 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
396 memset(self->simcall.args, 0, sizeof(self->simcall.args));
397 self->simcall.args[0].dp = (void*) execution;
398 if (self != simix_global->maestro_process) {
399 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
400 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
401 SIMIX_process_yield(self);
403 SIMIX_simcall_enter(&self->simcall, 0);
408 inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) {
409 smx_process_t self = SIMIX_process_self();
411 /* Go to that function to follow the code flow through the simcall barrier */
412 if (0) SIMIX_pre_host_execution_cancel(&self->simcall, execution);
413 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
415 self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL;
416 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
417 memset(self->simcall.args, 0, sizeof(self->simcall.args));
418 self->simcall.args[0].dp = (void*) execution;
419 if (self != simix_global->maestro_process) {
420 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
421 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
422 SIMIX_process_yield(self);
424 SIMIX_simcall_enter(&self->simcall, 0);
429 inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) {
430 smx_process_t self = SIMIX_process_self();
432 /* Go to that function to follow the code flow through the simcall barrier */
433 if (0) SIMIX_pre_host_execution_get_remains(&self->simcall, execution);
434 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
436 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
437 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
438 memset(self->simcall.args, 0, sizeof(self->simcall.args));
439 self->simcall.args[0].dp = (void*) execution;
440 if (self != simix_global->maestro_process) {
441 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
442 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
443 SIMIX_process_yield(self);
445 SIMIX_simcall_enter(&self->simcall, 0);
447 return self->simcall.result.d;
450 inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
451 smx_process_t self = SIMIX_process_self();
453 /* Go to that function to follow the code flow through the simcall barrier */
454 if (0) SIMIX_pre_host_execution_get_state(&self->simcall, execution);
455 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
457 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE;
458 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
459 memset(self->simcall.args, 0, sizeof(self->simcall.args));
460 self->simcall.args[0].dp = (void*) execution;
461 if (self != simix_global->maestro_process) {
462 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
463 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
464 SIMIX_process_yield(self);
466 SIMIX_simcall_enter(&self->simcall, 0);
468 return self->simcall.result.i;
471 inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) {
472 smx_process_t self = SIMIX_process_self();
474 /* Go to that function to follow the code flow through the simcall barrier */
475 if (0) SIMIX_pre_host_execution_set_priority(&self->simcall, execution, priority);
476 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
478 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
479 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
480 memset(self->simcall.args, 0, sizeof(self->simcall.args));
481 self->simcall.args[0].dp = (void*) execution;
482 self->simcall.args[1].d = (double) priority;
483 if (self != simix_global->maestro_process) {
484 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
485 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
486 SIMIX_process_yield(self);
488 SIMIX_simcall_enter(&self->simcall, 0);
493 inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) {
494 smx_process_t self = SIMIX_process_self();
496 /* Go to that function to follow the code flow through the simcall barrier */
497 if (0) SIMIX_pre_host_execution_set_bound(&self->simcall, execution, bound);
498 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
500 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND;
501 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
502 memset(self->simcall.args, 0, sizeof(self->simcall.args));
503 self->simcall.args[0].dp = (void*) execution;
504 self->simcall.args[1].d = (double) bound;
505 if (self != simix_global->maestro_process) {
506 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
507 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
508 SIMIX_process_yield(self);
510 SIMIX_simcall_enter(&self->simcall, 0);
515 inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) {
516 smx_process_t self = SIMIX_process_self();
518 /* Go to that function to follow the code flow through the simcall barrier */
519 if (0) SIMIX_pre_host_execution_set_affinity(&self->simcall, execution, ws, mask);
520 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
522 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY;
523 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
524 memset(self->simcall.args, 0, sizeof(self->simcall.args));
525 self->simcall.args[0].dp = (void*) execution;
526 self->simcall.args[1].dp = (void*) ws;
527 self->simcall.args[2].ul = (unsigned long) mask;
528 if (self != simix_global->maestro_process) {
529 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
530 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
531 SIMIX_process_yield(self);
533 SIMIX_simcall_enter(&self->simcall, 0);
538 inline static int simcall_BODY_host_execution_wait(smx_action_t execution) {
539 smx_process_t self = SIMIX_process_self();
541 /* Go to that function to follow the code flow through the simcall barrier */
542 if (0) SIMIX_pre_host_execution_wait(&self->simcall, execution);
543 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
545 self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT;
546 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
547 memset(self->simcall.args, 0, sizeof(self->simcall.args));
548 self->simcall.args[0].dp = (void*) execution;
549 if (self != simix_global->maestro_process) {
550 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
551 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
552 SIMIX_process_yield(self);
554 SIMIX_simcall_enter(&self->simcall, 0);
556 return self->simcall.result.i;
559 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
560 smx_process_t self = SIMIX_process_self();
562 /* Go to that function to follow the code flow through the simcall barrier */
563 if (0) SIMIX_pre_host_get_mounted_storage_list(&self->simcall, host);
564 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
566 self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
567 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
568 memset(self->simcall.args, 0, sizeof(self->simcall.args));
569 self->simcall.args[0].dp = (void*) host;
570 if (self != simix_global->maestro_process) {
571 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
572 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
573 SIMIX_process_yield(self);
575 SIMIX_simcall_enter(&self->simcall, 0);
577 return self->simcall.result.dp;
580 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
581 smx_process_t self = SIMIX_process_self();
583 /* Go to that function to follow the code flow through the simcall barrier */
584 if (0) SIMIX_pre_host_get_attached_storage_list(&self->simcall, host);
585 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
587 self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
588 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
589 memset(self->simcall.args, 0, sizeof(self->simcall.args));
590 self->simcall.args[0].dp = (void*) host;
591 if (self != simix_global->maestro_process) {
592 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
593 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
594 SIMIX_process_yield(self);
596 SIMIX_simcall_enter(&self->simcall, 0);
598 return self->simcall.result.dp;
601 inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
602 smx_process_t self = SIMIX_process_self();
604 /* Go to that function to follow the code flow through the simcall barrier */
605 if (0) SIMIX_pre_host_get_params(&self->simcall, ind_vm, params);
606 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
608 self->simcall.call = SIMCALL_HOST_GET_PARAMS;
609 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
610 memset(self->simcall.args, 0, sizeof(self->simcall.args));
611 self->simcall.args[0].dp = (void*) ind_vm;
612 self->simcall.args[1].dp = (void*) params;
613 if (self != simix_global->maestro_process) {
614 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
615 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
616 SIMIX_process_yield(self);
618 SIMIX_simcall_enter(&self->simcall, 0);
623 inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
624 smx_process_t self = SIMIX_process_self();
626 /* Go to that function to follow the code flow through the simcall barrier */
627 if (0) SIMIX_pre_host_set_params(&self->simcall, ind_vm, params);
628 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
630 self->simcall.call = SIMCALL_HOST_SET_PARAMS;
631 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
632 memset(self->simcall.args, 0, sizeof(self->simcall.args));
633 self->simcall.args[0].dp = (void*) ind_vm;
634 self->simcall.args[1].dp = (void*) params;
635 if (self != simix_global->maestro_process) {
636 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
637 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
638 SIMIX_process_yield(self);
640 SIMIX_simcall_enter(&self->simcall, 0);
645 inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
646 smx_process_t self = SIMIX_process_self();
648 /* Go to that function to follow the code flow through the simcall barrier */
649 if (0) SIMIX_pre_vm_create(&self->simcall, name, ind_pm);
650 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
652 self->simcall.call = SIMCALL_VM_CREATE;
653 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
654 memset(self->simcall.args, 0, sizeof(self->simcall.args));
655 self->simcall.args[0].cc = (const char*) name;
656 self->simcall.args[1].dp = (void*) ind_pm;
657 if (self != simix_global->maestro_process) {
658 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
659 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
660 SIMIX_process_yield(self);
662 SIMIX_simcall_enter(&self->simcall, 0);
664 return self->simcall.result.dp;
667 inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
668 smx_process_t self = SIMIX_process_self();
670 /* Go to that function to follow the code flow through the simcall barrier */
671 if (0) SIMIX_pre_vm_start(&self->simcall, ind_vm);
672 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
674 self->simcall.call = SIMCALL_VM_START;
675 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
676 memset(self->simcall.args, 0, sizeof(self->simcall.args));
677 self->simcall.args[0].dp = (void*) ind_vm;
678 if (self != simix_global->maestro_process) {
679 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
680 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
681 SIMIX_process_yield(self);
683 SIMIX_simcall_enter(&self->simcall, 0);
688 inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
689 smx_process_t self = SIMIX_process_self();
691 /* Go to that function to follow the code flow through the simcall barrier */
692 if (0) SIMIX_pre_vm_get_state(&self->simcall, ind_vm);
693 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
695 self->simcall.call = SIMCALL_VM_GET_STATE;
696 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
697 memset(self->simcall.args, 0, sizeof(self->simcall.args));
698 self->simcall.args[0].dp = (void*) ind_vm;
699 if (self != simix_global->maestro_process) {
700 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
701 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
702 SIMIX_process_yield(self);
704 SIMIX_simcall_enter(&self->simcall, 0);
706 return self->simcall.result.i;
709 inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
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_migrate(&self->simcall, ind_vm, ind_dst_pm);
714 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
716 self->simcall.call = SIMCALL_VM_MIGRATE;
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].dp = (void*) ind_dst_pm;
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_enter(&self->simcall, 0);
731 inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
732 smx_process_t self = SIMIX_process_self();
734 /* Go to that function to follow the code flow through the simcall barrier */
735 if (0) SIMIX_pre_vm_get_pm(&self->simcall, ind_vm);
736 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
738 self->simcall.call = SIMCALL_VM_GET_PM;
739 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
740 memset(self->simcall.args, 0, sizeof(self->simcall.args));
741 self->simcall.args[0].dp = (void*) ind_vm;
742 if (self != simix_global->maestro_process) {
743 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
744 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
745 SIMIX_process_yield(self);
747 SIMIX_simcall_enter(&self->simcall, 0);
749 return self->simcall.result.dp;
752 inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
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_set_bound(&self->simcall, ind_vm, bound);
757 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
759 self->simcall.call = SIMCALL_VM_SET_BOUND;
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 self->simcall.args[1].d = (double) bound;
764 if (self != simix_global->maestro_process) {
765 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
766 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
767 SIMIX_process_yield(self);
769 SIMIX_simcall_enter(&self->simcall, 0);
774 inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
775 smx_process_t self = SIMIX_process_self();
777 /* Go to that function to follow the code flow through the simcall barrier */
778 if (0) SIMIX_pre_vm_set_affinity(&self->simcall, ind_vm, ind_pm, mask);
779 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
781 self->simcall.call = SIMCALL_VM_SET_AFFINITY;
782 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
783 memset(self->simcall.args, 0, sizeof(self->simcall.args));
784 self->simcall.args[0].dp = (void*) ind_vm;
785 self->simcall.args[1].dp = (void*) ind_pm;
786 self->simcall.args[2].ul = (unsigned long) mask;
787 if (self != simix_global->maestro_process) {
788 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
789 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
790 SIMIX_process_yield(self);
792 SIMIX_simcall_enter(&self->simcall, 0);
797 inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
798 smx_process_t self = SIMIX_process_self();
800 /* Go to that function to follow the code flow through the simcall barrier */
801 if (0) SIMIX_pre_vm_destroy(&self->simcall, ind_vm);
802 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
804 self->simcall.call = SIMCALL_VM_DESTROY;
805 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
806 memset(self->simcall.args, 0, sizeof(self->simcall.args));
807 self->simcall.args[0].dp = (void*) ind_vm;
808 if (self != simix_global->maestro_process) {
809 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
810 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
811 SIMIX_process_yield(self);
813 SIMIX_simcall_enter(&self->simcall, 0);
818 inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
819 smx_process_t self = SIMIX_process_self();
821 /* Go to that function to follow the code flow through the simcall barrier */
822 if (0) SIMIX_pre_vm_suspend(&self->simcall, ind_vm);
823 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
825 self->simcall.call = SIMCALL_VM_SUSPEND;
826 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
827 memset(self->simcall.args, 0, sizeof(self->simcall.args));
828 self->simcall.args[0].dp = (void*) ind_vm;
829 if (self != simix_global->maestro_process) {
830 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
831 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
832 SIMIX_process_yield(self);
834 SIMIX_simcall_enter(&self->simcall, 0);
839 inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
840 smx_process_t self = SIMIX_process_self();
842 /* Go to that function to follow the code flow through the simcall barrier */
843 if (0) SIMIX_pre_vm_resume(&self->simcall, ind_vm);
844 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
846 self->simcall.call = SIMCALL_VM_RESUME;
847 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
848 memset(self->simcall.args, 0, sizeof(self->simcall.args));
849 self->simcall.args[0].dp = (void*) ind_vm;
850 if (self != simix_global->maestro_process) {
851 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
852 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
853 SIMIX_process_yield(self);
855 SIMIX_simcall_enter(&self->simcall, 0);
860 inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
861 smx_process_t self = SIMIX_process_self();
863 /* Go to that function to follow the code flow through the simcall barrier */
864 if (0) SIMIX_pre_vm_shutdown(&self->simcall, ind_vm);
865 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
867 self->simcall.call = SIMCALL_VM_SHUTDOWN;
868 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
869 memset(self->simcall.args, 0, sizeof(self->simcall.args));
870 self->simcall.args[0].dp = (void*) ind_vm;
871 if (self != simix_global->maestro_process) {
872 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
873 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
874 SIMIX_process_yield(self);
876 SIMIX_simcall_enter(&self->simcall, 0);
881 inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
882 smx_process_t self = SIMIX_process_self();
884 /* Go to that function to follow the code flow through the simcall barrier */
885 if (0) SIMIX_pre_vm_save(&self->simcall, ind_vm);
886 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
888 self->simcall.call = SIMCALL_VM_SAVE;
889 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
890 memset(self->simcall.args, 0, sizeof(self->simcall.args));
891 self->simcall.args[0].dp = (void*) ind_vm;
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_enter(&self->simcall, 0);
902 inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
903 smx_process_t self = SIMIX_process_self();
905 /* Go to that function to follow the code flow through the simcall barrier */
906 if (0) SIMIX_pre_vm_restore(&self->simcall, ind_vm);
907 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
909 self->simcall.call = SIMCALL_VM_RESTORE;
910 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
911 memset(self->simcall.args, 0, sizeof(self->simcall.args));
912 self->simcall.args[0].dp = (void*) ind_vm;
913 if (self != simix_global->maestro_process) {
914 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
915 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
916 SIMIX_process_yield(self);
918 SIMIX_simcall_enter(&self->simcall, 0);
923 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) {
924 smx_process_t self = SIMIX_process_self();
926 /* Go to that function to follow the code flow through the simcall barrier */
927 if (0) SIMIX_pre_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
928 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
930 self->simcall.call = SIMCALL_PROCESS_CREATE;
931 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
932 memset(self->simcall.args, 0, sizeof(self->simcall.args));
933 self->simcall.args[0].dp = (void*) process;
934 self->simcall.args[1].cc = (const char*) name;
935 self->simcall.args[2].fp = (FPtr) code;
936 self->simcall.args[3].dp = (void*) data;
937 self->simcall.args[4].cc = (const char*) hostname;
938 self->simcall.args[5].d = (double) kill_time;
939 self->simcall.args[6].i = (int) argc;
940 self->simcall.args[7].dp = (void*) argv;
941 self->simcall.args[8].dp = (void*) properties;
942 self->simcall.args[9].i = (int) auto_restart;
943 if (self != simix_global->maestro_process) {
944 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
945 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
946 SIMIX_process_yield(self);
948 SIMIX_simcall_enter(&self->simcall, 0);
953 inline static void simcall_BODY_process_kill(smx_process_t process) {
954 smx_process_t self = SIMIX_process_self();
956 /* Go to that function to follow the code flow through the simcall barrier */
957 if (0) SIMIX_pre_process_kill(&self->simcall, process);
958 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
960 self->simcall.call = SIMCALL_PROCESS_KILL;
961 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
962 memset(self->simcall.args, 0, sizeof(self->simcall.args));
963 self->simcall.args[0].dp = (void*) process;
964 if (self != simix_global->maestro_process) {
965 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
966 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
967 SIMIX_process_yield(self);
969 SIMIX_simcall_enter(&self->simcall, 0);
974 inline static void simcall_BODY_process_killall(int reset_pid) {
975 smx_process_t self = SIMIX_process_self();
977 /* Go to that function to follow the code flow through the simcall barrier */
978 if (0) SIMIX_pre_process_killall(&self->simcall, reset_pid);
979 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
981 self->simcall.call = SIMCALL_PROCESS_KILLALL;
982 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
983 memset(self->simcall.args, 0, sizeof(self->simcall.args));
984 self->simcall.args[0].i = (int) reset_pid;
985 if (self != simix_global->maestro_process) {
986 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
987 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
988 SIMIX_process_yield(self);
990 SIMIX_simcall_enter(&self->simcall, 0);
995 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
996 smx_process_t self = SIMIX_process_self();
998 /* Go to that function to follow the code flow through the simcall barrier */
999 if (0) SIMIX_pre_process_cleanup(&self->simcall, process);
1000 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1002 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
1003 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1004 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1005 self->simcall.args[0].dp = (void*) process;
1006 if (self != simix_global->maestro_process) {
1007 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1008 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1009 SIMIX_process_yield(self);
1011 SIMIX_simcall_enter(&self->simcall, 0);
1016 inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
1017 smx_process_t self = SIMIX_process_self();
1019 /* Go to that function to follow the code flow through the simcall barrier */
1020 if (0) SIMIX_pre_process_change_host(&self->simcall, process, dest);
1021 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1023 self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
1024 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1025 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1026 self->simcall.args[0].dp = (void*) process;
1027 self->simcall.args[1].dp = (void*) dest;
1028 if (self != simix_global->maestro_process) {
1029 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1030 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1031 SIMIX_process_yield(self);
1033 SIMIX_simcall_enter(&self->simcall, 0);
1038 inline static void simcall_BODY_process_suspend(smx_process_t process) {
1039 smx_process_t self = SIMIX_process_self();
1041 /* Go to that function to follow the code flow through the simcall barrier */
1042 if (0) SIMIX_pre_process_suspend(&self->simcall, process);
1043 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1045 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
1046 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1047 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1048 self->simcall.args[0].dp = (void*) process;
1049 if (self != simix_global->maestro_process) {
1050 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1051 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1052 SIMIX_process_yield(self);
1054 SIMIX_simcall_enter(&self->simcall, 0);
1059 inline static void simcall_BODY_process_resume(smx_process_t process) {
1060 smx_process_t self = SIMIX_process_self();
1062 /* Go to that function to follow the code flow through the simcall barrier */
1063 if (0) SIMIX_pre_process_resume(&self->simcall, process);
1064 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1066 self->simcall.call = SIMCALL_PROCESS_RESUME;
1067 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1068 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1069 self->simcall.args[0].dp = (void*) process;
1070 if (self != simix_global->maestro_process) {
1071 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1072 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1073 SIMIX_process_yield(self);
1075 SIMIX_simcall_enter(&self->simcall, 0);
1080 inline static int simcall_BODY_process_count() {
1081 smx_process_t self = SIMIX_process_self();
1083 /* Go to that function to follow the code flow through the simcall barrier */
1084 if (0) SIMIX_pre_process_count(&self->simcall);
1085 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1087 self->simcall.call = SIMCALL_PROCESS_COUNT;
1088 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1089 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1091 if (self != simix_global->maestro_process) {
1092 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1093 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1094 SIMIX_process_yield(self);
1096 SIMIX_simcall_enter(&self->simcall, 0);
1098 return self->simcall.result.i;
1101 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
1102 smx_process_t self = SIMIX_process_self();
1104 /* Go to that function to follow the code flow through the simcall barrier */
1105 if (0) SIMIX_pre_process_get_PID(&self->simcall, process);
1106 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1108 self->simcall.call = SIMCALL_PROCESS_GET_PID;
1109 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1110 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1111 self->simcall.args[0].dp = (void*) process;
1112 if (self != simix_global->maestro_process) {
1113 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1114 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1115 SIMIX_process_yield(self);
1117 SIMIX_simcall_enter(&self->simcall, 0);
1119 return self->simcall.result.i;
1122 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
1123 smx_process_t self = SIMIX_process_self();
1125 /* Go to that function to follow the code flow through the simcall barrier */
1126 if (0) SIMIX_pre_process_get_PPID(&self->simcall, process);
1127 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1129 self->simcall.call = SIMCALL_PROCESS_GET_PPID;
1130 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1131 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1132 self->simcall.args[0].dp = (void*) process;
1133 if (self != simix_global->maestro_process) {
1134 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1135 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1136 SIMIX_process_yield(self);
1138 SIMIX_simcall_enter(&self->simcall, 0);
1140 return self->simcall.result.i;
1143 inline static void* simcall_BODY_process_get_data(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_data(&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_DATA;
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_enter(&self->simcall, 0);
1161 return self->simcall.result.dp;
1164 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
1165 smx_process_t self = SIMIX_process_self();
1167 /* Go to that function to follow the code flow through the simcall barrier */
1168 if (0) SIMIX_pre_process_set_data(&self->simcall, process, data);
1169 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1171 self->simcall.call = SIMCALL_PROCESS_SET_DATA;
1172 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1173 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1174 self->simcall.args[0].dp = (void*) process;
1175 self->simcall.args[1].dp = (void*) data;
1176 if (self != simix_global->maestro_process) {
1177 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1178 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1179 SIMIX_process_yield(self);
1181 SIMIX_simcall_enter(&self->simcall, 0);
1186 inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
1187 smx_process_t self = SIMIX_process_self();
1189 /* Go to that function to follow the code flow through the simcall barrier */
1190 if (0) SIMIX_pre_process_get_host(&self->simcall, process);
1191 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1193 self->simcall.call = SIMCALL_PROCESS_GET_HOST;
1194 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1195 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1196 self->simcall.args[0].dp = (void*) process;
1197 if (self != simix_global->maestro_process) {
1198 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1199 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1200 SIMIX_process_yield(self);
1202 SIMIX_simcall_enter(&self->simcall, 0);
1204 return self->simcall.result.dp;
1207 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
1208 smx_process_t self = SIMIX_process_self();
1210 /* Go to that function to follow the code flow through the simcall barrier */
1211 if (0) SIMIX_pre_process_get_name(&self->simcall, process);
1212 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1214 self->simcall.call = SIMCALL_PROCESS_GET_NAME;
1215 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1216 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1217 self->simcall.args[0].dp = (void*) process;
1218 if (self != simix_global->maestro_process) {
1219 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1220 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1221 SIMIX_process_yield(self);
1223 SIMIX_simcall_enter(&self->simcall, 0);
1225 return self->simcall.result.cc;
1228 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
1229 smx_process_t self = SIMIX_process_self();
1231 /* Go to that function to follow the code flow through the simcall barrier */
1232 if (0) SIMIX_pre_process_is_suspended(&self->simcall, process);
1233 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1235 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
1236 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1237 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1238 self->simcall.args[0].dp = (void*) process;
1239 if (self != simix_global->maestro_process) {
1240 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1241 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1242 SIMIX_process_yield(self);
1244 SIMIX_simcall_enter(&self->simcall, 0);
1246 return self->simcall.result.i;
1249 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
1250 smx_process_t self = SIMIX_process_self();
1252 /* Go to that function to follow the code flow through the simcall barrier */
1253 if (0) SIMIX_pre_process_get_properties(&self->simcall, process);
1254 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1256 self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
1257 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1258 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1259 self->simcall.args[0].dp = (void*) process;
1260 if (self != simix_global->maestro_process) {
1261 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1262 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1263 SIMIX_process_yield(self);
1265 SIMIX_simcall_enter(&self->simcall, 0);
1267 return self->simcall.result.dp;
1270 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
1271 smx_process_t self = SIMIX_process_self();
1273 /* Go to that function to follow the code flow through the simcall barrier */
1274 if (0) SIMIX_pre_process_join(&self->simcall, process, timeout);
1275 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1277 self->simcall.call = SIMCALL_PROCESS_JOIN;
1278 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1279 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1280 self->simcall.args[0].dp = (void*) process;
1281 self->simcall.args[1].d = (double) timeout;
1282 if (self != simix_global->maestro_process) {
1283 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1284 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1285 SIMIX_process_yield(self);
1287 SIMIX_simcall_enter(&self->simcall, 0);
1289 return self->simcall.result.i;
1292 inline static int simcall_BODY_process_sleep(double duration) {
1293 smx_process_t self = SIMIX_process_self();
1295 /* Go to that function to follow the code flow through the simcall barrier */
1296 if (0) SIMIX_pre_process_sleep(&self->simcall, duration);
1297 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1299 self->simcall.call = SIMCALL_PROCESS_SLEEP;
1300 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1301 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1302 self->simcall.args[0].d = (double) duration;
1303 if (self != simix_global->maestro_process) {
1304 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1305 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1306 SIMIX_process_yield(self);
1308 SIMIX_simcall_enter(&self->simcall, 0);
1310 return self->simcall.result.i;
1313 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1314 smx_process_t self = SIMIX_process_self();
1316 /* Go to that function to follow the code flow through the simcall barrier */
1317 if (0) SIMIX_pre_process_on_exit(&self->simcall, process, fun, data);
1318 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1320 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1321 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1322 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1323 self->simcall.args[0].dp = (void*) process;
1324 self->simcall.args[1].fp = (FPtr) fun;
1325 self->simcall.args[2].dp = (void*) data;
1326 if (self != simix_global->maestro_process) {
1327 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1328 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1329 SIMIX_process_yield(self);
1331 SIMIX_simcall_enter(&self->simcall, 0);
1336 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
1337 smx_process_t self = SIMIX_process_self();
1339 /* Go to that function to follow the code flow through the simcall barrier */
1340 if (0) SIMIX_pre_process_auto_restart_set(&self->simcall, process, auto_restart);
1341 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1343 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
1344 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1345 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1346 self->simcall.args[0].dp = (void*) process;
1347 self->simcall.args[1].i = (int) auto_restart;
1348 if (self != simix_global->maestro_process) {
1349 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1350 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1351 SIMIX_process_yield(self);
1353 SIMIX_simcall_enter(&self->simcall, 0);
1358 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1359 smx_process_t self = SIMIX_process_self();
1361 /* Go to that function to follow the code flow through the simcall barrier */
1362 if (0) SIMIX_pre_process_restart(&self->simcall, process);
1363 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1365 self->simcall.call = SIMCALL_PROCESS_RESTART;
1366 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1367 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1368 self->simcall.args[0].dp = (void*) process;
1369 if (self != simix_global->maestro_process) {
1370 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1371 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1372 SIMIX_process_yield(self);
1374 SIMIX_simcall_enter(&self->simcall, 0);
1376 return self->simcall.result.dp;
1379 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1380 smx_process_t self = SIMIX_process_self();
1382 /* Go to that function to follow the code flow through the simcall barrier */
1383 if (0) SIMIX_pre_rdv_create(&self->simcall, name);
1384 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1386 self->simcall.call = SIMCALL_RDV_CREATE;
1387 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1388 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1389 self->simcall.args[0].cc = (const char*) name;
1390 if (self != simix_global->maestro_process) {
1391 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1392 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1393 SIMIX_process_yield(self);
1395 SIMIX_simcall_enter(&self->simcall, 0);
1397 return self->simcall.result.dp;
1400 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1401 smx_process_t self = SIMIX_process_self();
1403 /* Go to that function to follow the code flow through the simcall barrier */
1404 if (0) SIMIX_pre_rdv_destroy(&self->simcall, rdv);
1405 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1407 self->simcall.call = SIMCALL_RDV_DESTROY;
1408 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1409 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1410 self->simcall.args[0].dp = (void*) rdv;
1411 if (self != simix_global->maestro_process) {
1412 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1413 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1414 SIMIX_process_yield(self);
1416 SIMIX_simcall_enter(&self->simcall, 0);
1421 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
1422 smx_process_t self = SIMIX_process_self();
1424 /* Go to that function to follow the code flow through the simcall barrier */
1425 if (0) SIMIX_pre_rdv_comm_count_by_host(&self->simcall, rdv, host);
1426 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1428 self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1429 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1430 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1431 self->simcall.args[0].dp = (void*) rdv;
1432 self->simcall.args[1].dp = (void*) host;
1433 if (self != simix_global->maestro_process) {
1434 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1435 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1436 SIMIX_process_yield(self);
1438 SIMIX_simcall_enter(&self->simcall, 0);
1440 return self->simcall.result.ui;
1443 inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1444 smx_process_t self = SIMIX_process_self();
1446 /* Go to that function to follow the code flow through the simcall barrier */
1447 if (0) SIMIX_pre_rdv_get_head(&self->simcall, rdv);
1448 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1450 self->simcall.call = SIMCALL_RDV_GET_HEAD;
1451 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1452 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1453 self->simcall.args[0].dp = (void*) rdv;
1454 if (self != simix_global->maestro_process) {
1455 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1456 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1457 SIMIX_process_yield(self);
1459 SIMIX_simcall_enter(&self->simcall, 0);
1461 return self->simcall.result.dp;
1464 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1465 smx_process_t self = SIMIX_process_self();
1467 /* Go to that function to follow the code flow through the simcall barrier */
1468 if (0) SIMIX_pre_rdv_set_receiver(&self->simcall, rdv, receiver);
1469 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1471 self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1472 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1473 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1474 self->simcall.args[0].dp = (void*) rdv;
1475 self->simcall.args[1].dp = (void*) receiver;
1476 if (self != simix_global->maestro_process) {
1477 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1478 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1479 SIMIX_process_yield(self);
1481 SIMIX_simcall_enter(&self->simcall, 0);
1486 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1487 smx_process_t self = SIMIX_process_self();
1489 /* Go to that function to follow the code flow through the simcall barrier */
1490 if (0) SIMIX_pre_rdv_get_receiver(&self->simcall, rdv);
1491 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1493 self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1494 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1495 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1496 self->simcall.args[0].dp = (void*) rdv;
1497 if (self != simix_global->maestro_process) {
1498 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1499 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1500 SIMIX_process_yield(self);
1502 SIMIX_simcall_enter(&self->simcall, 0);
1504 return self->simcall.result.dp;
1507 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) {
1508 smx_process_t self = SIMIX_process_self();
1510 /* Go to that function to follow the code flow through the simcall barrier */
1511 if (0) SIMIX_pre_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1512 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1514 self->simcall.call = SIMCALL_COMM_IPROBE;
1515 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1516 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1517 self->simcall.args[0].dp = (void*) rdv;
1518 self->simcall.args[1].i = (int) type;
1519 self->simcall.args[2].i = (int) src;
1520 self->simcall.args[3].i = (int) tag;
1521 self->simcall.args[4].fp = (FPtr) match_fun;
1522 self->simcall.args[5].dp = (void*) data;
1523 if (self != simix_global->maestro_process) {
1524 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1525 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1526 SIMIX_process_yield(self);
1528 SIMIX_simcall_enter(&self->simcall, 0);
1530 return self->simcall.result.dp;
1533 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) {
1534 smx_process_t self = SIMIX_process_self();
1536 /* Go to that function to follow the code flow through the simcall barrier */
1537 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);
1538 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1540 self->simcall.call = SIMCALL_COMM_SEND;
1541 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1542 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1543 self->simcall.args[0].dp = (void*) src;
1544 self->simcall.args[1].dp = (void*) rdv;
1545 self->simcall.args[2].d = (double) task_size;
1546 self->simcall.args[3].d = (double) rate;
1547 self->simcall.args[4].dp = (void*) src_buff;
1548 self->simcall.args[5].sz = (size_t) src_buff_size;
1549 self->simcall.args[6].fp = (FPtr) match_fun;
1550 self->simcall.args[7].fp = (FPtr) copy_data_fun;
1551 self->simcall.args[8].dp = (void*) data;
1552 self->simcall.args[9].d = (double) timeout;
1553 if (self != simix_global->maestro_process) {
1554 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1555 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1556 SIMIX_process_yield(self);
1558 SIMIX_simcall_enter(&self->simcall, 0);
1563 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) {
1564 smx_process_t self = SIMIX_process_self();
1566 /* Go to that function to follow the code flow through the simcall barrier */
1567 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);
1568 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1570 self->simcall.call = SIMCALL_COMM_ISEND;
1571 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1572 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1573 self->simcall.args[0].dp = (void*) src;
1574 self->simcall.args[1].dp = (void*) rdv;
1575 self->simcall.args[2].d = (double) task_size;
1576 self->simcall.args[3].d = (double) rate;
1577 self->simcall.args[4].dp = (void*) src_buff;
1578 self->simcall.args[5].sz = (size_t) src_buff_size;
1579 self->simcall.args[6].fp = (FPtr) match_fun;
1580 self->simcall.args[7].fp = (FPtr) clean_fun;
1581 self->simcall.args[8].fp = (FPtr) copy_data_fun;
1582 self->simcall.args[9].dp = (void*) data;
1583 self->simcall.args[10].i = (int) detached;
1584 if (self != simix_global->maestro_process) {
1585 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1586 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1587 SIMIX_process_yield(self);
1589 SIMIX_simcall_enter(&self->simcall, 0);
1591 return self->simcall.result.dp;
1594 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) {
1595 smx_process_t self = SIMIX_process_self();
1597 /* Go to that function to follow the code flow through the simcall barrier */
1598 if (0) SIMIX_pre_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1599 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1601 self->simcall.call = SIMCALL_COMM_RECV;
1602 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1603 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1604 self->simcall.args[0].dp = (void*) rdv;
1605 self->simcall.args[1].dp = (void*) dst_buff;
1606 self->simcall.args[2].dp = (void*) dst_buff_size;
1607 self->simcall.args[3].fp = (FPtr) match_fun;
1608 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1609 self->simcall.args[5].dp = (void*) data;
1610 self->simcall.args[6].d = (double) timeout;
1611 self->simcall.args[7].d = (double) rate;
1612 if (self != simix_global->maestro_process) {
1613 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1614 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1615 SIMIX_process_yield(self);
1617 SIMIX_simcall_enter(&self->simcall, 0);
1622 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) {
1623 smx_process_t self = SIMIX_process_self();
1625 /* Go to that function to follow the code flow through the simcall barrier */
1626 if (0) SIMIX_pre_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1627 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1629 self->simcall.call = SIMCALL_COMM_IRECV;
1630 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1631 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1632 self->simcall.args[0].dp = (void*) rdv;
1633 self->simcall.args[1].dp = (void*) dst_buff;
1634 self->simcall.args[2].dp = (void*) dst_buff_size;
1635 self->simcall.args[3].fp = (FPtr) match_fun;
1636 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1637 self->simcall.args[5].dp = (void*) data;
1638 self->simcall.args[6].d = (double) rate;
1639 if (self != simix_global->maestro_process) {
1640 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1641 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1642 SIMIX_process_yield(self);
1644 SIMIX_simcall_enter(&self->simcall, 0);
1646 return self->simcall.result.dp;
1649 inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
1650 smx_process_t self = SIMIX_process_self();
1652 /* Go to that function to follow the code flow through the simcall barrier */
1653 if (0) SIMIX_pre_comm_cancel(&self->simcall, comm);
1654 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1656 self->simcall.call = SIMCALL_COMM_CANCEL;
1657 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1658 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1659 self->simcall.args[0].dp = (void*) comm;
1660 if (self != simix_global->maestro_process) {
1661 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1662 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1663 SIMIX_process_yield(self);
1665 SIMIX_simcall_enter(&self->simcall, 0);
1670 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1671 smx_process_t self = SIMIX_process_self();
1673 /* Go to that function to follow the code flow through the simcall barrier */
1674 if (0) SIMIX_pre_comm_waitany(&self->simcall, comms);
1675 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1677 self->simcall.call = SIMCALL_COMM_WAITANY;
1678 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1679 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1680 self->simcall.args[0].dp = (void*) comms;
1681 if (self != simix_global->maestro_process) {
1682 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1683 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1684 SIMIX_process_yield(self);
1686 SIMIX_simcall_enter(&self->simcall, 0);
1688 return self->simcall.result.i;
1691 inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
1692 smx_process_t self = SIMIX_process_self();
1694 /* Go to that function to follow the code flow through the simcall barrier */
1695 if (0) SIMIX_pre_comm_wait(&self->simcall, comm, timeout);
1696 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1698 self->simcall.call = SIMCALL_COMM_WAIT;
1699 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1700 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1701 self->simcall.args[0].dp = (void*) comm;
1702 self->simcall.args[1].d = (double) timeout;
1703 if (self != simix_global->maestro_process) {
1704 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1705 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1706 SIMIX_process_yield(self);
1708 SIMIX_simcall_enter(&self->simcall, 0);
1713 inline static int simcall_BODY_comm_test(smx_action_t comm) {
1714 smx_process_t self = SIMIX_process_self();
1716 /* Go to that function to follow the code flow through the simcall barrier */
1717 if (0) SIMIX_pre_comm_test(&self->simcall, comm);
1718 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1720 self->simcall.call = SIMCALL_COMM_TEST;
1721 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1722 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1723 self->simcall.args[0].dp = (void*) comm;
1724 if (self != simix_global->maestro_process) {
1725 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1726 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1727 SIMIX_process_yield(self);
1729 SIMIX_simcall_enter(&self->simcall, 0);
1731 return self->simcall.result.i;
1734 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1735 smx_process_t self = SIMIX_process_self();
1737 /* Go to that function to follow the code flow through the simcall barrier */
1738 if (0) SIMIX_pre_comm_testany(&self->simcall, comms);
1739 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1741 self->simcall.call = SIMCALL_COMM_TESTANY;
1742 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1743 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1744 self->simcall.args[0].dp = (void*) comms;
1745 if (self != simix_global->maestro_process) {
1746 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1747 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1748 SIMIX_process_yield(self);
1750 SIMIX_simcall_enter(&self->simcall, 0);
1752 return self->simcall.result.i;
1755 inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
1756 smx_process_t self = SIMIX_process_self();
1758 /* Go to that function to follow the code flow through the simcall barrier */
1759 if (0) SIMIX_pre_comm_get_remains(&self->simcall, comm);
1760 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1762 self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1763 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1764 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1765 self->simcall.args[0].dp = (void*) comm;
1766 if (self != simix_global->maestro_process) {
1767 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1768 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1769 SIMIX_process_yield(self);
1771 SIMIX_simcall_enter(&self->simcall, 0);
1773 return self->simcall.result.d;
1776 inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
1777 smx_process_t self = SIMIX_process_self();
1779 /* Go to that function to follow the code flow through the simcall barrier */
1780 if (0) SIMIX_pre_comm_get_state(&self->simcall, comm);
1781 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1783 self->simcall.call = SIMCALL_COMM_GET_STATE;
1784 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1785 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1786 self->simcall.args[0].dp = (void*) comm;
1787 if (self != simix_global->maestro_process) {
1788 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1789 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1790 SIMIX_process_yield(self);
1792 SIMIX_simcall_enter(&self->simcall, 0);
1794 return self->simcall.result.i;
1797 inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
1798 smx_process_t self = SIMIX_process_self();
1800 /* Go to that function to follow the code flow through the simcall barrier */
1801 if (0) SIMIX_pre_comm_get_src_data(&self->simcall, comm);
1802 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1804 self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1805 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1806 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1807 self->simcall.args[0].dp = (void*) comm;
1808 if (self != simix_global->maestro_process) {
1809 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1810 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1811 SIMIX_process_yield(self);
1813 SIMIX_simcall_enter(&self->simcall, 0);
1815 return self->simcall.result.dp;
1818 inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
1819 smx_process_t self = SIMIX_process_self();
1821 /* Go to that function to follow the code flow through the simcall barrier */
1822 if (0) SIMIX_pre_comm_get_dst_data(&self->simcall, comm);
1823 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1825 self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1826 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1827 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1828 self->simcall.args[0].dp = (void*) comm;
1829 if (self != simix_global->maestro_process) {
1830 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1831 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1832 SIMIX_process_yield(self);
1834 SIMIX_simcall_enter(&self->simcall, 0);
1836 return self->simcall.result.dp;
1839 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
1840 smx_process_t self = SIMIX_process_self();
1842 /* Go to that function to follow the code flow through the simcall barrier */
1843 if (0) SIMIX_pre_comm_get_src_proc(&self->simcall, comm);
1844 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1846 self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1847 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1848 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1849 self->simcall.args[0].dp = (void*) comm;
1850 if (self != simix_global->maestro_process) {
1851 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1852 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1853 SIMIX_process_yield(self);
1855 SIMIX_simcall_enter(&self->simcall, 0);
1857 return self->simcall.result.dp;
1860 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
1861 smx_process_t self = SIMIX_process_self();
1863 /* Go to that function to follow the code flow through the simcall barrier */
1864 if (0) SIMIX_pre_comm_get_dst_proc(&self->simcall, comm);
1865 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1867 self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1868 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1869 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1870 self->simcall.args[0].dp = (void*) comm;
1871 if (self != simix_global->maestro_process) {
1872 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1873 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1874 SIMIX_process_yield(self);
1876 SIMIX_simcall_enter(&self->simcall, 0);
1878 return self->simcall.result.dp;
1881 inline static smx_mutex_t simcall_BODY_mutex_init() {
1882 smx_process_t self = SIMIX_process_self();
1884 /* Go to that function to follow the code flow through the simcall barrier */
1885 if (0) SIMIX_pre_mutex_init(&self->simcall);
1886 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1888 self->simcall.call = SIMCALL_MUTEX_INIT;
1889 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1890 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1892 if (self != simix_global->maestro_process) {
1893 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1894 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1895 SIMIX_process_yield(self);
1897 SIMIX_simcall_enter(&self->simcall, 0);
1899 return self->simcall.result.dp;
1902 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1903 smx_process_t self = SIMIX_process_self();
1905 /* Go to that function to follow the code flow through the simcall barrier */
1906 if (0) SIMIX_pre_mutex_destroy(&self->simcall, mutex);
1907 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1909 self->simcall.call = SIMCALL_MUTEX_DESTROY;
1910 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1911 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1912 self->simcall.args[0].dp = (void*) mutex;
1913 if (self != simix_global->maestro_process) {
1914 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1915 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1916 SIMIX_process_yield(self);
1918 SIMIX_simcall_enter(&self->simcall, 0);
1923 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1924 smx_process_t self = SIMIX_process_self();
1926 /* Go to that function to follow the code flow through the simcall barrier */
1927 if (0) SIMIX_pre_mutex_lock(&self->simcall, mutex);
1928 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1930 self->simcall.call = SIMCALL_MUTEX_LOCK;
1931 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1932 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1933 self->simcall.args[0].dp = (void*) mutex;
1934 if (self != simix_global->maestro_process) {
1935 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1936 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1937 SIMIX_process_yield(self);
1939 SIMIX_simcall_enter(&self->simcall, 0);
1944 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1945 smx_process_t self = SIMIX_process_self();
1947 /* Go to that function to follow the code flow through the simcall barrier */
1948 if (0) SIMIX_pre_mutex_trylock(&self->simcall, mutex);
1949 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1951 self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1952 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1953 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1954 self->simcall.args[0].dp = (void*) mutex;
1955 if (self != simix_global->maestro_process) {
1956 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1957 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1958 SIMIX_process_yield(self);
1960 SIMIX_simcall_enter(&self->simcall, 0);
1962 return self->simcall.result.i;
1965 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1966 smx_process_t self = SIMIX_process_self();
1968 /* Go to that function to follow the code flow through the simcall barrier */
1969 if (0) SIMIX_pre_mutex_unlock(&self->simcall, mutex);
1970 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1972 self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1973 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1974 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1975 self->simcall.args[0].dp = (void*) mutex;
1976 if (self != simix_global->maestro_process) {
1977 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1978 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1979 SIMIX_process_yield(self);
1981 SIMIX_simcall_enter(&self->simcall, 0);
1986 inline static smx_cond_t simcall_BODY_cond_init() {
1987 smx_process_t self = SIMIX_process_self();
1989 /* Go to that function to follow the code flow through the simcall barrier */
1990 if (0) SIMIX_pre_cond_init(&self->simcall);
1991 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1993 self->simcall.call = SIMCALL_COND_INIT;
1994 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1995 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1997 if (self != simix_global->maestro_process) {
1998 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1999 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2000 SIMIX_process_yield(self);
2002 SIMIX_simcall_enter(&self->simcall, 0);
2004 return self->simcall.result.dp;
2007 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
2008 smx_process_t self = SIMIX_process_self();
2010 /* Go to that function to follow the code flow through the simcall barrier */
2011 if (0) SIMIX_pre_cond_destroy(&self->simcall, cond);
2012 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2014 self->simcall.call = SIMCALL_COND_DESTROY;
2015 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2016 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2017 self->simcall.args[0].dp = (void*) cond;
2018 if (self != simix_global->maestro_process) {
2019 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2020 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2021 SIMIX_process_yield(self);
2023 SIMIX_simcall_enter(&self->simcall, 0);
2028 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
2029 smx_process_t self = SIMIX_process_self();
2031 /* Go to that function to follow the code flow through the simcall barrier */
2032 if (0) SIMIX_pre_cond_signal(&self->simcall, cond);
2033 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2035 self->simcall.call = SIMCALL_COND_SIGNAL;
2036 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2037 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2038 self->simcall.args[0].dp = (void*) cond;
2039 if (self != simix_global->maestro_process) {
2040 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2041 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2042 SIMIX_process_yield(self);
2044 SIMIX_simcall_enter(&self->simcall, 0);
2049 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
2050 smx_process_t self = SIMIX_process_self();
2052 /* Go to that function to follow the code flow through the simcall barrier */
2053 if (0) SIMIX_pre_cond_wait(&self->simcall, cond, mutex);
2054 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2056 self->simcall.call = SIMCALL_COND_WAIT;
2057 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2058 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2059 self->simcall.args[0].dp = (void*) cond;
2060 self->simcall.args[1].dp = (void*) mutex;
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_enter(&self->simcall, 0);
2071 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
2072 smx_process_t self = SIMIX_process_self();
2074 /* Go to that function to follow the code flow through the simcall barrier */
2075 if (0) SIMIX_pre_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
2076 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2078 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
2079 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2080 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2081 self->simcall.args[0].dp = (void*) cond;
2082 self->simcall.args[1].dp = (void*) mutex;
2083 self->simcall.args[2].d = (double) timeout;
2084 if (self != simix_global->maestro_process) {
2085 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2086 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2087 SIMIX_process_yield(self);
2089 SIMIX_simcall_enter(&self->simcall, 0);
2094 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
2095 smx_process_t self = SIMIX_process_self();
2097 /* Go to that function to follow the code flow through the simcall barrier */
2098 if (0) SIMIX_pre_cond_broadcast(&self->simcall, cond);
2099 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2101 self->simcall.call = SIMCALL_COND_BROADCAST;
2102 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2103 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2104 self->simcall.args[0].dp = (void*) cond;
2105 if (self != simix_global->maestro_process) {
2106 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2107 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2108 SIMIX_process_yield(self);
2110 SIMIX_simcall_enter(&self->simcall, 0);
2115 inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
2116 smx_process_t self = SIMIX_process_self();
2118 /* Go to that function to follow the code flow through the simcall barrier */
2119 if (0) SIMIX_pre_sem_init(&self->simcall, capacity);
2120 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2122 self->simcall.call = SIMCALL_SEM_INIT;
2123 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2124 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2125 self->simcall.args[0].i = (int) capacity;
2126 if (self != simix_global->maestro_process) {
2127 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2128 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2129 SIMIX_process_yield(self);
2131 SIMIX_simcall_enter(&self->simcall, 0);
2133 return self->simcall.result.dp;
2136 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2137 smx_process_t self = SIMIX_process_self();
2139 /* Go to that function to follow the code flow through the simcall barrier */
2140 if (0) SIMIX_pre_sem_destroy(&self->simcall, sem);
2141 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2143 self->simcall.call = SIMCALL_SEM_DESTROY;
2144 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2145 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2146 self->simcall.args[0].dp = (void*) sem;
2147 if (self != simix_global->maestro_process) {
2148 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2149 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2150 SIMIX_process_yield(self);
2152 SIMIX_simcall_enter(&self->simcall, 0);
2157 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2158 smx_process_t self = SIMIX_process_self();
2160 /* Go to that function to follow the code flow through the simcall barrier */
2161 if (0) SIMIX_pre_sem_release(&self->simcall, sem);
2162 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2164 self->simcall.call = SIMCALL_SEM_RELEASE;
2165 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2166 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2167 self->simcall.args[0].dp = (void*) sem;
2168 if (self != simix_global->maestro_process) {
2169 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2170 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2171 SIMIX_process_yield(self);
2173 SIMIX_simcall_enter(&self->simcall, 0);
2178 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2179 smx_process_t self = SIMIX_process_self();
2181 /* Go to that function to follow the code flow through the simcall barrier */
2182 if (0) SIMIX_pre_sem_would_block(&self->simcall, sem);
2183 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2185 self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2186 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2187 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2188 self->simcall.args[0].dp = (void*) sem;
2189 if (self != simix_global->maestro_process) {
2190 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2191 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2192 SIMIX_process_yield(self);
2194 SIMIX_simcall_enter(&self->simcall, 0);
2196 return self->simcall.result.i;
2199 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2200 smx_process_t self = SIMIX_process_self();
2202 /* Go to that function to follow the code flow through the simcall barrier */
2203 if (0) SIMIX_pre_sem_acquire(&self->simcall, sem);
2204 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2206 self->simcall.call = SIMCALL_SEM_ACQUIRE;
2207 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2208 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2209 self->simcall.args[0].dp = (void*) sem;
2210 if (self != simix_global->maestro_process) {
2211 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2212 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2213 SIMIX_process_yield(self);
2215 SIMIX_simcall_enter(&self->simcall, 0);
2220 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2221 smx_process_t self = SIMIX_process_self();
2223 /* Go to that function to follow the code flow through the simcall barrier */
2224 if (0) SIMIX_pre_sem_acquire_timeout(&self->simcall, sem, timeout);
2225 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2227 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2228 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2229 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2230 self->simcall.args[0].dp = (void*) sem;
2231 self->simcall.args[1].d = (double) timeout;
2232 if (self != simix_global->maestro_process) {
2233 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2234 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2235 SIMIX_process_yield(self);
2237 SIMIX_simcall_enter(&self->simcall, 0);
2242 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2243 smx_process_t self = SIMIX_process_self();
2245 /* Go to that function to follow the code flow through the simcall barrier */
2246 if (0) SIMIX_pre_sem_get_capacity(&self->simcall, sem);
2247 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2249 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2250 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2251 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2252 self->simcall.args[0].dp = (void*) sem;
2253 if (self != simix_global->maestro_process) {
2254 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2255 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2256 SIMIX_process_yield(self);
2258 SIMIX_simcall_enter(&self->simcall, 0);
2260 return self->simcall.result.i;
2263 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
2264 smx_process_t self = SIMIX_process_self();
2266 /* Go to that function to follow the code flow through the simcall barrier */
2267 if (0) SIMIX_pre_file_read(&self->simcall, fd, size, host);
2268 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2270 self->simcall.call = SIMCALL_FILE_READ;
2271 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2272 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2273 self->simcall.args[0].dp = (void*) fd;
2274 self->simcall.args[1].sgsz = (sg_size_t) size;
2275 self->simcall.args[2].dp = (void*) host;
2276 if (self != simix_global->maestro_process) {
2277 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2278 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2279 SIMIX_process_yield(self);
2281 SIMIX_simcall_enter(&self->simcall, 0);
2283 return self->simcall.result.sgsz;
2286 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
2287 smx_process_t self = SIMIX_process_self();
2289 /* Go to that function to follow the code flow through the simcall barrier */
2290 if (0) SIMIX_pre_file_write(&self->simcall, fd, size, host);
2291 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2293 self->simcall.call = SIMCALL_FILE_WRITE;
2294 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2295 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2296 self->simcall.args[0].dp = (void*) fd;
2297 self->simcall.args[1].sgsz = (sg_size_t) size;
2298 self->simcall.args[2].dp = (void*) host;
2299 if (self != simix_global->maestro_process) {
2300 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2301 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2302 SIMIX_process_yield(self);
2304 SIMIX_simcall_enter(&self->simcall, 0);
2306 return self->simcall.result.sgsz;
2309 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
2310 smx_process_t self = SIMIX_process_self();
2312 /* Go to that function to follow the code flow through the simcall barrier */
2313 if (0) SIMIX_pre_file_open(&self->simcall, fullpath, host);
2314 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2316 self->simcall.call = SIMCALL_FILE_OPEN;
2317 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2318 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2319 self->simcall.args[0].cc = (const char*) fullpath;
2320 self->simcall.args[1].dp = (void*) host;
2321 if (self != simix_global->maestro_process) {
2322 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2323 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2324 SIMIX_process_yield(self);
2326 SIMIX_simcall_enter(&self->simcall, 0);
2328 return self->simcall.result.dp;
2331 inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
2332 smx_process_t self = SIMIX_process_self();
2334 /* Go to that function to follow the code flow through the simcall barrier */
2335 if (0) SIMIX_pre_file_close(&self->simcall, fd, host);
2336 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2338 self->simcall.call = SIMCALL_FILE_CLOSE;
2339 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2340 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2341 self->simcall.args[0].dp = (void*) fd;
2342 self->simcall.args[1].dp = (void*) host;
2343 if (self != simix_global->maestro_process) {
2344 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2345 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2346 SIMIX_process_yield(self);
2348 SIMIX_simcall_enter(&self->simcall, 0);
2350 return self->simcall.result.i;
2353 inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
2354 smx_process_t self = SIMIX_process_self();
2356 /* Go to that function to follow the code flow through the simcall barrier */
2357 if (0) SIMIX_pre_file_unlink(&self->simcall, fd, host);
2358 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2360 self->simcall.call = SIMCALL_FILE_UNLINK;
2361 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2362 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2363 self->simcall.args[0].dp = (void*) fd;
2364 self->simcall.args[1].dp = (void*) host;
2365 if (self != simix_global->maestro_process) {
2366 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2367 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2368 SIMIX_process_yield(self);
2370 SIMIX_simcall_enter(&self->simcall, 0);
2372 return self->simcall.result.i;
2375 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2376 smx_process_t self = SIMIX_process_self();
2378 /* Go to that function to follow the code flow through the simcall barrier */
2379 if (0) SIMIX_pre_file_get_size(&self->simcall, fd);
2380 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2382 self->simcall.call = SIMCALL_FILE_GET_SIZE;
2383 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2384 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2385 self->simcall.args[0].dp = (void*) fd;
2386 if (self != simix_global->maestro_process) {
2387 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2388 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2389 SIMIX_process_yield(self);
2391 SIMIX_simcall_enter(&self->simcall, 0);
2393 return self->simcall.result.sgsz;
2396 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2397 smx_process_t self = SIMIX_process_self();
2399 /* Go to that function to follow the code flow through the simcall barrier */
2400 if (0) SIMIX_pre_file_tell(&self->simcall, fd);
2401 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2403 self->simcall.call = SIMCALL_FILE_TELL;
2404 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2405 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2406 self->simcall.args[0].dp = (void*) fd;
2407 if (self != simix_global->maestro_process) {
2408 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2409 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2410 SIMIX_process_yield(self);
2412 SIMIX_simcall_enter(&self->simcall, 0);
2414 return self->simcall.result.sgsz;
2417 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2418 smx_process_t self = SIMIX_process_self();
2420 /* Go to that function to follow the code flow through the simcall barrier */
2421 if (0) SIMIX_pre_file_seek(&self->simcall, fd, offset, origin);
2422 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2424 self->simcall.call = SIMCALL_FILE_SEEK;
2425 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2426 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2427 self->simcall.args[0].dp = (void*) fd;
2428 self->simcall.args[1].sgoff = (sg_offset_t) offset;
2429 self->simcall.args[2].i = (int) origin;
2430 if (self != simix_global->maestro_process) {
2431 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2432 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2433 SIMIX_process_yield(self);
2435 SIMIX_simcall_enter(&self->simcall, 0);
2437 return self->simcall.result.i;
2440 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2441 smx_process_t self = SIMIX_process_self();
2443 /* Go to that function to follow the code flow through the simcall barrier */
2444 if (0) SIMIX_pre_file_get_info(&self->simcall, fd);
2445 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2447 self->simcall.call = SIMCALL_FILE_GET_INFO;
2448 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2449 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2450 self->simcall.args[0].dp = (void*) fd;
2451 if (self != simix_global->maestro_process) {
2452 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2453 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2454 SIMIX_process_yield(self);
2456 SIMIX_simcall_enter(&self->simcall, 0);
2458 return self->simcall.result.dp;
2461 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2462 smx_process_t self = SIMIX_process_self();
2464 /* Go to that function to follow the code flow through the simcall barrier */
2465 if (0) SIMIX_pre_file_move(&self->simcall, fd, fullpath);
2466 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2468 self->simcall.call = SIMCALL_FILE_MOVE;
2469 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2470 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2471 self->simcall.args[0].dp = (void*) fd;
2472 self->simcall.args[1].cc = (const char*) fullpath;
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_enter(&self->simcall, 0);
2480 return self->simcall.result.i;
2483 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2484 smx_process_t self = SIMIX_process_self();
2486 /* Go to that function to follow the code flow through the simcall barrier */
2487 if (0) SIMIX_pre_storage_get_free_size(&self->simcall, storage);
2488 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2490 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2491 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2492 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2493 self->simcall.args[0].dp = (void*) storage;
2494 if (self != simix_global->maestro_process) {
2495 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2496 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2497 SIMIX_process_yield(self);
2499 SIMIX_simcall_enter(&self->simcall, 0);
2501 return self->simcall.result.sgsz;
2504 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2505 smx_process_t self = SIMIX_process_self();
2507 /* Go to that function to follow the code flow through the simcall barrier */
2508 if (0) SIMIX_pre_storage_get_used_size(&self->simcall, name);
2509 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2511 self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2512 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2513 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2514 self->simcall.args[0].dp = (void*) name;
2515 if (self != simix_global->maestro_process) {
2516 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2517 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2518 SIMIX_process_yield(self);
2520 SIMIX_simcall_enter(&self->simcall, 0);
2522 return self->simcall.result.sgsz;
2525 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2526 smx_process_t self = SIMIX_process_self();
2528 /* Go to that function to follow the code flow through the simcall barrier */
2529 if (0) SIMIX_pre_storage_get_properties(&self->simcall, storage);
2530 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2532 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2533 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2534 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2535 self->simcall.args[0].dp = (void*) storage;
2536 if (self != simix_global->maestro_process) {
2537 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2538 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2539 SIMIX_process_yield(self);
2541 SIMIX_simcall_enter(&self->simcall, 0);
2543 return self->simcall.result.dp;
2546 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2547 smx_process_t self = SIMIX_process_self();
2549 /* Go to that function to follow the code flow through the simcall barrier */
2550 if (0) SIMIX_pre_storage_get_content(&self->simcall, storage);
2551 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2553 self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2554 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2555 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2556 self->simcall.args[0].dp = (void*) storage;
2557 if (self != simix_global->maestro_process) {
2558 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2559 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2560 SIMIX_process_yield(self);
2562 SIMIX_simcall_enter(&self->simcall, 0);
2564 return self->simcall.result.dp;
2567 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2568 smx_process_t self = SIMIX_process_self();
2570 /* Go to that function to follow the code flow through the simcall barrier */
2571 if (0) SIMIX_pre_asr_get_properties(&self->simcall, name);
2572 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2574 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2575 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2576 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2577 self->simcall.args[0].cc = (const char*) name;
2578 if (self != simix_global->maestro_process) {
2579 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2580 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2581 SIMIX_process_yield(self);
2583 SIMIX_simcall_enter(&self->simcall, 0);
2585 return self->simcall.result.dp;
2587 #ifdef HAVE_LATENCY_BOUND_TRACKING
2589 inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
2590 smx_process_t self = SIMIX_process_self();
2592 /* Go to that function to follow the code flow through the simcall barrier */
2593 if (0) SIMIX_pre_comm_is_latency_bounded(&self->simcall, comm);
2594 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2596 self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2597 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2598 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2599 self->simcall.args[0].dp = (void*) comm;
2600 if (self != simix_global->maestro_process) {
2601 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2602 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2603 SIMIX_process_yield(self);
2605 SIMIX_simcall_enter(&self->simcall, 0);
2607 return self->simcall.result.i;
2613 inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
2614 smx_process_t self = SIMIX_process_self();
2616 /* Go to that function to follow the code flow through the simcall barrier */
2617 if (0) SIMIX_pre_set_category(&self->simcall, action, category);
2618 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2620 self->simcall.call = SIMCALL_SET_CATEGORY;
2621 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2622 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2623 self->simcall.args[0].dp = (void*) action;
2624 self->simcall.args[1].cc = (const char*) category;
2625 if (self != simix_global->maestro_process) {
2626 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2627 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2628 SIMIX_process_yield(self);
2630 SIMIX_simcall_enter(&self->simcall, 0);
2638 inline static void* simcall_BODY_mc_snapshot() {
2639 smx_process_t self = SIMIX_process_self();
2641 /* Go to that function to follow the code flow through the simcall barrier */
2642 if (0) SIMIX_pre_mc_snapshot(&self->simcall);
2643 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2645 self->simcall.call = SIMCALL_MC_SNAPSHOT;
2646 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2647 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2649 if (self != simix_global->maestro_process) {
2650 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2651 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2652 SIMIX_process_yield(self);
2654 SIMIX_simcall_enter(&self->simcall, 0);
2656 return self->simcall.result.dp;
2659 inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
2660 smx_process_t self = SIMIX_process_self();
2662 /* Go to that function to follow the code flow through the simcall barrier */
2663 if (0) SIMIX_pre_mc_compare_snapshots(&self->simcall, s1, s2);
2664 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2666 self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2667 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2668 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2669 self->simcall.args[0].dp = (void*) s1;
2670 self->simcall.args[1].dp = (void*) s2;
2671 if (self != simix_global->maestro_process) {
2672 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2673 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2674 SIMIX_process_yield(self);
2676 SIMIX_simcall_enter(&self->simcall, 0);
2678 return self->simcall.result.i;
2681 inline static int simcall_BODY_mc_random(int min, int max) {
2682 smx_process_t self = SIMIX_process_self();
2684 /* Go to that function to follow the code flow through the simcall barrier */
2685 if (0) SIMIX_pre_mc_random(&self->simcall, min, max);
2686 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2688 self->simcall.call = SIMCALL_MC_RANDOM;
2689 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2690 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2691 self->simcall.args[0].i = (int) min;
2692 self->simcall.args[1].i = (int) max;
2693 if (self != simix_global->maestro_process) {
2694 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2695 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2696 SIMIX_process_yield(self);
2698 SIMIX_simcall_enter(&self->simcall, 0);
2700 return self->simcall.result.i;