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 :)
16 #include "smx_private.h"
17 #include "mc/mc_forward.h"
20 inline static const char* simcall_BODY_host_get_name(sg_host_t host) {
21 smx_process_t self = SIMIX_process_self();
23 /* Go to that function to follow the code flow through the simcall barrier */
24 if (0) SIMIX_host_get_name(host);
25 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
27 self->simcall.call = SIMCALL_HOST_GET_NAME;
28 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
29 memset(self->simcall.args, 0, sizeof(self->simcall.args));
30 self->simcall.args[0].dp = (void*) host;
31 if (self != simix_global->maestro_process) {
32 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
33 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
34 SIMIX_process_yield(self);
36 SIMIX_simcall_handle(&self->simcall, 0);
38 return self->simcall.result.cc;
41 inline static void simcall_BODY_host_on(sg_host_t host) {
42 smx_process_t self = SIMIX_process_self();
44 /* Go to that function to follow the code flow through the simcall barrier */
45 if (0) SIMIX_host_on(host);
46 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
48 self->simcall.call = SIMCALL_HOST_ON;
49 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
50 memset(self->simcall.args, 0, sizeof(self->simcall.args));
51 self->simcall.args[0].dp = (void*) host;
52 if (self != simix_global->maestro_process) {
53 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
54 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
55 SIMIX_process_yield(self);
57 SIMIX_simcall_handle(&self->simcall, 0);
62 inline static void simcall_BODY_host_off(sg_host_t host) {
63 smx_process_t self = SIMIX_process_self();
65 /* Go to that function to follow the code flow through the simcall barrier */
66 if (0) simcall_HANDLER_host_off(&self->simcall, host);
67 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
69 self->simcall.call = SIMCALL_HOST_OFF;
70 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
71 memset(self->simcall.args, 0, sizeof(self->simcall.args));
72 self->simcall.args[0].dp = (void*) host;
73 if (self != simix_global->maestro_process) {
74 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
75 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
76 SIMIX_process_yield(self);
78 SIMIX_simcall_handle(&self->simcall, 0);
83 inline static xbt_dict_t simcall_BODY_host_get_properties(sg_host_t host) {
84 smx_process_t self = SIMIX_process_self();
86 /* Go to that function to follow the code flow through the simcall barrier */
87 if (0) SIMIX_host_get_properties(host);
88 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
90 self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
91 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
92 memset(self->simcall.args, 0, sizeof(self->simcall.args));
93 self->simcall.args[0].dp = (void*) host;
94 if (self != simix_global->maestro_process) {
95 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
96 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
97 SIMIX_process_yield(self);
99 SIMIX_simcall_handle(&self->simcall, 0);
101 return self->simcall.result.dp;
104 inline static int simcall_BODY_host_get_core(sg_host_t host) {
105 smx_process_t self = SIMIX_process_self();
107 /* Go to that function to follow the code flow through the simcall barrier */
108 if (0) SIMIX_host_get_core(host);
109 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
111 self->simcall.call = SIMCALL_HOST_GET_CORE;
112 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
113 memset(self->simcall.args, 0, sizeof(self->simcall.args));
114 self->simcall.args[0].dp = (void*) host;
115 if (self != simix_global->maestro_process) {
116 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
117 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
118 SIMIX_process_yield(self);
120 SIMIX_simcall_handle(&self->simcall, 0);
122 return self->simcall.result.i;
125 inline static xbt_swag_t simcall_BODY_host_get_process_list(sg_host_t host) {
126 smx_process_t self = SIMIX_process_self();
128 /* Go to that function to follow the code flow through the simcall barrier */
129 if (0) SIMIX_host_get_process_list(host);
130 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
132 self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
133 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
134 memset(self->simcall.args, 0, sizeof(self->simcall.args));
135 self->simcall.args[0].dp = (void*) host;
136 if (self != simix_global->maestro_process) {
137 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
138 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
139 SIMIX_process_yield(self);
141 SIMIX_simcall_handle(&self->simcall, 0);
143 return self->simcall.result.dp;
146 inline static double simcall_BODY_host_get_speed(sg_host_t host) {
147 smx_process_t self = SIMIX_process_self();
149 /* Go to that function to follow the code flow through the simcall barrier */
150 if (0) SIMIX_host_get_speed(host);
151 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
153 self->simcall.call = SIMCALL_HOST_GET_SPEED;
154 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
155 memset(self->simcall.args, 0, sizeof(self->simcall.args));
156 self->simcall.args[0].dp = (void*) host;
157 if (self != simix_global->maestro_process) {
158 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
159 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
160 SIMIX_process_yield(self);
162 SIMIX_simcall_handle(&self->simcall, 0);
164 return self->simcall.result.d;
167 inline static double simcall_BODY_host_get_available_speed(sg_host_t host) {
168 smx_process_t self = SIMIX_process_self();
170 /* Go to that function to follow the code flow through the simcall barrier */
171 if (0) SIMIX_host_get_available_speed(host);
172 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
174 self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
175 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
176 memset(self->simcall.args, 0, sizeof(self->simcall.args));
177 self->simcall.args[0].dp = (void*) host;
178 if (self != simix_global->maestro_process) {
179 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
180 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
181 SIMIX_process_yield(self);
183 SIMIX_simcall_handle(&self->simcall, 0);
185 return self->simcall.result.d;
188 inline static int simcall_BODY_host_get_state(sg_host_t host) {
189 smx_process_t self = SIMIX_process_self();
191 /* Go to that function to follow the code flow through the simcall barrier */
192 if (0) SIMIX_host_get_state(host);
193 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
195 self->simcall.call = SIMCALL_HOST_GET_STATE;
196 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
197 memset(self->simcall.args, 0, sizeof(self->simcall.args));
198 self->simcall.args[0].dp = (void*) host;
199 if (self != simix_global->maestro_process) {
200 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
201 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
202 SIMIX_process_yield(self);
204 SIMIX_simcall_handle(&self->simcall, 0);
206 return self->simcall.result.i;
209 inline static double simcall_BODY_host_get_current_power_peak(sg_host_t host) {
210 smx_process_t self = SIMIX_process_self();
212 /* Go to that function to follow the code flow through the simcall barrier */
213 if (0) SIMIX_host_get_current_power_peak(host);
214 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
216 self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
217 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
218 memset(self->simcall.args, 0, sizeof(self->simcall.args));
219 self->simcall.args[0].dp = (void*) host;
220 if (self != simix_global->maestro_process) {
221 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
222 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
223 SIMIX_process_yield(self);
225 SIMIX_simcall_handle(&self->simcall, 0);
227 return self->simcall.result.d;
230 inline static double simcall_BODY_host_get_power_peak_at(sg_host_t host, int pstate_index) {
231 smx_process_t self = SIMIX_process_self();
233 /* Go to that function to follow the code flow through the simcall barrier */
234 if (0) SIMIX_host_get_power_peak_at(host, pstate_index);
235 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
237 self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
238 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
239 memset(self->simcall.args, 0, sizeof(self->simcall.args));
240 self->simcall.args[0].dp = (void*) host;
241 self->simcall.args[1].i = (int) pstate_index;
242 if (self != simix_global->maestro_process) {
243 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
244 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
245 SIMIX_process_yield(self);
247 SIMIX_simcall_handle(&self->simcall, 0);
249 return self->simcall.result.d;
252 inline static int simcall_BODY_host_get_nb_pstates(sg_host_t host) {
253 smx_process_t self = SIMIX_process_self();
255 /* Go to that function to follow the code flow through the simcall barrier */
256 if (0) SIMIX_host_get_nb_pstates(host);
257 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
259 self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
260 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
261 memset(self->simcall.args, 0, sizeof(self->simcall.args));
262 self->simcall.args[0].dp = (void*) host;
263 if (self != simix_global->maestro_process) {
264 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
265 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
266 SIMIX_process_yield(self);
268 SIMIX_simcall_handle(&self->simcall, 0);
270 return self->simcall.result.i;
273 inline static double simcall_BODY_host_get_wattmin_at(sg_host_t host, int pstate_index) {
274 smx_process_t self = SIMIX_process_self();
276 /* Go to that function to follow the code flow through the simcall barrier */
277 if (0) SIMIX_host_get_wattmin_at(host, pstate_index);
278 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
280 self->simcall.call = SIMCALL_HOST_GET_WATTMIN_AT;
281 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
282 memset(self->simcall.args, 0, sizeof(self->simcall.args));
283 self->simcall.args[0].dp = (void*) host;
284 self->simcall.args[1].i = (int) pstate_index;
285 if (self != simix_global->maestro_process) {
286 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
287 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
288 SIMIX_process_yield(self);
290 SIMIX_simcall_handle(&self->simcall, 0);
292 return self->simcall.result.d;
295 inline static double simcall_BODY_host_get_wattmax_at(sg_host_t host, int pstate_index) {
296 smx_process_t self = SIMIX_process_self();
298 /* Go to that function to follow the code flow through the simcall barrier */
299 if (0) SIMIX_host_get_wattmax_at(host, pstate_index);
300 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
302 self->simcall.call = SIMCALL_HOST_GET_WATTMAX_AT;
303 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
304 memset(self->simcall.args, 0, sizeof(self->simcall.args));
305 self->simcall.args[0].dp = (void*) host;
306 self->simcall.args[1].i = (int) pstate_index;
307 if (self != simix_global->maestro_process) {
308 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
309 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
310 SIMIX_process_yield(self);
312 SIMIX_simcall_handle(&self->simcall, 0);
314 return self->simcall.result.d;
317 inline static void simcall_BODY_host_set_pstate(sg_host_t host, int pstate_index) {
318 smx_process_t self = SIMIX_process_self();
320 /* Go to that function to follow the code flow through the simcall barrier */
321 if (0) SIMIX_host_set_pstate(host, pstate_index);
322 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
324 self->simcall.call = SIMCALL_HOST_SET_PSTATE;
325 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
326 memset(self->simcall.args, 0, sizeof(self->simcall.args));
327 self->simcall.args[0].dp = (void*) host;
328 self->simcall.args[1].i = (int) pstate_index;
329 if (self != simix_global->maestro_process) {
330 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
331 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
332 SIMIX_process_yield(self);
334 SIMIX_simcall_handle(&self->simcall, 0);
339 inline static int simcall_BODY_host_get_pstate(sg_host_t host) {
340 smx_process_t self = SIMIX_process_self();
342 /* Go to that function to follow the code flow through the simcall barrier */
343 if (0) SIMIX_host_get_pstate(host);
344 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
346 self->simcall.call = SIMCALL_HOST_GET_PSTATE;
347 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
348 memset(self->simcall.args, 0, sizeof(self->simcall.args));
349 self->simcall.args[0].dp = (void*) host;
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_handle(&self->simcall, 0);
357 return self->simcall.result.i;
360 inline static double simcall_BODY_host_get_consumed_energy(sg_host_t host) {
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_host_get_consumed_energy(host);
365 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
367 self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
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].dp = (void*) host;
371 if (self != simix_global->maestro_process) {
372 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
373 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
374 SIMIX_process_yield(self);
376 SIMIX_simcall_handle(&self->simcall, 0);
378 return self->simcall.result.d;
381 inline static smx_synchro_t simcall_BODY_host_execute(const char* name, sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
382 smx_process_t self = SIMIX_process_self();
384 /* Go to that function to follow the code flow through the simcall barrier */
385 if (0) SIMIX_host_execute(name, host, flops_amount, priority, bound, affinity_mask);
386 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
388 self->simcall.call = SIMCALL_HOST_EXECUTE;
389 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
390 memset(self->simcall.args, 0, sizeof(self->simcall.args));
391 self->simcall.args[0].cc = (const char*) name;
392 self->simcall.args[1].dp = (void*) host;
393 self->simcall.args[2].d = (double) flops_amount;
394 self->simcall.args[3].d = (double) priority;
395 self->simcall.args[4].d = (double) bound;
396 self->simcall.args[5].ul = (unsigned long) affinity_mask;
397 if (self != simix_global->maestro_process) {
398 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
399 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
400 SIMIX_process_yield(self);
402 SIMIX_simcall_handle(&self->simcall, 0);
404 return self->simcall.result.dp;
407 inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
408 smx_process_t self = SIMIX_process_self();
410 /* Go to that function to follow the code flow through the simcall barrier */
411 if (0) SIMIX_host_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
412 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
414 self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
415 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
416 memset(self->simcall.args, 0, sizeof(self->simcall.args));
417 self->simcall.args[0].cc = (const char*) name;
418 self->simcall.args[1].i = (int) host_nb;
419 self->simcall.args[2].dp = (void*) host_list;
420 self->simcall.args[3].dp = (void*) flops_amount;
421 self->simcall.args[4].dp = (void*) bytes_amount;
422 self->simcall.args[5].d = (double) amount;
423 self->simcall.args[6].d = (double) rate;
424 if (self != simix_global->maestro_process) {
425 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
426 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
427 SIMIX_process_yield(self);
429 SIMIX_simcall_handle(&self->simcall, 0);
431 return self->simcall.result.dp;
434 inline static void simcall_BODY_host_execution_destroy(smx_synchro_t execution) {
435 smx_process_t self = SIMIX_process_self();
437 /* Go to that function to follow the code flow through the simcall barrier */
438 if (0) SIMIX_host_execution_destroy(execution);
439 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
441 self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY;
442 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
443 memset(self->simcall.args, 0, sizeof(self->simcall.args));
444 self->simcall.args[0].dp = (void*) execution;
445 if (self != simix_global->maestro_process) {
446 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
447 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
448 SIMIX_process_yield(self);
450 SIMIX_simcall_handle(&self->simcall, 0);
455 inline static void simcall_BODY_host_execution_cancel(smx_synchro_t execution) {
456 smx_process_t self = SIMIX_process_self();
458 /* Go to that function to follow the code flow through the simcall barrier */
459 if (0) SIMIX_host_execution_cancel(execution);
460 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
462 self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL;
463 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
464 memset(self->simcall.args, 0, sizeof(self->simcall.args));
465 self->simcall.args[0].dp = (void*) execution;
466 if (self != simix_global->maestro_process) {
467 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
468 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
469 SIMIX_process_yield(self);
471 SIMIX_simcall_handle(&self->simcall, 0);
476 inline static double simcall_BODY_host_execution_get_remains(smx_synchro_t execution) {
477 smx_process_t self = SIMIX_process_self();
479 /* Go to that function to follow the code flow through the simcall barrier */
480 if (0) SIMIX_host_execution_get_remains(execution);
481 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
483 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
484 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
485 memset(self->simcall.args, 0, sizeof(self->simcall.args));
486 self->simcall.args[0].dp = (void*) execution;
487 if (self != simix_global->maestro_process) {
488 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
489 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
490 SIMIX_process_yield(self);
492 SIMIX_simcall_handle(&self->simcall, 0);
494 return self->simcall.result.d;
497 inline static e_smx_state_t simcall_BODY_host_execution_get_state(smx_synchro_t execution) {
498 smx_process_t self = SIMIX_process_self();
500 /* Go to that function to follow the code flow through the simcall barrier */
501 if (0) SIMIX_host_execution_get_state(execution);
502 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
504 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE;
505 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
506 memset(self->simcall.args, 0, sizeof(self->simcall.args));
507 self->simcall.args[0].dp = (void*) execution;
508 if (self != simix_global->maestro_process) {
509 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
510 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
511 SIMIX_process_yield(self);
513 SIMIX_simcall_handle(&self->simcall, 0);
515 return self->simcall.result.i;
518 inline static void simcall_BODY_host_execution_set_priority(smx_synchro_t execution, double priority) {
519 smx_process_t self = SIMIX_process_self();
521 /* Go to that function to follow the code flow through the simcall barrier */
522 if (0) SIMIX_host_execution_set_priority(execution, priority);
523 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
525 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
526 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
527 memset(self->simcall.args, 0, sizeof(self->simcall.args));
528 self->simcall.args[0].dp = (void*) execution;
529 self->simcall.args[1].d = (double) priority;
530 if (self != simix_global->maestro_process) {
531 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
532 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
533 SIMIX_process_yield(self);
535 SIMIX_simcall_handle(&self->simcall, 0);
540 inline static void simcall_BODY_host_execution_set_bound(smx_synchro_t execution, double bound) {
541 smx_process_t self = SIMIX_process_self();
543 /* Go to that function to follow the code flow through the simcall barrier */
544 if (0) SIMIX_host_execution_set_bound(execution, bound);
545 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
547 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND;
548 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
549 memset(self->simcall.args, 0, sizeof(self->simcall.args));
550 self->simcall.args[0].dp = (void*) execution;
551 self->simcall.args[1].d = (double) bound;
552 if (self != simix_global->maestro_process) {
553 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
554 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
555 SIMIX_process_yield(self);
557 SIMIX_simcall_handle(&self->simcall, 0);
562 inline static void simcall_BODY_host_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
563 smx_process_t self = SIMIX_process_self();
565 /* Go to that function to follow the code flow through the simcall barrier */
566 if (0) SIMIX_host_execution_set_affinity(execution, ws, mask);
567 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
569 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY;
570 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
571 memset(self->simcall.args, 0, sizeof(self->simcall.args));
572 self->simcall.args[0].dp = (void*) execution;
573 self->simcall.args[1].dp = (void*) ws;
574 self->simcall.args[2].ul = (unsigned long) mask;
575 if (self != simix_global->maestro_process) {
576 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
577 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
578 SIMIX_process_yield(self);
580 SIMIX_simcall_handle(&self->simcall, 0);
585 inline static int simcall_BODY_host_execution_wait(smx_synchro_t execution) {
586 smx_process_t self = SIMIX_process_self();
588 /* Go to that function to follow the code flow through the simcall barrier */
589 if (0) simcall_HANDLER_host_execution_wait(&self->simcall, execution);
590 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
592 self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT;
593 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
594 memset(self->simcall.args, 0, sizeof(self->simcall.args));
595 self->simcall.args[0].dp = (void*) execution;
596 if (self != simix_global->maestro_process) {
597 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
598 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
599 SIMIX_process_yield(self);
601 SIMIX_simcall_handle(&self->simcall, 0);
603 return self->simcall.result.i;
606 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(sg_host_t host) {
607 smx_process_t self = SIMIX_process_self();
609 /* Go to that function to follow the code flow through the simcall barrier */
610 if (0) SIMIX_host_get_mounted_storage_list(host);
611 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
613 self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
614 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
615 memset(self->simcall.args, 0, sizeof(self->simcall.args));
616 self->simcall.args[0].dp = (void*) host;
617 if (self != simix_global->maestro_process) {
618 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
619 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
620 SIMIX_process_yield(self);
622 SIMIX_simcall_handle(&self->simcall, 0);
624 return self->simcall.result.dp;
627 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(sg_host_t host) {
628 smx_process_t self = SIMIX_process_self();
630 /* Go to that function to follow the code flow through the simcall barrier */
631 if (0) SIMIX_host_get_attached_storage_list(host);
632 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
634 self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
635 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
636 memset(self->simcall.args, 0, sizeof(self->simcall.args));
637 self->simcall.args[0].dp = (void*) host;
638 if (self != simix_global->maestro_process) {
639 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
640 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
641 SIMIX_process_yield(self);
643 SIMIX_simcall_handle(&self->simcall, 0);
645 return self->simcall.result.dp;
648 inline static void simcall_BODY_host_get_params(sg_host_t ind_vm, ws_params_t params) {
649 smx_process_t self = SIMIX_process_self();
651 /* Go to that function to follow the code flow through the simcall barrier */
652 if (0) SIMIX_host_get_params(ind_vm, params);
653 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
655 self->simcall.call = SIMCALL_HOST_GET_PARAMS;
656 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
657 memset(self->simcall.args, 0, sizeof(self->simcall.args));
658 self->simcall.args[0].dp = (void*) ind_vm;
659 self->simcall.args[1].dp = (void*) params;
660 if (self != simix_global->maestro_process) {
661 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
662 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
663 SIMIX_process_yield(self);
665 SIMIX_simcall_handle(&self->simcall, 0);
670 inline static void simcall_BODY_host_set_params(sg_host_t ind_vm, ws_params_t params) {
671 smx_process_t self = SIMIX_process_self();
673 /* Go to that function to follow the code flow through the simcall barrier */
674 if (0) SIMIX_host_set_params(ind_vm, params);
675 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
677 self->simcall.call = SIMCALL_HOST_SET_PARAMS;
678 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
679 memset(self->simcall.args, 0, sizeof(self->simcall.args));
680 self->simcall.args[0].dp = (void*) ind_vm;
681 self->simcall.args[1].dp = (void*) params;
682 if (self != simix_global->maestro_process) {
683 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
684 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
685 SIMIX_process_yield(self);
687 SIMIX_simcall_handle(&self->simcall, 0);
692 inline static sg_host_t simcall_BODY_vm_create(const char* name, sg_host_t ind_pm) {
693 smx_process_t self = SIMIX_process_self();
695 /* Go to that function to follow the code flow through the simcall barrier */
696 if (0) SIMIX_vm_create(name, ind_pm);
697 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
699 self->simcall.call = SIMCALL_VM_CREATE;
700 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
701 memset(self->simcall.args, 0, sizeof(self->simcall.args));
702 self->simcall.args[0].cc = (const char*) name;
703 self->simcall.args[1].dp = (void*) ind_pm;
704 if (self != simix_global->maestro_process) {
705 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
706 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
707 SIMIX_process_yield(self);
709 SIMIX_simcall_handle(&self->simcall, 0);
711 return self->simcall.result.dp;
714 inline static void simcall_BODY_vm_start(sg_host_t ind_vm) {
715 smx_process_t self = SIMIX_process_self();
717 /* Go to that function to follow the code flow through the simcall barrier */
718 if (0) SIMIX_vm_start(ind_vm);
719 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
721 self->simcall.call = SIMCALL_VM_START;
722 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
723 memset(self->simcall.args, 0, sizeof(self->simcall.args));
724 self->simcall.args[0].dp = (void*) ind_vm;
725 if (self != simix_global->maestro_process) {
726 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
727 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
728 SIMIX_process_yield(self);
730 SIMIX_simcall_handle(&self->simcall, 0);
735 inline static int simcall_BODY_vm_get_state(sg_host_t ind_vm) {
736 smx_process_t self = SIMIX_process_self();
738 /* Go to that function to follow the code flow through the simcall barrier */
739 if (0) SIMIX_vm_get_state(ind_vm);
740 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
742 self->simcall.call = SIMCALL_VM_GET_STATE;
743 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
744 memset(self->simcall.args, 0, sizeof(self->simcall.args));
745 self->simcall.args[0].dp = (void*) ind_vm;
746 if (self != simix_global->maestro_process) {
747 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
748 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
749 SIMIX_process_yield(self);
751 SIMIX_simcall_handle(&self->simcall, 0);
753 return self->simcall.result.i;
756 inline static void simcall_BODY_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) {
757 smx_process_t self = SIMIX_process_self();
759 /* Go to that function to follow the code flow through the simcall barrier */
760 if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
761 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
763 self->simcall.call = SIMCALL_VM_MIGRATE;
764 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
765 memset(self->simcall.args, 0, sizeof(self->simcall.args));
766 self->simcall.args[0].dp = (void*) ind_vm;
767 self->simcall.args[1].dp = (void*) ind_dst_pm;
768 if (self != simix_global->maestro_process) {
769 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
770 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
771 SIMIX_process_yield(self);
773 SIMIX_simcall_handle(&self->simcall, 0);
778 inline static void* simcall_BODY_vm_get_pm(sg_host_t ind_vm) {
779 smx_process_t self = SIMIX_process_self();
781 /* Go to that function to follow the code flow through the simcall barrier */
782 if (0) SIMIX_vm_get_pm(ind_vm);
783 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
785 self->simcall.call = SIMCALL_VM_GET_PM;
786 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
787 memset(self->simcall.args, 0, sizeof(self->simcall.args));
788 self->simcall.args[0].dp = (void*) ind_vm;
789 if (self != simix_global->maestro_process) {
790 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
791 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
792 SIMIX_process_yield(self);
794 SIMIX_simcall_handle(&self->simcall, 0);
796 return self->simcall.result.dp;
799 inline static void simcall_BODY_vm_set_bound(sg_host_t ind_vm, double bound) {
800 smx_process_t self = SIMIX_process_self();
802 /* Go to that function to follow the code flow through the simcall barrier */
803 if (0) SIMIX_vm_set_bound(ind_vm, bound);
804 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
806 self->simcall.call = SIMCALL_VM_SET_BOUND;
807 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
808 memset(self->simcall.args, 0, sizeof(self->simcall.args));
809 self->simcall.args[0].dp = (void*) ind_vm;
810 self->simcall.args[1].d = (double) bound;
811 if (self != simix_global->maestro_process) {
812 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
813 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
814 SIMIX_process_yield(self);
816 SIMIX_simcall_handle(&self->simcall, 0);
821 inline static void simcall_BODY_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) {
822 smx_process_t self = SIMIX_process_self();
824 /* Go to that function to follow the code flow through the simcall barrier */
825 if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
826 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
828 self->simcall.call = SIMCALL_VM_SET_AFFINITY;
829 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
830 memset(self->simcall.args, 0, sizeof(self->simcall.args));
831 self->simcall.args[0].dp = (void*) ind_vm;
832 self->simcall.args[1].dp = (void*) ind_pm;
833 self->simcall.args[2].ul = (unsigned long) mask;
834 if (self != simix_global->maestro_process) {
835 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
836 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
837 SIMIX_process_yield(self);
839 SIMIX_simcall_handle(&self->simcall, 0);
844 inline static void simcall_BODY_vm_destroy(sg_host_t ind_vm) {
845 smx_process_t self = SIMIX_process_self();
847 /* Go to that function to follow the code flow through the simcall barrier */
848 if (0) SIMIX_vm_destroy(ind_vm);
849 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
851 self->simcall.call = SIMCALL_VM_DESTROY;
852 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
853 memset(self->simcall.args, 0, sizeof(self->simcall.args));
854 self->simcall.args[0].dp = (void*) ind_vm;
855 if (self != simix_global->maestro_process) {
856 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
857 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
858 SIMIX_process_yield(self);
860 SIMIX_simcall_handle(&self->simcall, 0);
865 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
866 smx_process_t self = SIMIX_process_self();
868 /* Go to that function to follow the code flow through the simcall barrier */
869 if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
870 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
872 self->simcall.call = SIMCALL_VM_SUSPEND;
873 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
874 memset(self->simcall.args, 0, sizeof(self->simcall.args));
875 self->simcall.args[0].dp = (void*) ind_vm;
876 if (self != simix_global->maestro_process) {
877 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
878 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
879 SIMIX_process_yield(self);
881 SIMIX_simcall_handle(&self->simcall, 0);
886 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
887 smx_process_t self = SIMIX_process_self();
889 /* Go to that function to follow the code flow through the simcall barrier */
890 if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
891 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
893 self->simcall.call = SIMCALL_VM_RESUME;
894 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
895 memset(self->simcall.args, 0, sizeof(self->simcall.args));
896 self->simcall.args[0].dp = (void*) ind_vm;
897 if (self != simix_global->maestro_process) {
898 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
899 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
900 SIMIX_process_yield(self);
902 SIMIX_simcall_handle(&self->simcall, 0);
907 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
908 smx_process_t self = SIMIX_process_self();
910 /* Go to that function to follow the code flow through the simcall barrier */
911 if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
912 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
914 self->simcall.call = SIMCALL_VM_SHUTDOWN;
915 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
916 memset(self->simcall.args, 0, sizeof(self->simcall.args));
917 self->simcall.args[0].dp = (void*) ind_vm;
918 if (self != simix_global->maestro_process) {
919 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
920 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
921 SIMIX_process_yield(self);
923 SIMIX_simcall_handle(&self->simcall, 0);
928 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
929 smx_process_t self = SIMIX_process_self();
931 /* Go to that function to follow the code flow through the simcall barrier */
932 if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
933 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
935 self->simcall.call = SIMCALL_VM_SAVE;
936 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
937 memset(self->simcall.args, 0, sizeof(self->simcall.args));
938 self->simcall.args[0].dp = (void*) ind_vm;
939 if (self != simix_global->maestro_process) {
940 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
941 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
942 SIMIX_process_yield(self);
944 SIMIX_simcall_handle(&self->simcall, 0);
949 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
950 smx_process_t self = SIMIX_process_self();
952 /* Go to that function to follow the code flow through the simcall barrier */
953 if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
954 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
956 self->simcall.call = SIMCALL_VM_RESTORE;
957 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
958 memset(self->simcall.args, 0, sizeof(self->simcall.args));
959 self->simcall.args[0].dp = (void*) ind_vm;
960 if (self != simix_global->maestro_process) {
961 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
962 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
963 SIMIX_process_yield(self);
965 SIMIX_simcall_handle(&self->simcall, 0);
970 inline static void simcall_BODY_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) {
971 smx_process_t self = SIMIX_process_self();
973 /* Go to that function to follow the code flow through the simcall barrier */
974 if (0) SIMIX_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
975 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
977 self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO;
978 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
979 memset(self->simcall.args, 0, sizeof(self->simcall.args));
980 self->simcall.args[0].dp = (void*) vm;
981 self->simcall.args[1].dp = (void*) src_pm;
982 self->simcall.args[2].dp = (void*) dst_pm;
983 if (self != simix_global->maestro_process) {
984 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
985 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
986 SIMIX_process_yield(self);
988 SIMIX_simcall_handle(&self->simcall, 0);
993 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) {
994 smx_process_t self = SIMIX_process_self();
996 /* Go to that function to follow the code flow through the simcall barrier */
997 if (0) simcall_HANDLER_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
998 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1000 self->simcall.call = SIMCALL_PROCESS_CREATE;
1001 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1002 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1003 self->simcall.args[0].dp = (void*) process;
1004 self->simcall.args[1].cc = (const char*) name;
1005 self->simcall.args[2].fp = (FPtr) code;
1006 self->simcall.args[3].dp = (void*) data;
1007 self->simcall.args[4].cc = (const char*) hostname;
1008 self->simcall.args[5].d = (double) kill_time;
1009 self->simcall.args[6].i = (int) argc;
1010 self->simcall.args[7].dp = (void*) argv;
1011 self->simcall.args[8].dp = (void*) properties;
1012 self->simcall.args[9].i = (int) auto_restart;
1013 if (self != simix_global->maestro_process) {
1014 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1015 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1016 SIMIX_process_yield(self);
1018 SIMIX_simcall_handle(&self->simcall, 0);
1023 inline static void simcall_BODY_process_kill(smx_process_t process) {
1024 smx_process_t self = SIMIX_process_self();
1026 /* Go to that function to follow the code flow through the simcall barrier */
1027 if (0) simcall_HANDLER_process_kill(&self->simcall, process);
1028 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1030 self->simcall.call = SIMCALL_PROCESS_KILL;
1031 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1032 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1033 self->simcall.args[0].dp = (void*) process;
1034 if (self != simix_global->maestro_process) {
1035 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1036 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1037 SIMIX_process_yield(self);
1039 SIMIX_simcall_handle(&self->simcall, 0);
1044 inline static void simcall_BODY_process_killall(int reset_pid) {
1045 smx_process_t self = SIMIX_process_self();
1047 /* Go to that function to follow the code flow through the simcall barrier */
1048 if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
1049 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1051 self->simcall.call = SIMCALL_PROCESS_KILLALL;
1052 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1053 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1054 self->simcall.args[0].i = (int) reset_pid;
1055 if (self != simix_global->maestro_process) {
1056 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1057 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1058 SIMIX_process_yield(self);
1060 SIMIX_simcall_handle(&self->simcall, 0);
1065 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
1066 smx_process_t self = SIMIX_process_self();
1068 /* Go to that function to follow the code flow through the simcall barrier */
1069 if (0) SIMIX_process_cleanup(process);
1070 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1072 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
1073 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1074 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1075 self->simcall.args[0].dp = (void*) process;
1076 if (self != simix_global->maestro_process) {
1077 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1078 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1079 SIMIX_process_yield(self);
1081 SIMIX_simcall_handle(&self->simcall, 0);
1086 inline static void simcall_BODY_process_change_host(smx_process_t process, sg_host_t dest) {
1087 smx_process_t self = SIMIX_process_self();
1089 /* Go to that function to follow the code flow through the simcall barrier */
1090 if (0) simcall_HANDLER_process_change_host(&self->simcall, process, dest);
1091 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1093 self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
1094 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1095 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1096 self->simcall.args[0].dp = (void*) process;
1097 self->simcall.args[1].dp = (void*) dest;
1098 if (self != simix_global->maestro_process) {
1099 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1100 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1101 SIMIX_process_yield(self);
1103 SIMIX_simcall_handle(&self->simcall, 0);
1108 inline static void simcall_BODY_process_suspend(smx_process_t process) {
1109 smx_process_t self = SIMIX_process_self();
1111 /* Go to that function to follow the code flow through the simcall barrier */
1112 if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
1113 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1115 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
1116 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1117 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1118 self->simcall.args[0].dp = (void*) process;
1119 if (self != simix_global->maestro_process) {
1120 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1121 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1122 SIMIX_process_yield(self);
1124 SIMIX_simcall_handle(&self->simcall, 0);
1129 inline static void simcall_BODY_process_resume(smx_process_t process) {
1130 smx_process_t self = SIMIX_process_self();
1132 /* Go to that function to follow the code flow through the simcall barrier */
1133 if (0) simcall_HANDLER_process_resume(&self->simcall, process);
1134 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1136 self->simcall.call = SIMCALL_PROCESS_RESUME;
1137 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1138 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1139 self->simcall.args[0].dp = (void*) process;
1140 if (self != simix_global->maestro_process) {
1141 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1142 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1143 SIMIX_process_yield(self);
1145 SIMIX_simcall_handle(&self->simcall, 0);
1150 inline static int simcall_BODY_process_count() {
1151 smx_process_t self = SIMIX_process_self();
1153 /* Go to that function to follow the code flow through the simcall barrier */
1154 if (0) SIMIX_process_count();
1155 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1157 self->simcall.call = SIMCALL_PROCESS_COUNT;
1158 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1159 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1161 if (self != simix_global->maestro_process) {
1162 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1163 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1164 SIMIX_process_yield(self);
1166 SIMIX_simcall_handle(&self->simcall, 0);
1168 return self->simcall.result.i;
1171 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
1172 smx_process_t self = SIMIX_process_self();
1174 /* Go to that function to follow the code flow through the simcall barrier */
1175 if (0) SIMIX_process_get_PID(process);
1176 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1178 self->simcall.call = SIMCALL_PROCESS_GET_PID;
1179 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1180 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1181 self->simcall.args[0].dp = (void*) process;
1182 if (self != simix_global->maestro_process) {
1183 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1184 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1185 SIMIX_process_yield(self);
1187 SIMIX_simcall_handle(&self->simcall, 0);
1189 return self->simcall.result.i;
1192 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
1193 smx_process_t self = SIMIX_process_self();
1195 /* Go to that function to follow the code flow through the simcall barrier */
1196 if (0) SIMIX_process_get_PPID(process);
1197 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1199 self->simcall.call = SIMCALL_PROCESS_GET_PPID;
1200 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1201 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1202 self->simcall.args[0].dp = (void*) process;
1203 if (self != simix_global->maestro_process) {
1204 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1205 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1206 SIMIX_process_yield(self);
1208 SIMIX_simcall_handle(&self->simcall, 0);
1210 return self->simcall.result.i;
1213 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
1214 smx_process_t self = SIMIX_process_self();
1216 /* Go to that function to follow the code flow through the simcall barrier */
1217 if (0) SIMIX_process_get_data(process);
1218 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1220 self->simcall.call = SIMCALL_PROCESS_GET_DATA;
1221 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1222 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1223 self->simcall.args[0].dp = (void*) process;
1224 if (self != simix_global->maestro_process) {
1225 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1226 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1227 SIMIX_process_yield(self);
1229 SIMIX_simcall_handle(&self->simcall, 0);
1231 return self->simcall.result.dp;
1234 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
1235 smx_process_t self = SIMIX_process_self();
1237 /* Go to that function to follow the code flow through the simcall barrier */
1238 if (0) SIMIX_process_set_data(process, data);
1239 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1241 self->simcall.call = SIMCALL_PROCESS_SET_DATA;
1242 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1243 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1244 self->simcall.args[0].dp = (void*) process;
1245 self->simcall.args[1].dp = (void*) data;
1246 if (self != simix_global->maestro_process) {
1247 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1248 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1249 SIMIX_process_yield(self);
1251 SIMIX_simcall_handle(&self->simcall, 0);
1256 inline static sg_host_t simcall_BODY_process_get_host(smx_process_t process) {
1257 smx_process_t self = SIMIX_process_self();
1259 /* Go to that function to follow the code flow through the simcall barrier */
1260 if (0) SIMIX_process_get_host(process);
1261 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1263 self->simcall.call = SIMCALL_PROCESS_GET_HOST;
1264 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1265 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1266 self->simcall.args[0].dp = (void*) process;
1267 if (self != simix_global->maestro_process) {
1268 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1269 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1270 SIMIX_process_yield(self);
1272 SIMIX_simcall_handle(&self->simcall, 0);
1274 return self->simcall.result.dp;
1277 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
1278 smx_process_t self = SIMIX_process_self();
1280 /* Go to that function to follow the code flow through the simcall barrier */
1281 if (0) SIMIX_process_get_name(process);
1282 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1284 self->simcall.call = SIMCALL_PROCESS_GET_NAME;
1285 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1286 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1287 self->simcall.args[0].dp = (void*) process;
1288 if (self != simix_global->maestro_process) {
1289 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1290 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1291 SIMIX_process_yield(self);
1293 SIMIX_simcall_handle(&self->simcall, 0);
1295 return self->simcall.result.cc;
1298 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
1299 smx_process_t self = SIMIX_process_self();
1301 /* Go to that function to follow the code flow through the simcall barrier */
1302 if (0) SIMIX_process_is_suspended(process);
1303 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1305 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
1306 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1307 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1308 self->simcall.args[0].dp = (void*) process;
1309 if (self != simix_global->maestro_process) {
1310 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1311 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1312 SIMIX_process_yield(self);
1314 SIMIX_simcall_handle(&self->simcall, 0);
1316 return self->simcall.result.i;
1319 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
1320 smx_process_t self = SIMIX_process_self();
1322 /* Go to that function to follow the code flow through the simcall barrier */
1323 if (0) SIMIX_process_get_properties(process);
1324 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1326 self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
1327 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1328 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1329 self->simcall.args[0].dp = (void*) process;
1330 if (self != simix_global->maestro_process) {
1331 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1332 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1333 SIMIX_process_yield(self);
1335 SIMIX_simcall_handle(&self->simcall, 0);
1337 return self->simcall.result.dp;
1340 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
1341 smx_process_t self = SIMIX_process_self();
1343 /* Go to that function to follow the code flow through the simcall barrier */
1344 if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
1345 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1347 self->simcall.call = SIMCALL_PROCESS_JOIN;
1348 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1349 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1350 self->simcall.args[0].dp = (void*) process;
1351 self->simcall.args[1].d = (double) timeout;
1352 if (self != simix_global->maestro_process) {
1353 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1354 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1355 SIMIX_process_yield(self);
1357 SIMIX_simcall_handle(&self->simcall, 0);
1359 return self->simcall.result.i;
1362 inline static int simcall_BODY_process_sleep(double duration) {
1363 smx_process_t self = SIMIX_process_self();
1365 /* Go to that function to follow the code flow through the simcall barrier */
1366 if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
1367 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1369 self->simcall.call = SIMCALL_PROCESS_SLEEP;
1370 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1371 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1372 self->simcall.args[0].d = (double) duration;
1373 if (self != simix_global->maestro_process) {
1374 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1375 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1376 SIMIX_process_yield(self);
1378 SIMIX_simcall_handle(&self->simcall, 0);
1380 return self->simcall.result.i;
1383 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1384 smx_process_t self = SIMIX_process_self();
1386 /* Go to that function to follow the code flow through the simcall barrier */
1387 if (0) SIMIX_process_on_exit(process, fun, data);
1388 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1390 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1391 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1392 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1393 self->simcall.args[0].dp = (void*) process;
1394 self->simcall.args[1].fp = (FPtr) fun;
1395 self->simcall.args[2].dp = (void*) data;
1396 if (self != simix_global->maestro_process) {
1397 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1398 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1399 SIMIX_process_yield(self);
1401 SIMIX_simcall_handle(&self->simcall, 0);
1406 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
1407 smx_process_t self = SIMIX_process_self();
1409 /* Go to that function to follow the code flow through the simcall barrier */
1410 if (0) SIMIX_process_auto_restart_set(process, auto_restart);
1411 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1413 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
1414 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1415 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1416 self->simcall.args[0].dp = (void*) process;
1417 self->simcall.args[1].i = (int) auto_restart;
1418 if (self != simix_global->maestro_process) {
1419 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1420 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1421 SIMIX_process_yield(self);
1423 SIMIX_simcall_handle(&self->simcall, 0);
1428 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1429 smx_process_t self = SIMIX_process_self();
1431 /* Go to that function to follow the code flow through the simcall barrier */
1432 if (0) simcall_HANDLER_process_restart(&self->simcall, process);
1433 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1435 self->simcall.call = SIMCALL_PROCESS_RESTART;
1436 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1437 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1438 self->simcall.args[0].dp = (void*) process;
1439 if (self != simix_global->maestro_process) {
1440 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1441 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1442 SIMIX_process_yield(self);
1444 SIMIX_simcall_handle(&self->simcall, 0);
1446 return self->simcall.result.dp;
1449 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1450 smx_process_t self = SIMIX_process_self();
1452 /* Go to that function to follow the code flow through the simcall barrier */
1453 if (0) SIMIX_rdv_create(name);
1454 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1456 self->simcall.call = SIMCALL_RDV_CREATE;
1457 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1458 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1459 self->simcall.args[0].cc = (const char*) name;
1460 if (self != simix_global->maestro_process) {
1461 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1462 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1463 SIMIX_process_yield(self);
1465 SIMIX_simcall_handle(&self->simcall, 0);
1467 return self->simcall.result.dp;
1470 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1471 smx_process_t self = SIMIX_process_self();
1473 /* Go to that function to follow the code flow through the simcall barrier */
1474 if (0) SIMIX_rdv_destroy(rdv);
1475 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1477 self->simcall.call = SIMCALL_RDV_DESTROY;
1478 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1479 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1480 self->simcall.args[0].dp = (void*) rdv;
1481 if (self != simix_global->maestro_process) {
1482 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1483 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1484 SIMIX_process_yield(self);
1486 SIMIX_simcall_handle(&self->simcall, 0);
1491 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) {
1492 smx_process_t self = SIMIX_process_self();
1494 /* Go to that function to follow the code flow through the simcall barrier */
1495 if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
1496 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1498 self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1499 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1500 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1501 self->simcall.args[0].dp = (void*) rdv;
1502 self->simcall.args[1].dp = (void*) host;
1503 if (self != simix_global->maestro_process) {
1504 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1505 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1506 SIMIX_process_yield(self);
1508 SIMIX_simcall_handle(&self->simcall, 0);
1510 return self->simcall.result.ui;
1513 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1514 smx_process_t self = SIMIX_process_self();
1516 /* Go to that function to follow the code flow through the simcall barrier */
1517 if (0) SIMIX_rdv_get_head(rdv);
1518 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1520 self->simcall.call = SIMCALL_RDV_GET_HEAD;
1521 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1522 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1523 self->simcall.args[0].dp = (void*) rdv;
1524 if (self != simix_global->maestro_process) {
1525 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1526 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1527 SIMIX_process_yield(self);
1529 SIMIX_simcall_handle(&self->simcall, 0);
1531 return self->simcall.result.dp;
1534 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1535 smx_process_t self = SIMIX_process_self();
1537 /* Go to that function to follow the code flow through the simcall barrier */
1538 if (0) SIMIX_rdv_set_receiver(rdv, receiver);
1539 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1541 self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1542 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1543 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1544 self->simcall.args[0].dp = (void*) rdv;
1545 self->simcall.args[1].dp = (void*) receiver;
1546 if (self != simix_global->maestro_process) {
1547 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1548 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1549 SIMIX_process_yield(self);
1551 SIMIX_simcall_handle(&self->simcall, 0);
1556 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1557 smx_process_t self = SIMIX_process_self();
1559 /* Go to that function to follow the code flow through the simcall barrier */
1560 if (0) SIMIX_rdv_get_receiver(rdv);
1561 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1563 self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1564 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1565 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1566 self->simcall.args[0].dp = (void*) rdv;
1567 if (self != simix_global->maestro_process) {
1568 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1569 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1570 SIMIX_process_yield(self);
1572 SIMIX_simcall_handle(&self->simcall, 0);
1574 return self->simcall.result.dp;
1577 inline static smx_synchro_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
1578 smx_process_t self = SIMIX_process_self();
1580 /* Go to that function to follow the code flow through the simcall barrier */
1581 if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1582 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1584 self->simcall.call = SIMCALL_COMM_IPROBE;
1585 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1586 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1587 self->simcall.args[0].dp = (void*) rdv;
1588 self->simcall.args[1].i = (int) type;
1589 self->simcall.args[2].i = (int) src;
1590 self->simcall.args[3].i = (int) tag;
1591 self->simcall.args[4].fp = (FPtr) match_fun;
1592 self->simcall.args[5].dp = (void*) data;
1593 if (self != simix_global->maestro_process) {
1594 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1595 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1596 SIMIX_process_yield(self);
1598 SIMIX_simcall_handle(&self->simcall, 0);
1600 return self->simcall.result.dp;
1603 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) {
1604 smx_process_t self = SIMIX_process_self();
1606 /* Go to that function to follow the code flow through the simcall barrier */
1607 if (0) simcall_HANDLER_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
1608 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1610 self->simcall.call = SIMCALL_COMM_SEND;
1611 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1612 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1613 self->simcall.args[0].dp = (void*) src;
1614 self->simcall.args[1].dp = (void*) rdv;
1615 self->simcall.args[2].d = (double) task_size;
1616 self->simcall.args[3].d = (double) rate;
1617 self->simcall.args[4].dp = (void*) src_buff;
1618 self->simcall.args[5].sz = (size_t) src_buff_size;
1619 self->simcall.args[6].fp = (FPtr) match_fun;
1620 self->simcall.args[7].fp = (FPtr) copy_data_fun;
1621 self->simcall.args[8].dp = (void*) data;
1622 self->simcall.args[9].d = (double) timeout;
1623 if (self != simix_global->maestro_process) {
1624 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1625 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1626 SIMIX_process_yield(self);
1628 SIMIX_simcall_handle(&self->simcall, 0);
1633 inline static smx_synchro_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) {
1634 smx_process_t self = SIMIX_process_self();
1636 /* Go to that function to follow the code flow through the simcall barrier */
1637 if (0) simcall_HANDLER_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
1638 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1640 self->simcall.call = SIMCALL_COMM_ISEND;
1641 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1642 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1643 self->simcall.args[0].dp = (void*) src;
1644 self->simcall.args[1].dp = (void*) rdv;
1645 self->simcall.args[2].d = (double) task_size;
1646 self->simcall.args[3].d = (double) rate;
1647 self->simcall.args[4].dp = (void*) src_buff;
1648 self->simcall.args[5].sz = (size_t) src_buff_size;
1649 self->simcall.args[6].fp = (FPtr) match_fun;
1650 self->simcall.args[7].fp = (FPtr) clean_fun;
1651 self->simcall.args[8].fp = (FPtr) copy_data_fun;
1652 self->simcall.args[9].dp = (void*) data;
1653 self->simcall.args[10].i = (int) detached;
1654 if (self != simix_global->maestro_process) {
1655 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1656 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1657 SIMIX_process_yield(self);
1659 SIMIX_simcall_handle(&self->simcall, 0);
1661 return self->simcall.result.dp;
1664 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) {
1665 smx_process_t self = SIMIX_process_self();
1667 /* Go to that function to follow the code flow through the simcall barrier */
1668 if (0) simcall_HANDLER_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1669 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1671 self->simcall.call = SIMCALL_COMM_RECV;
1672 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1673 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1674 self->simcall.args[0].dp = (void*) rdv;
1675 self->simcall.args[1].dp = (void*) dst_buff;
1676 self->simcall.args[2].dp = (void*) dst_buff_size;
1677 self->simcall.args[3].fp = (FPtr) match_fun;
1678 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1679 self->simcall.args[5].dp = (void*) data;
1680 self->simcall.args[6].d = (double) timeout;
1681 self->simcall.args[7].d = (double) rate;
1682 if (self != simix_global->maestro_process) {
1683 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1684 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1685 SIMIX_process_yield(self);
1687 SIMIX_simcall_handle(&self->simcall, 0);
1692 inline static smx_synchro_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) {
1693 smx_process_t self = SIMIX_process_self();
1695 /* Go to that function to follow the code flow through the simcall barrier */
1696 if (0) simcall_HANDLER_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1697 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1699 self->simcall.call = SIMCALL_COMM_IRECV;
1700 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1701 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1702 self->simcall.args[0].dp = (void*) rdv;
1703 self->simcall.args[1].dp = (void*) dst_buff;
1704 self->simcall.args[2].dp = (void*) dst_buff_size;
1705 self->simcall.args[3].fp = (FPtr) match_fun;
1706 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1707 self->simcall.args[5].dp = (void*) data;
1708 self->simcall.args[6].d = (double) rate;
1709 if (self != simix_global->maestro_process) {
1710 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1711 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1712 SIMIX_process_yield(self);
1714 SIMIX_simcall_handle(&self->simcall, 0);
1716 return self->simcall.result.dp;
1719 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
1720 smx_process_t self = SIMIX_process_self();
1722 /* Go to that function to follow the code flow through the simcall barrier */
1723 if (0) SIMIX_comm_cancel(comm);
1724 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1726 self->simcall.call = SIMCALL_COMM_CANCEL;
1727 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1728 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1729 self->simcall.args[0].dp = (void*) comm;
1730 if (self != simix_global->maestro_process) {
1731 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1732 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1733 SIMIX_process_yield(self);
1735 SIMIX_simcall_handle(&self->simcall, 0);
1740 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1741 smx_process_t self = SIMIX_process_self();
1743 /* Go to that function to follow the code flow through the simcall barrier */
1744 if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
1745 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1747 self->simcall.call = SIMCALL_COMM_WAITANY;
1748 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1749 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1750 self->simcall.args[0].dp = (void*) comms;
1751 if (self != simix_global->maestro_process) {
1752 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1753 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1754 SIMIX_process_yield(self);
1756 SIMIX_simcall_handle(&self->simcall, 0);
1758 return self->simcall.result.i;
1761 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
1762 smx_process_t self = SIMIX_process_self();
1764 /* Go to that function to follow the code flow through the simcall barrier */
1765 if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
1766 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1768 self->simcall.call = SIMCALL_COMM_WAIT;
1769 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1770 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1771 self->simcall.args[0].dp = (void*) comm;
1772 self->simcall.args[1].d = (double) timeout;
1773 if (self != simix_global->maestro_process) {
1774 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1775 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1776 SIMIX_process_yield(self);
1778 SIMIX_simcall_handle(&self->simcall, 0);
1783 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
1784 smx_process_t self = SIMIX_process_self();
1786 /* Go to that function to follow the code flow through the simcall barrier */
1787 if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
1788 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1790 self->simcall.call = SIMCALL_COMM_TEST;
1791 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1792 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1793 self->simcall.args[0].dp = (void*) comm;
1794 if (self != simix_global->maestro_process) {
1795 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1796 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1797 SIMIX_process_yield(self);
1799 SIMIX_simcall_handle(&self->simcall, 0);
1801 return self->simcall.result.i;
1804 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1805 smx_process_t self = SIMIX_process_self();
1807 /* Go to that function to follow the code flow through the simcall barrier */
1808 if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
1809 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1811 self->simcall.call = SIMCALL_COMM_TESTANY;
1812 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1813 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1814 self->simcall.args[0].dp = (void*) comms;
1815 if (self != simix_global->maestro_process) {
1816 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1817 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1818 SIMIX_process_yield(self);
1820 SIMIX_simcall_handle(&self->simcall, 0);
1822 return self->simcall.result.i;
1825 inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
1826 smx_process_t self = SIMIX_process_self();
1828 /* Go to that function to follow the code flow through the simcall barrier */
1829 if (0) SIMIX_comm_get_remains(comm);
1830 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1832 self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1833 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1834 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1835 self->simcall.args[0].dp = (void*) comm;
1836 if (self != simix_global->maestro_process) {
1837 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1838 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1839 SIMIX_process_yield(self);
1841 SIMIX_simcall_handle(&self->simcall, 0);
1843 return self->simcall.result.d;
1846 inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
1847 smx_process_t self = SIMIX_process_self();
1849 /* Go to that function to follow the code flow through the simcall barrier */
1850 if (0) SIMIX_comm_get_state(comm);
1851 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1853 self->simcall.call = SIMCALL_COMM_GET_STATE;
1854 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1855 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1856 self->simcall.args[0].dp = (void*) comm;
1857 if (self != simix_global->maestro_process) {
1858 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1859 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1860 SIMIX_process_yield(self);
1862 SIMIX_simcall_handle(&self->simcall, 0);
1864 return self->simcall.result.i;
1867 inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
1868 smx_process_t self = SIMIX_process_self();
1870 /* Go to that function to follow the code flow through the simcall barrier */
1871 if (0) SIMIX_comm_get_src_data(comm);
1872 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1874 self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1875 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1876 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1877 self->simcall.args[0].dp = (void*) comm;
1878 if (self != simix_global->maestro_process) {
1879 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1880 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1881 SIMIX_process_yield(self);
1883 SIMIX_simcall_handle(&self->simcall, 0);
1885 return self->simcall.result.dp;
1888 inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
1889 smx_process_t self = SIMIX_process_self();
1891 /* Go to that function to follow the code flow through the simcall barrier */
1892 if (0) SIMIX_comm_get_dst_data(comm);
1893 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1895 self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1896 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1897 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1898 self->simcall.args[0].dp = (void*) comm;
1899 if (self != simix_global->maestro_process) {
1900 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1901 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1902 SIMIX_process_yield(self);
1904 SIMIX_simcall_handle(&self->simcall, 0);
1906 return self->simcall.result.dp;
1909 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_synchro_t comm) {
1910 smx_process_t self = SIMIX_process_self();
1912 /* Go to that function to follow the code flow through the simcall barrier */
1913 if (0) SIMIX_comm_get_src_proc(comm);
1914 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1916 self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1917 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1918 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1919 self->simcall.args[0].dp = (void*) comm;
1920 if (self != simix_global->maestro_process) {
1921 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1922 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1923 SIMIX_process_yield(self);
1925 SIMIX_simcall_handle(&self->simcall, 0);
1927 return self->simcall.result.dp;
1930 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_synchro_t comm) {
1931 smx_process_t self = SIMIX_process_self();
1933 /* Go to that function to follow the code flow through the simcall barrier */
1934 if (0) SIMIX_comm_get_dst_proc(comm);
1935 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1937 self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1938 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1939 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1940 self->simcall.args[0].dp = (void*) comm;
1941 if (self != simix_global->maestro_process) {
1942 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1943 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1944 SIMIX_process_yield(self);
1946 SIMIX_simcall_handle(&self->simcall, 0);
1948 return self->simcall.result.dp;
1951 inline static smx_mutex_t simcall_BODY_mutex_init() {
1952 smx_process_t self = SIMIX_process_self();
1954 /* Go to that function to follow the code flow through the simcall barrier */
1955 if (0) simcall_HANDLER_mutex_init(&self->simcall);
1956 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1958 self->simcall.call = SIMCALL_MUTEX_INIT;
1959 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1960 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1962 if (self != simix_global->maestro_process) {
1963 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1964 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1965 SIMIX_process_yield(self);
1967 SIMIX_simcall_handle(&self->simcall, 0);
1969 return self->simcall.result.dp;
1972 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1973 smx_process_t self = SIMIX_process_self();
1975 /* Go to that function to follow the code flow through the simcall barrier */
1976 if (0) SIMIX_mutex_destroy(mutex);
1977 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1979 self->simcall.call = SIMCALL_MUTEX_DESTROY;
1980 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1981 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1982 self->simcall.args[0].dp = (void*) mutex;
1983 if (self != simix_global->maestro_process) {
1984 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1985 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1986 SIMIX_process_yield(self);
1988 SIMIX_simcall_handle(&self->simcall, 0);
1993 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1994 smx_process_t self = SIMIX_process_self();
1996 /* Go to that function to follow the code flow through the simcall barrier */
1997 if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1998 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2000 self->simcall.call = SIMCALL_MUTEX_LOCK;
2001 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2002 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2003 self->simcall.args[0].dp = (void*) mutex;
2004 if (self != simix_global->maestro_process) {
2005 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2006 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2007 SIMIX_process_yield(self);
2009 SIMIX_simcall_handle(&self->simcall, 0);
2014 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
2015 smx_process_t self = SIMIX_process_self();
2017 /* Go to that function to follow the code flow through the simcall barrier */
2018 if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
2019 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2021 self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
2022 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2023 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2024 self->simcall.args[0].dp = (void*) mutex;
2025 if (self != simix_global->maestro_process) {
2026 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2027 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2028 SIMIX_process_yield(self);
2030 SIMIX_simcall_handle(&self->simcall, 0);
2032 return self->simcall.result.i;
2035 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
2036 smx_process_t self = SIMIX_process_self();
2038 /* Go to that function to follow the code flow through the simcall barrier */
2039 if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
2040 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2042 self->simcall.call = SIMCALL_MUTEX_UNLOCK;
2043 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2044 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2045 self->simcall.args[0].dp = (void*) mutex;
2046 if (self != simix_global->maestro_process) {
2047 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2048 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2049 SIMIX_process_yield(self);
2051 SIMIX_simcall_handle(&self->simcall, 0);
2056 inline static smx_cond_t simcall_BODY_cond_init() {
2057 smx_process_t self = SIMIX_process_self();
2059 /* Go to that function to follow the code flow through the simcall barrier */
2060 if (0) SIMIX_cond_init();
2061 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2063 self->simcall.call = SIMCALL_COND_INIT;
2064 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2065 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2067 if (self != simix_global->maestro_process) {
2068 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2069 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2070 SIMIX_process_yield(self);
2072 SIMIX_simcall_handle(&self->simcall, 0);
2074 return self->simcall.result.dp;
2077 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
2078 smx_process_t self = SIMIX_process_self();
2080 /* Go to that function to follow the code flow through the simcall barrier */
2081 if (0) SIMIX_cond_destroy(cond);
2082 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2084 self->simcall.call = SIMCALL_COND_DESTROY;
2085 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2086 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2087 self->simcall.args[0].dp = (void*) cond;
2088 if (self != simix_global->maestro_process) {
2089 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2090 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2091 SIMIX_process_yield(self);
2093 SIMIX_simcall_handle(&self->simcall, 0);
2098 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
2099 smx_process_t self = SIMIX_process_self();
2101 /* Go to that function to follow the code flow through the simcall barrier */
2102 if (0) SIMIX_cond_signal(cond);
2103 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2105 self->simcall.call = SIMCALL_COND_SIGNAL;
2106 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2107 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2108 self->simcall.args[0].dp = (void*) cond;
2109 if (self != simix_global->maestro_process) {
2110 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2111 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2112 SIMIX_process_yield(self);
2114 SIMIX_simcall_handle(&self->simcall, 0);
2119 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
2120 smx_process_t self = SIMIX_process_self();
2122 /* Go to that function to follow the code flow through the simcall barrier */
2123 if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
2124 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2126 self->simcall.call = SIMCALL_COND_WAIT;
2127 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2128 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2129 self->simcall.args[0].dp = (void*) cond;
2130 self->simcall.args[1].dp = (void*) mutex;
2131 if (self != simix_global->maestro_process) {
2132 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2133 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2134 SIMIX_process_yield(self);
2136 SIMIX_simcall_handle(&self->simcall, 0);
2141 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
2142 smx_process_t self = SIMIX_process_self();
2144 /* Go to that function to follow the code flow through the simcall barrier */
2145 if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
2146 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2148 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
2149 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2150 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2151 self->simcall.args[0].dp = (void*) cond;
2152 self->simcall.args[1].dp = (void*) mutex;
2153 self->simcall.args[2].d = (double) timeout;
2154 if (self != simix_global->maestro_process) {
2155 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2156 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2157 SIMIX_process_yield(self);
2159 SIMIX_simcall_handle(&self->simcall, 0);
2164 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
2165 smx_process_t self = SIMIX_process_self();
2167 /* Go to that function to follow the code flow through the simcall barrier */
2168 if (0) SIMIX_cond_broadcast(cond);
2169 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2171 self->simcall.call = SIMCALL_COND_BROADCAST;
2172 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2173 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2174 self->simcall.args[0].dp = (void*) cond;
2175 if (self != simix_global->maestro_process) {
2176 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2177 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2178 SIMIX_process_yield(self);
2180 SIMIX_simcall_handle(&self->simcall, 0);
2185 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
2186 smx_process_t self = SIMIX_process_self();
2188 /* Go to that function to follow the code flow through the simcall barrier */
2189 if (0) SIMIX_sem_init(capacity);
2190 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2192 self->simcall.call = SIMCALL_SEM_INIT;
2193 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2194 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2195 self->simcall.args[0].ui = (unsigned int) capacity;
2196 if (self != simix_global->maestro_process) {
2197 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2198 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2199 SIMIX_process_yield(self);
2201 SIMIX_simcall_handle(&self->simcall, 0);
2203 return self->simcall.result.dp;
2206 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2207 smx_process_t self = SIMIX_process_self();
2209 /* Go to that function to follow the code flow through the simcall barrier */
2210 if (0) SIMIX_sem_destroy(sem);
2211 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2213 self->simcall.call = SIMCALL_SEM_DESTROY;
2214 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2215 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2216 self->simcall.args[0].dp = (void*) sem;
2217 if (self != simix_global->maestro_process) {
2218 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2219 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2220 SIMIX_process_yield(self);
2222 SIMIX_simcall_handle(&self->simcall, 0);
2227 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2228 smx_process_t self = SIMIX_process_self();
2230 /* Go to that function to follow the code flow through the simcall barrier */
2231 if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
2232 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2234 self->simcall.call = SIMCALL_SEM_RELEASE;
2235 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2236 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2237 self->simcall.args[0].dp = (void*) sem;
2238 if (self != simix_global->maestro_process) {
2239 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2240 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2241 SIMIX_process_yield(self);
2243 SIMIX_simcall_handle(&self->simcall, 0);
2248 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2249 smx_process_t self = SIMIX_process_self();
2251 /* Go to that function to follow the code flow through the simcall barrier */
2252 if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
2253 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2255 self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2256 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2257 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2258 self->simcall.args[0].dp = (void*) sem;
2259 if (self != simix_global->maestro_process) {
2260 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2261 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2262 SIMIX_process_yield(self);
2264 SIMIX_simcall_handle(&self->simcall, 0);
2266 return self->simcall.result.i;
2269 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2270 smx_process_t self = SIMIX_process_self();
2272 /* Go to that function to follow the code flow through the simcall barrier */
2273 if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
2274 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2276 self->simcall.call = SIMCALL_SEM_ACQUIRE;
2277 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2278 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2279 self->simcall.args[0].dp = (void*) sem;
2280 if (self != simix_global->maestro_process) {
2281 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2282 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2283 SIMIX_process_yield(self);
2285 SIMIX_simcall_handle(&self->simcall, 0);
2290 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2291 smx_process_t self = SIMIX_process_self();
2293 /* Go to that function to follow the code flow through the simcall barrier */
2294 if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
2295 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2297 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2298 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2299 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2300 self->simcall.args[0].dp = (void*) sem;
2301 self->simcall.args[1].d = (double) timeout;
2302 if (self != simix_global->maestro_process) {
2303 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2304 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2305 SIMIX_process_yield(self);
2307 SIMIX_simcall_handle(&self->simcall, 0);
2312 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2313 smx_process_t self = SIMIX_process_self();
2315 /* Go to that function to follow the code flow through the simcall barrier */
2316 if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
2317 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2319 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2320 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2321 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2322 self->simcall.args[0].dp = (void*) sem;
2323 if (self != simix_global->maestro_process) {
2324 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2325 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2326 SIMIX_process_yield(self);
2328 SIMIX_simcall_handle(&self->simcall, 0);
2330 return self->simcall.result.i;
2333 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
2334 smx_process_t self = SIMIX_process_self();
2336 /* Go to that function to follow the code flow through the simcall barrier */
2337 if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
2338 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2340 self->simcall.call = SIMCALL_FILE_READ;
2341 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2342 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2343 self->simcall.args[0].dp = (void*) fd;
2344 self->simcall.args[1].sgsz = (sg_size_t) size;
2345 self->simcall.args[2].dp = (void*) host;
2346 if (self != simix_global->maestro_process) {
2347 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2348 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2349 SIMIX_process_yield(self);
2351 SIMIX_simcall_handle(&self->simcall, 0);
2353 return self->simcall.result.sgsz;
2356 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
2357 smx_process_t self = SIMIX_process_self();
2359 /* Go to that function to follow the code flow through the simcall barrier */
2360 if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
2361 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2363 self->simcall.call = SIMCALL_FILE_WRITE;
2364 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2365 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2366 self->simcall.args[0].dp = (void*) fd;
2367 self->simcall.args[1].sgsz = (sg_size_t) size;
2368 self->simcall.args[2].dp = (void*) host;
2369 if (self != simix_global->maestro_process) {
2370 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2371 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2372 SIMIX_process_yield(self);
2374 SIMIX_simcall_handle(&self->simcall, 0);
2376 return self->simcall.result.sgsz;
2379 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
2380 smx_process_t self = SIMIX_process_self();
2382 /* Go to that function to follow the code flow through the simcall barrier */
2383 if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
2384 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2386 self->simcall.call = SIMCALL_FILE_OPEN;
2387 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2388 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2389 self->simcall.args[0].cc = (const char*) fullpath;
2390 self->simcall.args[1].dp = (void*) host;
2391 if (self != simix_global->maestro_process) {
2392 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2393 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2394 SIMIX_process_yield(self);
2396 SIMIX_simcall_handle(&self->simcall, 0);
2398 return self->simcall.result.dp;
2401 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
2402 smx_process_t self = SIMIX_process_self();
2404 /* Go to that function to follow the code flow through the simcall barrier */
2405 if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
2406 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2408 self->simcall.call = SIMCALL_FILE_CLOSE;
2409 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2410 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2411 self->simcall.args[0].dp = (void*) fd;
2412 self->simcall.args[1].dp = (void*) host;
2413 if (self != simix_global->maestro_process) {
2414 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2415 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2416 SIMIX_process_yield(self);
2418 SIMIX_simcall_handle(&self->simcall, 0);
2420 return self->simcall.result.i;
2423 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
2424 smx_process_t self = SIMIX_process_self();
2426 /* Go to that function to follow the code flow through the simcall barrier */
2427 if (0) SIMIX_file_unlink(fd, host);
2428 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2430 self->simcall.call = SIMCALL_FILE_UNLINK;
2431 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2432 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2433 self->simcall.args[0].dp = (void*) fd;
2434 self->simcall.args[1].dp = (void*) host;
2435 if (self != simix_global->maestro_process) {
2436 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2437 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2438 SIMIX_process_yield(self);
2440 SIMIX_simcall_handle(&self->simcall, 0);
2442 return self->simcall.result.i;
2445 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2446 smx_process_t self = SIMIX_process_self();
2448 /* Go to that function to follow the code flow through the simcall barrier */
2449 if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
2450 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2452 self->simcall.call = SIMCALL_FILE_GET_SIZE;
2453 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2454 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2455 self->simcall.args[0].dp = (void*) fd;
2456 if (self != simix_global->maestro_process) {
2457 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2458 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2459 SIMIX_process_yield(self);
2461 SIMIX_simcall_handle(&self->simcall, 0);
2463 return self->simcall.result.sgsz;
2466 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2467 smx_process_t self = SIMIX_process_self();
2469 /* Go to that function to follow the code flow through the simcall barrier */
2470 if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
2471 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2473 self->simcall.call = SIMCALL_FILE_TELL;
2474 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2475 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2476 self->simcall.args[0].dp = (void*) fd;
2477 if (self != simix_global->maestro_process) {
2478 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2479 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2480 SIMIX_process_yield(self);
2482 SIMIX_simcall_handle(&self->simcall, 0);
2484 return self->simcall.result.sgsz;
2487 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2488 smx_process_t self = SIMIX_process_self();
2490 /* Go to that function to follow the code flow through the simcall barrier */
2491 if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
2492 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2494 self->simcall.call = SIMCALL_FILE_SEEK;
2495 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2496 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2497 self->simcall.args[0].dp = (void*) fd;
2498 self->simcall.args[1].sgoff = (sg_offset_t) offset;
2499 self->simcall.args[2].i = (int) origin;
2500 if (self != simix_global->maestro_process) {
2501 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2502 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2503 SIMIX_process_yield(self);
2505 SIMIX_simcall_handle(&self->simcall, 0);
2507 return self->simcall.result.i;
2510 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2511 smx_process_t self = SIMIX_process_self();
2513 /* Go to that function to follow the code flow through the simcall barrier */
2514 if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
2515 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2517 self->simcall.call = SIMCALL_FILE_GET_INFO;
2518 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2519 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2520 self->simcall.args[0].dp = (void*) fd;
2521 if (self != simix_global->maestro_process) {
2522 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2523 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2524 SIMIX_process_yield(self);
2526 SIMIX_simcall_handle(&self->simcall, 0);
2528 return self->simcall.result.dp;
2531 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2532 smx_process_t self = SIMIX_process_self();
2534 /* Go to that function to follow the code flow through the simcall barrier */
2535 if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
2536 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2538 self->simcall.call = SIMCALL_FILE_MOVE;
2539 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2540 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2541 self->simcall.args[0].dp = (void*) fd;
2542 self->simcall.args[1].cc = (const char*) fullpath;
2543 if (self != simix_global->maestro_process) {
2544 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2545 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2546 SIMIX_process_yield(self);
2548 SIMIX_simcall_handle(&self->simcall, 0);
2550 return self->simcall.result.i;
2553 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2554 smx_process_t self = SIMIX_process_self();
2556 /* Go to that function to follow the code flow through the simcall barrier */
2557 if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
2558 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2560 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2561 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2562 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2563 self->simcall.args[0].dp = (void*) storage;
2564 if (self != simix_global->maestro_process) {
2565 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2566 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2567 SIMIX_process_yield(self);
2569 SIMIX_simcall_handle(&self->simcall, 0);
2571 return self->simcall.result.sgsz;
2574 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2575 smx_process_t self = SIMIX_process_self();
2577 /* Go to that function to follow the code flow through the simcall barrier */
2578 if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
2579 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2581 self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2582 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2583 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2584 self->simcall.args[0].dp = (void*) name;
2585 if (self != simix_global->maestro_process) {
2586 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2587 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2588 SIMIX_process_yield(self);
2590 SIMIX_simcall_handle(&self->simcall, 0);
2592 return self->simcall.result.sgsz;
2595 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2596 smx_process_t self = SIMIX_process_self();
2598 /* Go to that function to follow the code flow through the simcall barrier */
2599 if (0) SIMIX_storage_get_properties(storage);
2600 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2602 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2603 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2604 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2605 self->simcall.args[0].dp = (void*) storage;
2606 if (self != simix_global->maestro_process) {
2607 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2608 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2609 SIMIX_process_yield(self);
2611 SIMIX_simcall_handle(&self->simcall, 0);
2613 return self->simcall.result.dp;
2616 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2617 smx_process_t self = SIMIX_process_self();
2619 /* Go to that function to follow the code flow through the simcall barrier */
2620 if (0) SIMIX_storage_get_content(storage);
2621 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2623 self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2624 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2625 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2626 self->simcall.args[0].dp = (void*) storage;
2627 if (self != simix_global->maestro_process) {
2628 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2629 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2630 SIMIX_process_yield(self);
2632 SIMIX_simcall_handle(&self->simcall, 0);
2634 return self->simcall.result.dp;
2637 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2638 smx_process_t self = SIMIX_process_self();
2640 /* Go to that function to follow the code flow through the simcall barrier */
2641 if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
2642 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2644 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2645 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2646 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2647 self->simcall.args[0].cc = (const char*) name;
2648 if (self != simix_global->maestro_process) {
2649 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2650 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2651 SIMIX_process_yield(self);
2653 SIMIX_simcall_handle(&self->simcall, 0);
2655 return self->simcall.result.dp;
2658 inline static int simcall_BODY_mc_random(int min, int max) {
2659 smx_process_t self = SIMIX_process_self();
2661 /* Go to that function to follow the code flow through the simcall barrier */
2662 if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
2663 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2665 self->simcall.call = SIMCALL_MC_RANDOM;
2666 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2667 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2668 self->simcall.args[0].i = (int) min;
2669 self->simcall.args[1].i = (int) max;
2670 if (self != simix_global->maestro_process) {
2671 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2672 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2673 SIMIX_process_yield(self);
2675 SIMIX_simcall_handle(&self->simcall, 0);
2677 return self->simcall.result.i;
2680 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
2681 smx_process_t self = SIMIX_process_self();
2683 /* Go to that function to follow the code flow through the simcall barrier */
2684 if (0) SIMIX_set_category(synchro, category);
2685 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2687 self->simcall.call = SIMCALL_SET_CATEGORY;
2688 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2689 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2690 self->simcall.args[0].dp = (void*) synchro;
2691 self->simcall.args[1].cc = (const char*) category;
2692 if (self != simix_global->maestro_process) {
2693 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2694 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2695 SIMIX_process_yield(self);
2697 SIMIX_simcall_handle(&self->simcall, 0);
2701 #ifdef HAVE_LATENCY_BOUND_TRACKING
2703 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
2704 smx_process_t self = SIMIX_process_self();
2706 /* Go to that function to follow the code flow through the simcall barrier */
2707 if (0) SIMIX_comm_is_latency_bounded(comm);
2708 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2710 self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2711 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2712 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2713 self->simcall.args[0].dp = (void*) comm;
2714 if (self != simix_global->maestro_process) {
2715 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2716 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2717 SIMIX_process_yield(self);
2719 SIMIX_simcall_handle(&self->simcall, 0);
2721 return self->simcall.result.i;
2727 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
2728 smx_process_t self = SIMIX_process_self();
2730 /* Go to that function to follow the code flow through the simcall barrier */
2731 if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
2732 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2734 self->simcall.call = SIMCALL_MC_SNAPSHOT;
2735 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2736 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2738 if (self != simix_global->maestro_process) {
2739 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2740 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2741 SIMIX_process_yield(self);
2743 SIMIX_simcall_handle(&self->simcall, 0);
2745 return self->simcall.result.dp;
2748 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
2749 smx_process_t self = SIMIX_process_self();
2751 /* Go to that function to follow the code flow through the simcall barrier */
2752 if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
2753 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2755 self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2756 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2757 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2758 self->simcall.args[0].dp = (void*) s1;
2759 self->simcall.args[1].dp = (void*) s2;
2760 if (self != simix_global->maestro_process) {
2761 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2762 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2763 SIMIX_process_yield(self);
2765 SIMIX_simcall_handle(&self->simcall, 0);
2767 return self->simcall.result.i;