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 "src/mc/mc_forward.h"
20 inline static void simcall_BODY_host_on(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_on(host);
25 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
27 self->simcall.call = SIMCALL_HOST_ON;
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);
41 inline static void simcall_BODY_host_off(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) simcall_HANDLER_host_off(&self->simcall, host);
46 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
48 self->simcall.call = SIMCALL_HOST_OFF;
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 xbt_dict_t simcall_BODY_host_get_properties(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) SIMIX_host_get_properties(host);
67 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
69 self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
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);
80 return self->simcall.result.dp;
83 inline static int simcall_BODY_host_get_core(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_core(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_CORE;
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.i;
104 inline static xbt_swag_t simcall_BODY_host_get_process_list(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_process_list(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_PROCESS_LIST;
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.dp;
125 inline static double simcall_BODY_host_get_speed(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_speed(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_SPEED;
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.d;
146 inline static double simcall_BODY_host_get_available_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_available_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_AVAILABLE_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 int simcall_BODY_host_get_state(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_state(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_STATE;
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.i;
188 inline static double simcall_BODY_host_get_current_power_peak(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_current_power_peak(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_CURRENT_POWER_PEAK;
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.d;
209 inline static double simcall_BODY_host_get_power_peak_at(sg_host_t host, int pstate_index) {
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_power_peak_at(host, pstate_index);
214 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
216 self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
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 self->simcall.args[1].i = (int) pstate_index;
221 if (self != simix_global->maestro_process) {
222 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
223 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
224 SIMIX_process_yield(self);
226 SIMIX_simcall_handle(&self->simcall, 0);
228 return self->simcall.result.d;
231 inline static int simcall_BODY_host_get_nb_pstates(sg_host_t host) {
232 smx_process_t self = SIMIX_process_self();
234 /* Go to that function to follow the code flow through the simcall barrier */
235 if (0) SIMIX_host_get_nb_pstates(host);
236 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
238 self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
239 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
240 memset(self->simcall.args, 0, sizeof(self->simcall.args));
241 self->simcall.args[0].dp = (void*) host;
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.i;
252 inline static double simcall_BODY_host_get_wattmin_at(sg_host_t host, int pstate_index) {
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_wattmin_at(host, pstate_index);
257 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
259 self->simcall.call = SIMCALL_HOST_GET_WATTMIN_AT;
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 self->simcall.args[1].i = (int) pstate_index;
264 if (self != simix_global->maestro_process) {
265 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
266 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
267 SIMIX_process_yield(self);
269 SIMIX_simcall_handle(&self->simcall, 0);
271 return self->simcall.result.d;
274 inline static double simcall_BODY_host_get_wattmax_at(sg_host_t host, int pstate_index) {
275 smx_process_t self = SIMIX_process_self();
277 /* Go to that function to follow the code flow through the simcall barrier */
278 if (0) SIMIX_host_get_wattmax_at(host, pstate_index);
279 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
281 self->simcall.call = SIMCALL_HOST_GET_WATTMAX_AT;
282 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
283 memset(self->simcall.args, 0, sizeof(self->simcall.args));
284 self->simcall.args[0].dp = (void*) host;
285 self->simcall.args[1].i = (int) pstate_index;
286 if (self != simix_global->maestro_process) {
287 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
288 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
289 SIMIX_process_yield(self);
291 SIMIX_simcall_handle(&self->simcall, 0);
293 return self->simcall.result.d;
296 inline static void simcall_BODY_host_set_pstate(sg_host_t host, int pstate_index) {
297 smx_process_t self = SIMIX_process_self();
299 /* Go to that function to follow the code flow through the simcall barrier */
300 if (0) SIMIX_host_set_pstate(host, pstate_index);
301 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
303 self->simcall.call = SIMCALL_HOST_SET_PSTATE;
304 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
305 memset(self->simcall.args, 0, sizeof(self->simcall.args));
306 self->simcall.args[0].dp = (void*) host;
307 self->simcall.args[1].i = (int) pstate_index;
308 if (self != simix_global->maestro_process) {
309 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
310 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
311 SIMIX_process_yield(self);
313 SIMIX_simcall_handle(&self->simcall, 0);
318 inline static int simcall_BODY_host_get_pstate(sg_host_t host) {
319 smx_process_t self = SIMIX_process_self();
321 /* Go to that function to follow the code flow through the simcall barrier */
322 if (0) SIMIX_host_get_pstate(host);
323 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
325 self->simcall.call = SIMCALL_HOST_GET_PSTATE;
326 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
327 memset(self->simcall.args, 0, sizeof(self->simcall.args));
328 self->simcall.args[0].dp = (void*) host;
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);
336 return self->simcall.result.i;
339 inline static double simcall_BODY_host_get_consumed_energy(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_consumed_energy(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_CONSUMED_ENERGY;
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.d;
360 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(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_mounted_storage_list(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_MOUNTED_STORAGE_LIST;
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.dp;
381 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(sg_host_t host) {
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_get_attached_storage_list(host);
386 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
388 self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
389 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
390 memset(self->simcall.args, 0, sizeof(self->simcall.args));
391 self->simcall.args[0].dp = (void*) host;
392 if (self != simix_global->maestro_process) {
393 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
394 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
395 SIMIX_process_yield(self);
397 SIMIX_simcall_handle(&self->simcall, 0);
399 return self->simcall.result.dp;
402 inline static void simcall_BODY_host_get_params(sg_host_t ind_vm, vm_params_t params) {
403 smx_process_t self = SIMIX_process_self();
405 /* Go to that function to follow the code flow through the simcall barrier */
406 if (0) SIMIX_host_get_params(ind_vm, params);
407 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
409 self->simcall.call = SIMCALL_HOST_GET_PARAMS;
410 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
411 memset(self->simcall.args, 0, sizeof(self->simcall.args));
412 self->simcall.args[0].dp = (void*) ind_vm;
413 self->simcall.args[1].dp = (void*) params;
414 if (self != simix_global->maestro_process) {
415 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
416 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
417 SIMIX_process_yield(self);
419 SIMIX_simcall_handle(&self->simcall, 0);
424 inline static void simcall_BODY_host_set_params(sg_host_t ind_vm, vm_params_t params) {
425 smx_process_t self = SIMIX_process_self();
427 /* Go to that function to follow the code flow through the simcall barrier */
428 if (0) SIMIX_host_set_params(ind_vm, params);
429 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
431 self->simcall.call = SIMCALL_HOST_SET_PARAMS;
432 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
433 memset(self->simcall.args, 0, sizeof(self->simcall.args));
434 self->simcall.args[0].dp = (void*) ind_vm;
435 self->simcall.args[1].dp = (void*) params;
436 if (self != simix_global->maestro_process) {
437 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
438 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
439 SIMIX_process_yield(self);
441 SIMIX_simcall_handle(&self->simcall, 0);
446 inline static sg_host_t simcall_BODY_vm_create(const char* name, sg_host_t ind_pm) {
447 smx_process_t self = SIMIX_process_self();
449 /* Go to that function to follow the code flow through the simcall barrier */
450 if (0) SIMIX_vm_create(name, ind_pm);
451 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
453 self->simcall.call = SIMCALL_VM_CREATE;
454 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
455 memset(self->simcall.args, 0, sizeof(self->simcall.args));
456 self->simcall.args[0].cc = (const char*) name;
457 self->simcall.args[1].dp = (void*) ind_pm;
458 if (self != simix_global->maestro_process) {
459 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
460 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
461 SIMIX_process_yield(self);
463 SIMIX_simcall_handle(&self->simcall, 0);
465 return self->simcall.result.dp;
468 inline static void simcall_BODY_vm_start(sg_host_t ind_vm) {
469 smx_process_t self = SIMIX_process_self();
471 /* Go to that function to follow the code flow through the simcall barrier */
472 if (0) SIMIX_vm_start(ind_vm);
473 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
475 self->simcall.call = SIMCALL_VM_START;
476 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
477 memset(self->simcall.args, 0, sizeof(self->simcall.args));
478 self->simcall.args[0].dp = (void*) ind_vm;
479 if (self != simix_global->maestro_process) {
480 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
481 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
482 SIMIX_process_yield(self);
484 SIMIX_simcall_handle(&self->simcall, 0);
489 inline static int simcall_BODY_vm_get_state(sg_host_t ind_vm) {
490 smx_process_t self = SIMIX_process_self();
492 /* Go to that function to follow the code flow through the simcall barrier */
493 if (0) SIMIX_vm_get_state(ind_vm);
494 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
496 self->simcall.call = SIMCALL_VM_GET_STATE;
497 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
498 memset(self->simcall.args, 0, sizeof(self->simcall.args));
499 self->simcall.args[0].dp = (void*) ind_vm;
500 if (self != simix_global->maestro_process) {
501 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
502 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
503 SIMIX_process_yield(self);
505 SIMIX_simcall_handle(&self->simcall, 0);
507 return self->simcall.result.i;
510 inline static void simcall_BODY_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) {
511 smx_process_t self = SIMIX_process_self();
513 /* Go to that function to follow the code flow through the simcall barrier */
514 if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
515 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
517 self->simcall.call = SIMCALL_VM_MIGRATE;
518 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
519 memset(self->simcall.args, 0, sizeof(self->simcall.args));
520 self->simcall.args[0].dp = (void*) ind_vm;
521 self->simcall.args[1].dp = (void*) ind_dst_pm;
522 if (self != simix_global->maestro_process) {
523 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
524 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
525 SIMIX_process_yield(self);
527 SIMIX_simcall_handle(&self->simcall, 0);
532 inline static void* simcall_BODY_vm_get_pm(sg_host_t ind_vm) {
533 smx_process_t self = SIMIX_process_self();
535 /* Go to that function to follow the code flow through the simcall barrier */
536 if (0) SIMIX_vm_get_pm(ind_vm);
537 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
539 self->simcall.call = SIMCALL_VM_GET_PM;
540 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
541 memset(self->simcall.args, 0, sizeof(self->simcall.args));
542 self->simcall.args[0].dp = (void*) ind_vm;
543 if (self != simix_global->maestro_process) {
544 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
545 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
546 SIMIX_process_yield(self);
548 SIMIX_simcall_handle(&self->simcall, 0);
550 return self->simcall.result.dp;
553 inline static void simcall_BODY_vm_set_bound(sg_host_t ind_vm, double bound) {
554 smx_process_t self = SIMIX_process_self();
556 /* Go to that function to follow the code flow through the simcall barrier */
557 if (0) SIMIX_vm_set_bound(ind_vm, bound);
558 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
560 self->simcall.call = SIMCALL_VM_SET_BOUND;
561 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
562 memset(self->simcall.args, 0, sizeof(self->simcall.args));
563 self->simcall.args[0].dp = (void*) ind_vm;
564 self->simcall.args[1].d = (double) bound;
565 if (self != simix_global->maestro_process) {
566 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
567 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
568 SIMIX_process_yield(self);
570 SIMIX_simcall_handle(&self->simcall, 0);
575 inline static void simcall_BODY_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) {
576 smx_process_t self = SIMIX_process_self();
578 /* Go to that function to follow the code flow through the simcall barrier */
579 if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
580 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
582 self->simcall.call = SIMCALL_VM_SET_AFFINITY;
583 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
584 memset(self->simcall.args, 0, sizeof(self->simcall.args));
585 self->simcall.args[0].dp = (void*) ind_vm;
586 self->simcall.args[1].dp = (void*) ind_pm;
587 self->simcall.args[2].ul = (unsigned long) mask;
588 if (self != simix_global->maestro_process) {
589 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
590 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
591 SIMIX_process_yield(self);
593 SIMIX_simcall_handle(&self->simcall, 0);
598 inline static void simcall_BODY_vm_destroy(sg_host_t ind_vm) {
599 smx_process_t self = SIMIX_process_self();
601 /* Go to that function to follow the code flow through the simcall barrier */
602 if (0) SIMIX_vm_destroy(ind_vm);
603 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
605 self->simcall.call = SIMCALL_VM_DESTROY;
606 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
607 memset(self->simcall.args, 0, sizeof(self->simcall.args));
608 self->simcall.args[0].dp = (void*) ind_vm;
609 if (self != simix_global->maestro_process) {
610 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
611 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
612 SIMIX_process_yield(self);
614 SIMIX_simcall_handle(&self->simcall, 0);
619 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
620 smx_process_t self = SIMIX_process_self();
622 /* Go to that function to follow the code flow through the simcall barrier */
623 if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
624 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
626 self->simcall.call = SIMCALL_VM_SUSPEND;
627 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
628 memset(self->simcall.args, 0, sizeof(self->simcall.args));
629 self->simcall.args[0].dp = (void*) ind_vm;
630 if (self != simix_global->maestro_process) {
631 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
632 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
633 SIMIX_process_yield(self);
635 SIMIX_simcall_handle(&self->simcall, 0);
640 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
641 smx_process_t self = SIMIX_process_self();
643 /* Go to that function to follow the code flow through the simcall barrier */
644 if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
645 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
647 self->simcall.call = SIMCALL_VM_RESUME;
648 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
649 memset(self->simcall.args, 0, sizeof(self->simcall.args));
650 self->simcall.args[0].dp = (void*) ind_vm;
651 if (self != simix_global->maestro_process) {
652 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
653 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
654 SIMIX_process_yield(self);
656 SIMIX_simcall_handle(&self->simcall, 0);
661 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
662 smx_process_t self = SIMIX_process_self();
664 /* Go to that function to follow the code flow through the simcall barrier */
665 if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
666 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
668 self->simcall.call = SIMCALL_VM_SHUTDOWN;
669 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
670 memset(self->simcall.args, 0, sizeof(self->simcall.args));
671 self->simcall.args[0].dp = (void*) ind_vm;
672 if (self != simix_global->maestro_process) {
673 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
674 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
675 SIMIX_process_yield(self);
677 SIMIX_simcall_handle(&self->simcall, 0);
682 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
683 smx_process_t self = SIMIX_process_self();
685 /* Go to that function to follow the code flow through the simcall barrier */
686 if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
687 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
689 self->simcall.call = SIMCALL_VM_SAVE;
690 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
691 memset(self->simcall.args, 0, sizeof(self->simcall.args));
692 self->simcall.args[0].dp = (void*) ind_vm;
693 if (self != simix_global->maestro_process) {
694 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
695 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
696 SIMIX_process_yield(self);
698 SIMIX_simcall_handle(&self->simcall, 0);
703 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
704 smx_process_t self = SIMIX_process_self();
706 /* Go to that function to follow the code flow through the simcall barrier */
707 if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
708 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
710 self->simcall.call = SIMCALL_VM_RESTORE;
711 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
712 memset(self->simcall.args, 0, sizeof(self->simcall.args));
713 self->simcall.args[0].dp = (void*) ind_vm;
714 if (self != simix_global->maestro_process) {
715 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
716 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
717 SIMIX_process_yield(self);
719 SIMIX_simcall_handle(&self->simcall, 0);
724 inline static void simcall_BODY_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) {
725 smx_process_t self = SIMIX_process_self();
727 /* Go to that function to follow the code flow through the simcall barrier */
728 if (0) SIMIX_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
729 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
731 self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO;
732 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
733 memset(self->simcall.args, 0, sizeof(self->simcall.args));
734 self->simcall.args[0].dp = (void*) vm;
735 self->simcall.args[1].dp = (void*) src_pm;
736 self->simcall.args[2].dp = (void*) dst_pm;
737 if (self != simix_global->maestro_process) {
738 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
739 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
740 SIMIX_process_yield(self);
742 SIMIX_simcall_handle(&self->simcall, 0);
747 inline static void* simcall_BODY_process_create(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) {
748 smx_process_t self = SIMIX_process_self();
750 /* Go to that function to follow the code flow through the simcall barrier */
751 if (0) simcall_HANDLER_process_create(&self->simcall, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
752 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
754 self->simcall.call = SIMCALL_PROCESS_CREATE;
755 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
756 memset(self->simcall.args, 0, sizeof(self->simcall.args));
757 self->simcall.args[0].cc = (const char*) name;
758 self->simcall.args[1].fp = (FPtr) code;
759 self->simcall.args[2].dp = (void*) data;
760 self->simcall.args[3].cc = (const char*) hostname;
761 self->simcall.args[4].d = (double) kill_time;
762 self->simcall.args[5].i = (int) argc;
763 self->simcall.args[6].dp = (void*) argv;
764 self->simcall.args[7].dp = (void*) properties;
765 self->simcall.args[8].i = (int) auto_restart;
766 if (self != simix_global->maestro_process) {
767 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
768 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
769 SIMIX_process_yield(self);
771 SIMIX_simcall_handle(&self->simcall, 0);
773 return self->simcall.result.dp;
776 inline static void simcall_BODY_process_kill(smx_process_t process) {
777 smx_process_t self = SIMIX_process_self();
779 /* Go to that function to follow the code flow through the simcall barrier */
780 if (0) simcall_HANDLER_process_kill(&self->simcall, process);
781 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
783 self->simcall.call = SIMCALL_PROCESS_KILL;
784 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
785 memset(self->simcall.args, 0, sizeof(self->simcall.args));
786 self->simcall.args[0].dp = (void*) process;
787 if (self != simix_global->maestro_process) {
788 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
789 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
790 SIMIX_process_yield(self);
792 SIMIX_simcall_handle(&self->simcall, 0);
797 inline static void simcall_BODY_process_killall(int reset_pid) {
798 smx_process_t self = SIMIX_process_self();
800 /* Go to that function to follow the code flow through the simcall barrier */
801 if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
802 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
804 self->simcall.call = SIMCALL_PROCESS_KILLALL;
805 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
806 memset(self->simcall.args, 0, sizeof(self->simcall.args));
807 self->simcall.args[0].i = (int) reset_pid;
808 if (self != simix_global->maestro_process) {
809 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
810 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
811 SIMIX_process_yield(self);
813 SIMIX_simcall_handle(&self->simcall, 0);
818 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
819 smx_process_t self = SIMIX_process_self();
821 /* Go to that function to follow the code flow through the simcall barrier */
822 if (0) SIMIX_process_cleanup(process);
823 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
825 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
826 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
827 memset(self->simcall.args, 0, sizeof(self->simcall.args));
828 self->simcall.args[0].dp = (void*) process;
829 if (self != simix_global->maestro_process) {
830 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
831 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
832 SIMIX_process_yield(self);
834 SIMIX_simcall_handle(&self->simcall, 0);
839 inline static void simcall_BODY_process_suspend(smx_process_t process) {
840 smx_process_t self = SIMIX_process_self();
842 /* Go to that function to follow the code flow through the simcall barrier */
843 if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
844 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
846 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
847 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
848 memset(self->simcall.args, 0, sizeof(self->simcall.args));
849 self->simcall.args[0].dp = (void*) process;
850 if (self != simix_global->maestro_process) {
851 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
852 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
853 SIMIX_process_yield(self);
855 SIMIX_simcall_handle(&self->simcall, 0);
860 inline static void simcall_BODY_process_resume(smx_process_t process) {
861 smx_process_t self = SIMIX_process_self();
863 /* Go to that function to follow the code flow through the simcall barrier */
864 if (0) simcall_HANDLER_process_resume(&self->simcall, process);
865 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
867 self->simcall.call = SIMCALL_PROCESS_RESUME;
868 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
869 memset(self->simcall.args, 0, sizeof(self->simcall.args));
870 self->simcall.args[0].dp = (void*) process;
871 if (self != simix_global->maestro_process) {
872 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
873 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
874 SIMIX_process_yield(self);
876 SIMIX_simcall_handle(&self->simcall, 0);
881 inline static int simcall_BODY_process_count() {
882 smx_process_t self = SIMIX_process_self();
884 /* Go to that function to follow the code flow through the simcall barrier */
885 if (0) SIMIX_process_count();
886 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
888 self->simcall.call = SIMCALL_PROCESS_COUNT;
889 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
890 memset(self->simcall.args, 0, sizeof(self->simcall.args));
892 if (self != simix_global->maestro_process) {
893 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
894 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
895 SIMIX_process_yield(self);
897 SIMIX_simcall_handle(&self->simcall, 0);
899 return self->simcall.result.i;
902 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
903 smx_process_t self = SIMIX_process_self();
905 /* Go to that function to follow the code flow through the simcall barrier */
906 if (0) SIMIX_process_get_PID(process);
907 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
909 self->simcall.call = SIMCALL_PROCESS_GET_PID;
910 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
911 memset(self->simcall.args, 0, sizeof(self->simcall.args));
912 self->simcall.args[0].dp = (void*) process;
913 if (self != simix_global->maestro_process) {
914 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
915 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
916 SIMIX_process_yield(self);
918 SIMIX_simcall_handle(&self->simcall, 0);
920 return self->simcall.result.i;
923 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
924 smx_process_t self = SIMIX_process_self();
926 /* Go to that function to follow the code flow through the simcall barrier */
927 if (0) SIMIX_process_get_PPID(process);
928 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
930 self->simcall.call = SIMCALL_PROCESS_GET_PPID;
931 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
932 memset(self->simcall.args, 0, sizeof(self->simcall.args));
933 self->simcall.args[0].dp = (void*) process;
934 if (self != simix_global->maestro_process) {
935 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
936 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
937 SIMIX_process_yield(self);
939 SIMIX_simcall_handle(&self->simcall, 0);
941 return self->simcall.result.i;
944 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
945 smx_process_t self = SIMIX_process_self();
947 /* Go to that function to follow the code flow through the simcall barrier */
948 if (0) SIMIX_process_get_data(process);
949 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
951 self->simcall.call = SIMCALL_PROCESS_GET_DATA;
952 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
953 memset(self->simcall.args, 0, sizeof(self->simcall.args));
954 self->simcall.args[0].dp = (void*) process;
955 if (self != simix_global->maestro_process) {
956 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
957 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
958 SIMIX_process_yield(self);
960 SIMIX_simcall_handle(&self->simcall, 0);
962 return self->simcall.result.dp;
965 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
966 smx_process_t self = SIMIX_process_self();
968 /* Go to that function to follow the code flow through the simcall barrier */
969 if (0) SIMIX_process_set_data(process, data);
970 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
972 self->simcall.call = SIMCALL_PROCESS_SET_DATA;
973 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
974 memset(self->simcall.args, 0, sizeof(self->simcall.args));
975 self->simcall.args[0].dp = (void*) process;
976 self->simcall.args[1].dp = (void*) data;
977 if (self != simix_global->maestro_process) {
978 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
979 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
980 SIMIX_process_yield(self);
982 SIMIX_simcall_handle(&self->simcall, 0);
987 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
988 smx_process_t self = SIMIX_process_self();
990 /* Go to that function to follow the code flow through the simcall barrier */
991 if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
992 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
994 self->simcall.call = SIMCALL_PROCESS_SET_HOST;
995 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
996 memset(self->simcall.args, 0, sizeof(self->simcall.args));
997 self->simcall.args[0].dp = (void*) process;
998 self->simcall.args[1].dp = (void*) dest;
999 if (self != simix_global->maestro_process) {
1000 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1001 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1002 SIMIX_process_yield(self);
1004 SIMIX_simcall_handle(&self->simcall, 0);
1009 inline static sg_host_t simcall_BODY_process_get_host(smx_process_t process) {
1010 smx_process_t self = SIMIX_process_self();
1012 /* Go to that function to follow the code flow through the simcall barrier */
1013 if (0) SIMIX_process_get_host(process);
1014 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1016 self->simcall.call = SIMCALL_PROCESS_GET_HOST;
1017 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1018 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1019 self->simcall.args[0].dp = (void*) process;
1020 if (self != simix_global->maestro_process) {
1021 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1022 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1023 SIMIX_process_yield(self);
1025 SIMIX_simcall_handle(&self->simcall, 0);
1027 return self->simcall.result.dp;
1030 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
1031 smx_process_t self = SIMIX_process_self();
1033 /* Go to that function to follow the code flow through the simcall barrier */
1034 if (0) SIMIX_process_get_name(process);
1035 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1037 self->simcall.call = SIMCALL_PROCESS_GET_NAME;
1038 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1039 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1040 self->simcall.args[0].dp = (void*) process;
1041 if (self != simix_global->maestro_process) {
1042 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1043 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1044 SIMIX_process_yield(self);
1046 SIMIX_simcall_handle(&self->simcall, 0);
1048 return self->simcall.result.cc;
1051 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
1052 smx_process_t self = SIMIX_process_self();
1054 /* Go to that function to follow the code flow through the simcall barrier */
1055 if (0) SIMIX_process_is_suspended(process);
1056 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1058 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
1059 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1060 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1061 self->simcall.args[0].dp = (void*) process;
1062 if (self != simix_global->maestro_process) {
1063 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1064 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1065 SIMIX_process_yield(self);
1067 SIMIX_simcall_handle(&self->simcall, 0);
1069 return self->simcall.result.i;
1072 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
1073 smx_process_t self = SIMIX_process_self();
1075 /* Go to that function to follow the code flow through the simcall barrier */
1076 if (0) SIMIX_process_get_properties(process);
1077 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1079 self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
1080 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1081 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1082 self->simcall.args[0].dp = (void*) process;
1083 if (self != simix_global->maestro_process) {
1084 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1085 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1086 SIMIX_process_yield(self);
1088 SIMIX_simcall_handle(&self->simcall, 0);
1090 return self->simcall.result.dp;
1093 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
1094 smx_process_t self = SIMIX_process_self();
1096 /* Go to that function to follow the code flow through the simcall barrier */
1097 if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
1098 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1100 self->simcall.call = SIMCALL_PROCESS_JOIN;
1101 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1102 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1103 self->simcall.args[0].dp = (void*) process;
1104 self->simcall.args[1].d = (double) timeout;
1105 if (self != simix_global->maestro_process) {
1106 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1107 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1108 SIMIX_process_yield(self);
1110 SIMIX_simcall_handle(&self->simcall, 0);
1112 return self->simcall.result.i;
1115 inline static int simcall_BODY_process_sleep(double duration) {
1116 smx_process_t self = SIMIX_process_self();
1118 /* Go to that function to follow the code flow through the simcall barrier */
1119 if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
1120 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1122 self->simcall.call = SIMCALL_PROCESS_SLEEP;
1123 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1124 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1125 self->simcall.args[0].d = (double) duration;
1126 if (self != simix_global->maestro_process) {
1127 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1128 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1129 SIMIX_process_yield(self);
1131 SIMIX_simcall_handle(&self->simcall, 0);
1133 return self->simcall.result.i;
1136 inline static smx_synchro_t simcall_BODY_process_execute(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
1137 smx_process_t self = SIMIX_process_self();
1139 /* Go to that function to follow the code flow through the simcall barrier */
1140 if (0) simcall_HANDLER_process_execute(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
1141 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1143 self->simcall.call = SIMCALL_PROCESS_EXECUTE;
1144 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1145 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1146 self->simcall.args[0].cc = (const char*) name;
1147 self->simcall.args[1].d = (double) flops_amount;
1148 self->simcall.args[2].d = (double) priority;
1149 self->simcall.args[3].d = (double) bound;
1150 self->simcall.args[4].ul = (unsigned long) affinity_mask;
1151 if (self != simix_global->maestro_process) {
1152 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1153 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1154 SIMIX_process_yield(self);
1156 SIMIX_simcall_handle(&self->simcall, 0);
1158 return self->simcall.result.dp;
1161 inline static smx_synchro_t simcall_BODY_process_parallel_execute(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
1162 smx_process_t self = SIMIX_process_self();
1164 /* Go to that function to follow the code flow through the simcall barrier */
1165 if (0) SIMIX_process_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
1166 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1168 self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
1169 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1170 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1171 self->simcall.args[0].cc = (const char*) name;
1172 self->simcall.args[1].i = (int) host_nb;
1173 self->simcall.args[2].dp = (void*) host_list;
1174 self->simcall.args[3].dp = (void*) flops_amount;
1175 self->simcall.args[4].dp = (void*) bytes_amount;
1176 self->simcall.args[5].d = (double) amount;
1177 self->simcall.args[6].d = (double) rate;
1178 if (self != simix_global->maestro_process) {
1179 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1180 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1181 SIMIX_process_yield(self);
1183 SIMIX_simcall_handle(&self->simcall, 0);
1185 return self->simcall.result.dp;
1188 inline static void simcall_BODY_process_execution_destroy(smx_synchro_t execution) {
1189 smx_process_t self = SIMIX_process_self();
1191 /* Go to that function to follow the code flow through the simcall barrier */
1192 if (0) SIMIX_process_execution_destroy(execution);
1193 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1195 self->simcall.call = SIMCALL_PROCESS_EXECUTION_DESTROY;
1196 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1197 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1198 self->simcall.args[0].dp = (void*) execution;
1199 if (self != simix_global->maestro_process) {
1200 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1201 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1202 SIMIX_process_yield(self);
1204 SIMIX_simcall_handle(&self->simcall, 0);
1209 inline static void simcall_BODY_process_execution_cancel(smx_synchro_t execution) {
1210 smx_process_t self = SIMIX_process_self();
1212 /* Go to that function to follow the code flow through the simcall barrier */
1213 if (0) SIMIX_process_execution_cancel(execution);
1214 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1216 self->simcall.call = SIMCALL_PROCESS_EXECUTION_CANCEL;
1217 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1218 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1219 self->simcall.args[0].dp = (void*) execution;
1220 if (self != simix_global->maestro_process) {
1221 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1222 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1223 SIMIX_process_yield(self);
1225 SIMIX_simcall_handle(&self->simcall, 0);
1230 inline static double simcall_BODY_process_execution_get_remains(smx_synchro_t execution) {
1231 smx_process_t self = SIMIX_process_self();
1233 /* Go to that function to follow the code flow through the simcall barrier */
1234 if (0) SIMIX_process_execution_get_remains(execution);
1235 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1237 self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_REMAINS;
1238 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1239 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1240 self->simcall.args[0].dp = (void*) execution;
1241 if (self != simix_global->maestro_process) {
1242 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1243 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1244 SIMIX_process_yield(self);
1246 SIMIX_simcall_handle(&self->simcall, 0);
1248 return self->simcall.result.d;
1251 inline static e_smx_state_t simcall_BODY_process_execution_get_state(smx_synchro_t execution) {
1252 smx_process_t self = SIMIX_process_self();
1254 /* Go to that function to follow the code flow through the simcall barrier */
1255 if (0) SIMIX_process_execution_get_state(execution);
1256 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1258 self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_STATE;
1259 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1260 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1261 self->simcall.args[0].dp = (void*) execution;
1262 if (self != simix_global->maestro_process) {
1263 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1264 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1265 SIMIX_process_yield(self);
1267 SIMIX_simcall_handle(&self->simcall, 0);
1269 return self->simcall.result.i;
1272 inline static void simcall_BODY_process_execution_set_priority(smx_synchro_t execution, double priority) {
1273 smx_process_t self = SIMIX_process_self();
1275 /* Go to that function to follow the code flow through the simcall barrier */
1276 if (0) SIMIX_process_execution_set_priority(execution, priority);
1277 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1279 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_PRIORITY;
1280 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1281 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1282 self->simcall.args[0].dp = (void*) execution;
1283 self->simcall.args[1].d = (double) priority;
1284 if (self != simix_global->maestro_process) {
1285 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1286 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1287 SIMIX_process_yield(self);
1289 SIMIX_simcall_handle(&self->simcall, 0);
1294 inline static void simcall_BODY_process_execution_set_bound(smx_synchro_t execution, double bound) {
1295 smx_process_t self = SIMIX_process_self();
1297 /* Go to that function to follow the code flow through the simcall barrier */
1298 if (0) SIMIX_process_execution_set_bound(execution, bound);
1299 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1301 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_BOUND;
1302 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1303 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1304 self->simcall.args[0].dp = (void*) execution;
1305 self->simcall.args[1].d = (double) bound;
1306 if (self != simix_global->maestro_process) {
1307 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1308 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1309 SIMIX_process_yield(self);
1311 SIMIX_simcall_handle(&self->simcall, 0);
1316 inline static void simcall_BODY_process_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
1317 smx_process_t self = SIMIX_process_self();
1319 /* Go to that function to follow the code flow through the simcall barrier */
1320 if (0) SIMIX_process_execution_set_affinity(execution, ws, mask);
1321 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1323 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_AFFINITY;
1324 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1325 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1326 self->simcall.args[0].dp = (void*) execution;
1327 self->simcall.args[1].dp = (void*) ws;
1328 self->simcall.args[2].ul = (unsigned long) mask;
1329 if (self != simix_global->maestro_process) {
1330 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1331 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1332 SIMIX_process_yield(self);
1334 SIMIX_simcall_handle(&self->simcall, 0);
1339 inline static int simcall_BODY_process_execution_wait(smx_synchro_t execution) {
1340 smx_process_t self = SIMIX_process_self();
1342 /* Go to that function to follow the code flow through the simcall barrier */
1343 if (0) simcall_HANDLER_process_execution_wait(&self->simcall, execution);
1344 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1346 self->simcall.call = SIMCALL_PROCESS_EXECUTION_WAIT;
1347 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1348 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1349 self->simcall.args[0].dp = (void*) execution;
1350 if (self != simix_global->maestro_process) {
1351 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1352 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1353 SIMIX_process_yield(self);
1355 SIMIX_simcall_handle(&self->simcall, 0);
1357 return self->simcall.result.i;
1360 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1361 smx_process_t self = SIMIX_process_self();
1363 /* Go to that function to follow the code flow through the simcall barrier */
1364 if (0) SIMIX_process_on_exit(process, fun, data);
1365 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1367 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1368 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1369 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1370 self->simcall.args[0].dp = (void*) process;
1371 self->simcall.args[1].fp = (FPtr) fun;
1372 self->simcall.args[2].dp = (void*) data;
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);
1383 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
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_auto_restart_set(process, auto_restart);
1388 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1390 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
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].i = (int) auto_restart;
1395 if (self != simix_global->maestro_process) {
1396 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1397 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1398 SIMIX_process_yield(self);
1400 SIMIX_simcall_handle(&self->simcall, 0);
1405 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1406 smx_process_t self = SIMIX_process_self();
1408 /* Go to that function to follow the code flow through the simcall barrier */
1409 if (0) simcall_HANDLER_process_restart(&self->simcall, process);
1410 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1412 self->simcall.call = SIMCALL_PROCESS_RESTART;
1413 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1414 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1415 self->simcall.args[0].dp = (void*) process;
1416 if (self != simix_global->maestro_process) {
1417 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1418 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1419 SIMIX_process_yield(self);
1421 SIMIX_simcall_handle(&self->simcall, 0);
1423 return self->simcall.result.dp;
1426 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1427 smx_process_t self = SIMIX_process_self();
1429 /* Go to that function to follow the code flow through the simcall barrier */
1430 if (0) SIMIX_rdv_create(name);
1431 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1433 self->simcall.call = SIMCALL_RDV_CREATE;
1434 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1435 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1436 self->simcall.args[0].cc = (const char*) name;
1437 if (self != simix_global->maestro_process) {
1438 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1439 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1440 SIMIX_process_yield(self);
1442 SIMIX_simcall_handle(&self->simcall, 0);
1444 return self->simcall.result.dp;
1447 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1448 smx_process_t self = SIMIX_process_self();
1450 /* Go to that function to follow the code flow through the simcall barrier */
1451 if (0) SIMIX_rdv_destroy(rdv);
1452 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1454 self->simcall.call = SIMCALL_RDV_DESTROY;
1455 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1456 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1457 self->simcall.args[0].dp = (void*) rdv;
1458 if (self != simix_global->maestro_process) {
1459 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1460 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1461 SIMIX_process_yield(self);
1463 SIMIX_simcall_handle(&self->simcall, 0);
1468 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) {
1469 smx_process_t self = SIMIX_process_self();
1471 /* Go to that function to follow the code flow through the simcall barrier */
1472 if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
1473 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1475 self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1476 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1477 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1478 self->simcall.args[0].dp = (void*) rdv;
1479 self->simcall.args[1].dp = (void*) host;
1480 if (self != simix_global->maestro_process) {
1481 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1482 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1483 SIMIX_process_yield(self);
1485 SIMIX_simcall_handle(&self->simcall, 0);
1487 return self->simcall.result.ui;
1490 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1491 smx_process_t self = SIMIX_process_self();
1493 /* Go to that function to follow the code flow through the simcall barrier */
1494 if (0) SIMIX_rdv_get_head(rdv);
1495 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1497 self->simcall.call = SIMCALL_RDV_GET_HEAD;
1498 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1499 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1500 self->simcall.args[0].dp = (void*) rdv;
1501 if (self != simix_global->maestro_process) {
1502 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1503 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1504 SIMIX_process_yield(self);
1506 SIMIX_simcall_handle(&self->simcall, 0);
1508 return self->simcall.result.dp;
1511 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1512 smx_process_t self = SIMIX_process_self();
1514 /* Go to that function to follow the code flow through the simcall barrier */
1515 if (0) SIMIX_rdv_set_receiver(rdv, receiver);
1516 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1518 self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1519 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1520 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1521 self->simcall.args[0].dp = (void*) rdv;
1522 self->simcall.args[1].dp = (void*) receiver;
1523 if (self != simix_global->maestro_process) {
1524 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1525 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1526 SIMIX_process_yield(self);
1528 SIMIX_simcall_handle(&self->simcall, 0);
1533 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1534 smx_process_t self = SIMIX_process_self();
1536 /* Go to that function to follow the code flow through the simcall barrier */
1537 if (0) SIMIX_rdv_get_receiver(rdv);
1538 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1540 self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1541 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1542 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1543 self->simcall.args[0].dp = (void*) rdv;
1544 if (self != simix_global->maestro_process) {
1545 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1546 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1547 SIMIX_process_yield(self);
1549 SIMIX_simcall_handle(&self->simcall, 0);
1551 return self->simcall.result.dp;
1554 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) {
1555 smx_process_t self = SIMIX_process_self();
1557 /* Go to that function to follow the code flow through the simcall barrier */
1558 if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1559 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1561 self->simcall.call = SIMCALL_COMM_IPROBE;
1562 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1563 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1564 self->simcall.args[0].dp = (void*) rdv;
1565 self->simcall.args[1].i = (int) type;
1566 self->simcall.args[2].i = (int) src;
1567 self->simcall.args[3].i = (int) tag;
1568 self->simcall.args[4].fp = (FPtr) match_fun;
1569 self->simcall.args[5].dp = (void*) data;
1570 if (self != simix_global->maestro_process) {
1571 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1572 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1573 SIMIX_process_yield(self);
1575 SIMIX_simcall_handle(&self->simcall, 0);
1577 return self->simcall.result.dp;
1580 inline static void simcall_BODY_comm_send(smx_process_t sender, 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) {
1581 smx_process_t self = SIMIX_process_self();
1583 /* Go to that function to follow the code flow through the simcall barrier */
1584 if (0) simcall_HANDLER_comm_send(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
1585 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1587 self->simcall.call = SIMCALL_COMM_SEND;
1588 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1589 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1590 self->simcall.args[0].dp = (void*) sender;
1591 self->simcall.args[1].dp = (void*) rdv;
1592 self->simcall.args[2].d = (double) task_size;
1593 self->simcall.args[3].d = (double) rate;
1594 self->simcall.args[4].dp = (void*) src_buff;
1595 self->simcall.args[5].sz = (size_t) src_buff_size;
1596 self->simcall.args[6].fp = (FPtr) match_fun;
1597 self->simcall.args[7].fp = (FPtr) copy_data_fun;
1598 self->simcall.args[8].dp = (void*) data;
1599 self->simcall.args[9].d = (double) timeout;
1600 if (self != simix_global->maestro_process) {
1601 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1602 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1603 SIMIX_process_yield(self);
1605 SIMIX_simcall_handle(&self->simcall, 0);
1610 inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t sender, 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) {
1611 smx_process_t self = SIMIX_process_self();
1613 /* Go to that function to follow the code flow through the simcall barrier */
1614 if (0) simcall_HANDLER_comm_isend(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
1615 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1617 self->simcall.call = SIMCALL_COMM_ISEND;
1618 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1619 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1620 self->simcall.args[0].dp = (void*) sender;
1621 self->simcall.args[1].dp = (void*) rdv;
1622 self->simcall.args[2].d = (double) task_size;
1623 self->simcall.args[3].d = (double) rate;
1624 self->simcall.args[4].dp = (void*) src_buff;
1625 self->simcall.args[5].sz = (size_t) src_buff_size;
1626 self->simcall.args[6].fp = (FPtr) match_fun;
1627 self->simcall.args[7].fp = (FPtr) clean_fun;
1628 self->simcall.args[8].fp = (FPtr) copy_data_fun;
1629 self->simcall.args[9].dp = (void*) data;
1630 self->simcall.args[10].i = (int) detached;
1631 if (self != simix_global->maestro_process) {
1632 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1633 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1634 SIMIX_process_yield(self);
1636 SIMIX_simcall_handle(&self->simcall, 0);
1638 return self->simcall.result.dp;
1641 inline static void simcall_BODY_comm_recv(smx_process_t receiver, 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) {
1642 smx_process_t self = SIMIX_process_self();
1644 /* Go to that function to follow the code flow through the simcall barrier */
1645 if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1646 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1648 self->simcall.call = SIMCALL_COMM_RECV;
1649 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1650 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1651 self->simcall.args[0].dp = (void*) receiver;
1652 self->simcall.args[1].dp = (void*) rdv;
1653 self->simcall.args[2].dp = (void*) dst_buff;
1654 self->simcall.args[3].dp = (void*) dst_buff_size;
1655 self->simcall.args[4].fp = (FPtr) match_fun;
1656 self->simcall.args[5].fp = (FPtr) copy_data_fun;
1657 self->simcall.args[6].dp = (void*) data;
1658 self->simcall.args[7].d = (double) timeout;
1659 self->simcall.args[8].d = (double) rate;
1660 if (self != simix_global->maestro_process) {
1661 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1662 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1663 SIMIX_process_yield(self);
1665 SIMIX_simcall_handle(&self->simcall, 0);
1670 inline static smx_synchro_t simcall_BODY_comm_irecv(smx_process_t receiver, 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) {
1671 smx_process_t self = SIMIX_process_self();
1673 /* Go to that function to follow the code flow through the simcall barrier */
1674 if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1675 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1677 self->simcall.call = SIMCALL_COMM_IRECV;
1678 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1679 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1680 self->simcall.args[0].dp = (void*) receiver;
1681 self->simcall.args[1].dp = (void*) rdv;
1682 self->simcall.args[2].dp = (void*) dst_buff;
1683 self->simcall.args[3].dp = (void*) dst_buff_size;
1684 self->simcall.args[4].fp = (FPtr) match_fun;
1685 self->simcall.args[5].fp = (FPtr) copy_data_fun;
1686 self->simcall.args[6].dp = (void*) data;
1687 self->simcall.args[7].d = (double) rate;
1688 if (self != simix_global->maestro_process) {
1689 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1690 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1691 SIMIX_process_yield(self);
1693 SIMIX_simcall_handle(&self->simcall, 0);
1695 return self->simcall.result.dp;
1698 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
1699 smx_process_t self = SIMIX_process_self();
1701 /* Go to that function to follow the code flow through the simcall barrier */
1702 if (0) SIMIX_comm_cancel(comm);
1703 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1705 self->simcall.call = SIMCALL_COMM_CANCEL;
1706 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1707 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1708 self->simcall.args[0].dp = (void*) comm;
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);
1719 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
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) simcall_HANDLER_comm_waitany(&self->simcall, comms);
1724 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1726 self->simcall.call = SIMCALL_COMM_WAITANY;
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*) comms;
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);
1737 return self->simcall.result.i;
1740 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
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_wait(&self->simcall, comm, timeout);
1745 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1747 self->simcall.call = SIMCALL_COMM_WAIT;
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*) comm;
1751 self->simcall.args[1].d = (double) timeout;
1752 if (self != simix_global->maestro_process) {
1753 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1754 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1755 SIMIX_process_yield(self);
1757 SIMIX_simcall_handle(&self->simcall, 0);
1762 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
1763 smx_process_t self = SIMIX_process_self();
1765 /* Go to that function to follow the code flow through the simcall barrier */
1766 if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
1767 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1769 self->simcall.call = SIMCALL_COMM_TEST;
1770 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1771 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1772 self->simcall.args[0].dp = (void*) comm;
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);
1780 return self->simcall.result.i;
1783 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
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_testany(&self->simcall, comms);
1788 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1790 self->simcall.call = SIMCALL_COMM_TESTANY;
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*) comms;
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 double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
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) SIMIX_comm_get_remains(comm);
1809 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1811 self->simcall.call = SIMCALL_COMM_GET_REMAINS;
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*) comm;
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.d;
1825 inline static e_smx_state_t simcall_BODY_comm_get_state(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_state(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_STATE;
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.i;
1846 inline static void* simcall_BODY_comm_get_src_data(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_src_data(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_SRC_DATA;
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.dp;
1867 inline static void* simcall_BODY_comm_get_dst_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_dst_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_DST_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 smx_process_t simcall_BODY_comm_get_src_proc(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_src_proc(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_SRC_PROC;
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_dst_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_dst_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_DST_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_mutex_t simcall_BODY_mutex_init() {
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) simcall_HANDLER_mutex_init(&self->simcall);
1935 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1937 self->simcall.call = SIMCALL_MUTEX_INIT;
1938 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1939 memset(self->simcall.args, 0, sizeof(self->simcall.args));
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 void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
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) SIMIX_mutex_destroy(mutex);
1956 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1958 self->simcall.call = SIMCALL_MUTEX_DESTROY;
1959 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1960 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1961 self->simcall.args[0].dp = (void*) mutex;
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);
1972 inline static void simcall_BODY_mutex_lock(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) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1977 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1979 self->simcall.call = SIMCALL_MUTEX_LOCK;
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 int simcall_BODY_mutex_trylock(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_trylock(&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_TRYLOCK;
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);
2011 return self->simcall.result.i;
2014 inline static void simcall_BODY_mutex_unlock(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_unlock(&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_UNLOCK;
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);
2035 inline static smx_cond_t simcall_BODY_cond_init() {
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) SIMIX_cond_init();
2040 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2042 self->simcall.call = SIMCALL_COND_INIT;
2043 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2044 memset(self->simcall.args, 0, sizeof(self->simcall.args));
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);
2053 return self->simcall.result.dp;
2056 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
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_destroy(cond);
2061 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2063 self->simcall.call = SIMCALL_COND_DESTROY;
2064 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2065 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2066 self->simcall.args[0].dp = (void*) cond;
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);
2077 inline static void simcall_BODY_cond_signal(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_signal(cond);
2082 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2084 self->simcall.call = SIMCALL_COND_SIGNAL;
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_wait(smx_cond_t cond, smx_mutex_t mutex) {
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) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
2103 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2105 self->simcall.call = SIMCALL_COND_WAIT;
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 self->simcall.args[1].dp = (void*) mutex;
2110 if (self != simix_global->maestro_process) {
2111 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2112 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2113 SIMIX_process_yield(self);
2115 SIMIX_simcall_handle(&self->simcall, 0);
2120 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
2121 smx_process_t self = SIMIX_process_self();
2123 /* Go to that function to follow the code flow through the simcall barrier */
2124 if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
2125 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2127 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
2128 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2129 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2130 self->simcall.args[0].dp = (void*) cond;
2131 self->simcall.args[1].dp = (void*) mutex;
2132 self->simcall.args[2].d = (double) timeout;
2133 if (self != simix_global->maestro_process) {
2134 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2135 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2136 SIMIX_process_yield(self);
2138 SIMIX_simcall_handle(&self->simcall, 0);
2143 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
2144 smx_process_t self = SIMIX_process_self();
2146 /* Go to that function to follow the code flow through the simcall barrier */
2147 if (0) SIMIX_cond_broadcast(cond);
2148 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2150 self->simcall.call = SIMCALL_COND_BROADCAST;
2151 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2152 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2153 self->simcall.args[0].dp = (void*) cond;
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 smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
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_sem_init(capacity);
2169 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2171 self->simcall.call = SIMCALL_SEM_INIT;
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].ui = (unsigned int) capacity;
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);
2182 return self->simcall.result.dp;
2185 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
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_destroy(sem);
2190 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2192 self->simcall.call = SIMCALL_SEM_DESTROY;
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].dp = (void*) sem;
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);
2206 inline static void simcall_BODY_sem_release(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) simcall_HANDLER_sem_release(&self->simcall, sem);
2211 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2213 self->simcall.call = SIMCALL_SEM_RELEASE;
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 int simcall_BODY_sem_would_block(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_would_block(&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_WOULD_BLOCK;
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);
2245 return self->simcall.result.i;
2248 inline static void simcall_BODY_sem_acquire(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_acquire(&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_ACQUIRE;
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);
2269 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
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_timeout(&self->simcall, sem, timeout);
2274 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2276 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
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 self->simcall.args[1].d = (double) timeout;
2281 if (self != simix_global->maestro_process) {
2282 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2283 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2284 SIMIX_process_yield(self);
2286 SIMIX_simcall_handle(&self->simcall, 0);
2291 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2292 smx_process_t self = SIMIX_process_self();
2294 /* Go to that function to follow the code flow through the simcall barrier */
2295 if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
2296 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2298 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2299 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2300 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2301 self->simcall.args[0].dp = (void*) sem;
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);
2309 return self->simcall.result.i;
2312 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
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_file_read(&self->simcall, fd, size, host);
2317 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2319 self->simcall.call = SIMCALL_FILE_READ;
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*) fd;
2323 self->simcall.args[1].sgsz = (sg_size_t) size;
2324 self->simcall.args[2].dp = (void*) host;
2325 if (self != simix_global->maestro_process) {
2326 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2327 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2328 SIMIX_process_yield(self);
2330 SIMIX_simcall_handle(&self->simcall, 0);
2332 return self->simcall.result.sgsz;
2335 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
2336 smx_process_t self = SIMIX_process_self();
2338 /* Go to that function to follow the code flow through the simcall barrier */
2339 if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
2340 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2342 self->simcall.call = SIMCALL_FILE_WRITE;
2343 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2344 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2345 self->simcall.args[0].dp = (void*) fd;
2346 self->simcall.args[1].sgsz = (sg_size_t) size;
2347 self->simcall.args[2].dp = (void*) host;
2348 if (self != simix_global->maestro_process) {
2349 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2350 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2351 SIMIX_process_yield(self);
2353 SIMIX_simcall_handle(&self->simcall, 0);
2355 return self->simcall.result.sgsz;
2358 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
2359 smx_process_t self = SIMIX_process_self();
2361 /* Go to that function to follow the code flow through the simcall barrier */
2362 if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
2363 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2365 self->simcall.call = SIMCALL_FILE_OPEN;
2366 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2367 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2368 self->simcall.args[0].cc = (const char*) fullpath;
2369 self->simcall.args[1].dp = (void*) host;
2370 if (self != simix_global->maestro_process) {
2371 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2372 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2373 SIMIX_process_yield(self);
2375 SIMIX_simcall_handle(&self->simcall, 0);
2377 return self->simcall.result.dp;
2380 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
2381 smx_process_t self = SIMIX_process_self();
2383 /* Go to that function to follow the code flow through the simcall barrier */
2384 if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
2385 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2387 self->simcall.call = SIMCALL_FILE_CLOSE;
2388 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2389 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2390 self->simcall.args[0].dp = (void*) fd;
2391 self->simcall.args[1].dp = (void*) host;
2392 if (self != simix_global->maestro_process) {
2393 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2394 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2395 SIMIX_process_yield(self);
2397 SIMIX_simcall_handle(&self->simcall, 0);
2399 return self->simcall.result.i;
2402 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
2403 smx_process_t self = SIMIX_process_self();
2405 /* Go to that function to follow the code flow through the simcall barrier */
2406 if (0) SIMIX_file_unlink(fd, host);
2407 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2409 self->simcall.call = SIMCALL_FILE_UNLINK;
2410 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2411 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2412 self->simcall.args[0].dp = (void*) fd;
2413 self->simcall.args[1].dp = (void*) host;
2414 if (self != simix_global->maestro_process) {
2415 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2416 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2417 SIMIX_process_yield(self);
2419 SIMIX_simcall_handle(&self->simcall, 0);
2421 return self->simcall.result.i;
2424 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2425 smx_process_t self = SIMIX_process_self();
2427 /* Go to that function to follow the code flow through the simcall barrier */
2428 if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
2429 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2431 self->simcall.call = SIMCALL_FILE_GET_SIZE;
2432 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2433 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2434 self->simcall.args[0].dp = (void*) fd;
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.sgsz;
2445 inline static sg_size_t simcall_BODY_file_tell(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_tell(&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_TELL;
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 int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
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_seek(&self->simcall, fd, offset, origin);
2471 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2473 self->simcall.call = SIMCALL_FILE_SEEK;
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 self->simcall.args[1].sgoff = (sg_offset_t) offset;
2478 self->simcall.args[2].i = (int) origin;
2479 if (self != simix_global->maestro_process) {
2480 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2481 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2482 SIMIX_process_yield(self);
2484 SIMIX_simcall_handle(&self->simcall, 0);
2486 return self->simcall.result.i;
2489 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2490 smx_process_t self = SIMIX_process_self();
2492 /* Go to that function to follow the code flow through the simcall barrier */
2493 if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
2494 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2496 self->simcall.call = SIMCALL_FILE_GET_INFO;
2497 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2498 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2499 self->simcall.args[0].dp = (void*) fd;
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.dp;
2510 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
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_move(&self->simcall, fd, fullpath);
2515 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2517 self->simcall.call = SIMCALL_FILE_MOVE;
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 self->simcall.args[1].cc = (const char*) fullpath;
2522 if (self != simix_global->maestro_process) {
2523 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2524 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2525 SIMIX_process_yield(self);
2527 SIMIX_simcall_handle(&self->simcall, 0);
2529 return self->simcall.result.i;
2532 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2533 smx_process_t self = SIMIX_process_self();
2535 /* Go to that function to follow the code flow through the simcall barrier */
2536 if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
2537 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2539 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2540 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2541 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2542 self->simcall.args[0].dp = (void*) storage;
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.sgsz;
2553 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
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_used_size(&self->simcall, name);
2558 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2560 self->simcall.call = SIMCALL_STORAGE_GET_USED_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*) name;
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 xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
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) SIMIX_storage_get_properties(storage);
2579 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2581 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
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*) storage;
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.dp;
2595 inline static xbt_dict_t simcall_BODY_storage_get_content(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_content(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_CONTENT;
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_asr_get_properties(const char* name) {
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) simcall_HANDLER_asr_get_properties(&self->simcall, name);
2621 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2623 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
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].cc = (const char*) name;
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 int simcall_BODY_mc_random(int min, int max) {
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_mc_random(&self->simcall, min, max);
2642 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2644 self->simcall.call = SIMCALL_MC_RANDOM;
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].i = (int) min;
2648 self->simcall.args[1].i = (int) max;
2649 if (self != simix_global->maestro_process) {
2650 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2651 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2652 SIMIX_process_yield(self);
2654 SIMIX_simcall_handle(&self->simcall, 0);
2656 return self->simcall.result.i;
2659 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
2660 smx_process_t self = SIMIX_process_self();
2662 /* Go to that function to follow the code flow through the simcall barrier */
2663 if (0) SIMIX_set_category(synchro, category);
2664 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2666 self->simcall.call = SIMCALL_SET_CATEGORY;
2667 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2668 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2669 self->simcall.args[0].dp = (void*) synchro;
2670 self->simcall.args[1].cc = (const char*) category;
2671 if (self != simix_global->maestro_process) {
2672 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2673 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2674 SIMIX_process_yield(self);
2676 SIMIX_simcall_handle(&self->simcall, 0);
2680 #ifdef HAVE_LATENCY_BOUND_TRACKING
2682 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
2683 smx_process_t self = SIMIX_process_self();
2685 /* Go to that function to follow the code flow through the simcall barrier */
2686 if (0) SIMIX_comm_is_latency_bounded(comm);
2687 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2689 self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2690 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2691 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2692 self->simcall.args[0].dp = (void*) comm;
2693 if (self != simix_global->maestro_process) {
2694 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2695 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2696 SIMIX_process_yield(self);
2698 SIMIX_simcall_handle(&self->simcall, 0);
2700 return self->simcall.result.i;
2706 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
2707 smx_process_t self = SIMIX_process_self();
2709 /* Go to that function to follow the code flow through the simcall barrier */
2710 if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
2711 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2713 self->simcall.call = SIMCALL_MC_SNAPSHOT;
2714 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2715 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2717 if (self != simix_global->maestro_process) {
2718 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2719 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2720 SIMIX_process_yield(self);
2722 SIMIX_simcall_handle(&self->simcall, 0);
2724 return self->simcall.result.dp;
2727 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
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_compare_snapshots(&self->simcall, s1, s2);
2732 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2734 self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2735 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2736 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2737 self->simcall.args[0].dp = (void*) s1;
2738 self->simcall.args[1].dp = (void*) s2;
2739 if (self != simix_global->maestro_process) {
2740 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2741 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2742 SIMIX_process_yield(self);
2744 SIMIX_simcall_handle(&self->simcall, 0);
2746 return self->simcall.result.i;