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"
19 #include <simgrid/simix.hpp>
21 inline static void simcall_BODY_host_on(sg_host_t host) {
22 smx_process_t self = SIMIX_process_self();
24 /* Go to that function to follow the code flow through the simcall barrier */
25 if (0) SIMIX_host_on(host);
26 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
28 self->simcall.call = SIMCALL_HOST_ON;
29 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
30 memset(self->simcall.args, 0, sizeof(self->simcall.args));
31 self->simcall.args[0].dp = (void*) host;
32 if (self != simix_global->maestro_process) {
33 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
34 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
35 SIMIX_process_yield(self);
37 SIMIX_simcall_handle(&self->simcall, 0);
42 inline static void simcall_BODY_host_off(sg_host_t host) {
43 smx_process_t self = SIMIX_process_self();
45 /* Go to that function to follow the code flow through the simcall barrier */
46 if (0) simcall_HANDLER_host_off(&self->simcall, host);
47 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
49 self->simcall.call = SIMCALL_HOST_OFF;
50 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
51 memset(self->simcall.args, 0, sizeof(self->simcall.args));
52 self->simcall.args[0].dp = (void*) host;
53 if (self != simix_global->maestro_process) {
54 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
55 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
56 SIMIX_process_yield(self);
58 SIMIX_simcall_handle(&self->simcall, 0);
63 inline static xbt_dict_t simcall_BODY_host_get_properties(sg_host_t host) {
64 smx_process_t self = SIMIX_process_self();
66 /* Go to that function to follow the code flow through the simcall barrier */
67 if (0) SIMIX_host_get_properties(host);
68 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
70 self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
71 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
72 memset(self->simcall.args, 0, sizeof(self->simcall.args));
73 self->simcall.args[0].dp = (void*) host;
74 if (self != simix_global->maestro_process) {
75 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
76 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
77 SIMIX_process_yield(self);
79 SIMIX_simcall_handle(&self->simcall, 0);
81 return (xbt_dict_t) self->simcall.result.dp;
84 inline static xbt_swag_t simcall_BODY_host_get_process_list(sg_host_t host) {
85 smx_process_t self = SIMIX_process_self();
87 /* Go to that function to follow the code flow through the simcall barrier */
88 if (0) SIMIX_host_get_process_list(host);
89 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
91 self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
92 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
93 memset(self->simcall.args, 0, sizeof(self->simcall.args));
94 self->simcall.args[0].dp = (void*) host;
95 if (self != simix_global->maestro_process) {
96 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
97 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
98 SIMIX_process_yield(self);
100 SIMIX_simcall_handle(&self->simcall, 0);
102 return (xbt_swag_t) self->simcall.result.dp;
105 inline static double simcall_BODY_host_get_current_power_peak(sg_host_t host) {
106 smx_process_t self = SIMIX_process_self();
108 /* Go to that function to follow the code flow through the simcall barrier */
109 if (0) SIMIX_host_get_current_power_peak(host);
110 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
112 self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
113 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
114 memset(self->simcall.args, 0, sizeof(self->simcall.args));
115 self->simcall.args[0].dp = (void*) host;
116 if (self != simix_global->maestro_process) {
117 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
118 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
119 SIMIX_process_yield(self);
121 SIMIX_simcall_handle(&self->simcall, 0);
123 return (double) self->simcall.result.d;
126 inline static double simcall_BODY_host_get_power_peak_at(sg_host_t host, int pstate_index) {
127 smx_process_t self = SIMIX_process_self();
129 /* Go to that function to follow the code flow through the simcall barrier */
130 if (0) SIMIX_host_get_power_peak_at(host, pstate_index);
131 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
133 self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
134 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
135 memset(self->simcall.args, 0, sizeof(self->simcall.args));
136 self->simcall.args[0].dp = (void*) host;
137 self->simcall.args[1].i = (int) pstate_index;
138 if (self != simix_global->maestro_process) {
139 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
140 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
141 SIMIX_process_yield(self);
143 SIMIX_simcall_handle(&self->simcall, 0);
145 return (double) self->simcall.result.d;
148 inline static double simcall_BODY_host_get_wattmin_at(sg_host_t host, int pstate_index) {
149 smx_process_t self = SIMIX_process_self();
151 /* Go to that function to follow the code flow through the simcall barrier */
152 if (0) SIMIX_host_get_wattmin_at(host, pstate_index);
153 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
155 self->simcall.call = SIMCALL_HOST_GET_WATTMIN_AT;
156 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
157 memset(self->simcall.args, 0, sizeof(self->simcall.args));
158 self->simcall.args[0].dp = (void*) host;
159 self->simcall.args[1].i = (int) pstate_index;
160 if (self != simix_global->maestro_process) {
161 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
162 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
163 SIMIX_process_yield(self);
165 SIMIX_simcall_handle(&self->simcall, 0);
167 return (double) self->simcall.result.d;
170 inline static double simcall_BODY_host_get_wattmax_at(sg_host_t host, int pstate_index) {
171 smx_process_t self = SIMIX_process_self();
173 /* Go to that function to follow the code flow through the simcall barrier */
174 if (0) SIMIX_host_get_wattmax_at(host, pstate_index);
175 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
177 self->simcall.call = SIMCALL_HOST_GET_WATTMAX_AT;
178 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
179 memset(self->simcall.args, 0, sizeof(self->simcall.args));
180 self->simcall.args[0].dp = (void*) host;
181 self->simcall.args[1].i = (int) pstate_index;
182 if (self != simix_global->maestro_process) {
183 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
184 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
185 SIMIX_process_yield(self);
187 SIMIX_simcall_handle(&self->simcall, 0);
189 return (double) self->simcall.result.d;
192 inline static void simcall_BODY_host_set_pstate(sg_host_t host, int pstate_index) {
193 smx_process_t self = SIMIX_process_self();
195 /* Go to that function to follow the code flow through the simcall barrier */
196 if (0) SIMIX_host_set_pstate(host, pstate_index);
197 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
199 self->simcall.call = SIMCALL_HOST_SET_PSTATE;
200 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
201 memset(self->simcall.args, 0, sizeof(self->simcall.args));
202 self->simcall.args[0].dp = (void*) host;
203 self->simcall.args[1].i = (int) pstate_index;
204 if (self != simix_global->maestro_process) {
205 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
206 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
207 SIMIX_process_yield(self);
209 SIMIX_simcall_handle(&self->simcall, 0);
214 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(sg_host_t host) {
215 smx_process_t self = SIMIX_process_self();
217 /* Go to that function to follow the code flow through the simcall barrier */
218 if (0) SIMIX_host_get_mounted_storage_list(host);
219 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
221 self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
222 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
223 memset(self->simcall.args, 0, sizeof(self->simcall.args));
224 self->simcall.args[0].dp = (void*) host;
225 if (self != simix_global->maestro_process) {
226 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
227 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
228 SIMIX_process_yield(self);
230 SIMIX_simcall_handle(&self->simcall, 0);
232 return (xbt_dict_t) self->simcall.result.dp;
235 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(sg_host_t host) {
236 smx_process_t self = SIMIX_process_self();
238 /* Go to that function to follow the code flow through the simcall barrier */
239 if (0) SIMIX_host_get_attached_storage_list(host);
240 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
242 self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
243 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
244 memset(self->simcall.args, 0, sizeof(self->simcall.args));
245 self->simcall.args[0].dp = (void*) host;
246 if (self != simix_global->maestro_process) {
247 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
248 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
249 SIMIX_process_yield(self);
251 SIMIX_simcall_handle(&self->simcall, 0);
253 return (xbt_dynar_t) self->simcall.result.dp;
256 inline static void simcall_BODY_host_get_params(sg_host_t ind_vm, vm_params_t params) {
257 smx_process_t self = SIMIX_process_self();
259 /* Go to that function to follow the code flow through the simcall barrier */
260 if (0) SIMIX_host_get_params(ind_vm, params);
261 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
263 self->simcall.call = SIMCALL_HOST_GET_PARAMS;
264 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
265 memset(self->simcall.args, 0, sizeof(self->simcall.args));
266 self->simcall.args[0].dp = (void*) ind_vm;
267 self->simcall.args[1].dp = (void*) params;
268 if (self != simix_global->maestro_process) {
269 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
270 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
271 SIMIX_process_yield(self);
273 SIMIX_simcall_handle(&self->simcall, 0);
278 inline static void simcall_BODY_host_set_params(sg_host_t ind_vm, vm_params_t params) {
279 smx_process_t self = SIMIX_process_self();
281 /* Go to that function to follow the code flow through the simcall barrier */
282 if (0) SIMIX_host_set_params(ind_vm, params);
283 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
285 self->simcall.call = SIMCALL_HOST_SET_PARAMS;
286 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
287 memset(self->simcall.args, 0, sizeof(self->simcall.args));
288 self->simcall.args[0].dp = (void*) ind_vm;
289 self->simcall.args[1].dp = (void*) params;
290 if (self != simix_global->maestro_process) {
291 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
292 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
293 SIMIX_process_yield(self);
295 SIMIX_simcall_handle(&self->simcall, 0);
300 inline static sg_host_t simcall_BODY_vm_create(const char* name, sg_host_t ind_pm) {
301 smx_process_t self = SIMIX_process_self();
303 /* Go to that function to follow the code flow through the simcall barrier */
304 if (0) SIMIX_vm_create(name, ind_pm);
305 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
307 self->simcall.call = SIMCALL_VM_CREATE;
308 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
309 memset(self->simcall.args, 0, sizeof(self->simcall.args));
310 self->simcall.args[0].cc = (const char*) name;
311 self->simcall.args[1].dp = (void*) ind_pm;
312 if (self != simix_global->maestro_process) {
313 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
314 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
315 SIMIX_process_yield(self);
317 SIMIX_simcall_handle(&self->simcall, 0);
319 return (sg_host_t) self->simcall.result.dp;
322 inline static void simcall_BODY_vm_start(sg_host_t ind_vm) {
323 smx_process_t self = SIMIX_process_self();
325 /* Go to that function to follow the code flow through the simcall barrier */
326 if (0) SIMIX_vm_start(ind_vm);
327 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
329 self->simcall.call = SIMCALL_VM_START;
330 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
331 memset(self->simcall.args, 0, sizeof(self->simcall.args));
332 self->simcall.args[0].dp = (void*) ind_vm;
333 if (self != simix_global->maestro_process) {
334 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
335 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
336 SIMIX_process_yield(self);
338 SIMIX_simcall_handle(&self->simcall, 0);
343 inline static int simcall_BODY_vm_get_state(sg_host_t ind_vm) {
344 smx_process_t self = SIMIX_process_self();
346 /* Go to that function to follow the code flow through the simcall barrier */
347 if (0) SIMIX_vm_get_state(ind_vm);
348 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
350 self->simcall.call = SIMCALL_VM_GET_STATE;
351 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
352 memset(self->simcall.args, 0, sizeof(self->simcall.args));
353 self->simcall.args[0].dp = (void*) ind_vm;
354 if (self != simix_global->maestro_process) {
355 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
356 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
357 SIMIX_process_yield(self);
359 SIMIX_simcall_handle(&self->simcall, 0);
361 return (int) self->simcall.result.i;
364 inline static void simcall_BODY_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) {
365 smx_process_t self = SIMIX_process_self();
367 /* Go to that function to follow the code flow through the simcall barrier */
368 if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
369 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
371 self->simcall.call = SIMCALL_VM_MIGRATE;
372 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
373 memset(self->simcall.args, 0, sizeof(self->simcall.args));
374 self->simcall.args[0].dp = (void*) ind_vm;
375 self->simcall.args[1].dp = (void*) ind_dst_pm;
376 if (self != simix_global->maestro_process) {
377 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
378 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
379 SIMIX_process_yield(self);
381 SIMIX_simcall_handle(&self->simcall, 0);
386 inline static void* simcall_BODY_vm_get_pm(sg_host_t ind_vm) {
387 smx_process_t self = SIMIX_process_self();
389 /* Go to that function to follow the code flow through the simcall barrier */
390 if (0) SIMIX_vm_get_pm(ind_vm);
391 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
393 self->simcall.call = SIMCALL_VM_GET_PM;
394 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
395 memset(self->simcall.args, 0, sizeof(self->simcall.args));
396 self->simcall.args[0].dp = (void*) ind_vm;
397 if (self != simix_global->maestro_process) {
398 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
399 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
400 SIMIX_process_yield(self);
402 SIMIX_simcall_handle(&self->simcall, 0);
404 return (void*) self->simcall.result.dp;
407 inline static void simcall_BODY_vm_set_bound(sg_host_t ind_vm, double bound) {
408 smx_process_t self = SIMIX_process_self();
410 /* Go to that function to follow the code flow through the simcall barrier */
411 if (0) SIMIX_vm_set_bound(ind_vm, bound);
412 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
414 self->simcall.call = SIMCALL_VM_SET_BOUND;
415 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
416 memset(self->simcall.args, 0, sizeof(self->simcall.args));
417 self->simcall.args[0].dp = (void*) ind_vm;
418 self->simcall.args[1].d = (double) bound;
419 if (self != simix_global->maestro_process) {
420 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
421 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
422 SIMIX_process_yield(self);
424 SIMIX_simcall_handle(&self->simcall, 0);
429 inline static void simcall_BODY_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) {
430 smx_process_t self = SIMIX_process_self();
432 /* Go to that function to follow the code flow through the simcall barrier */
433 if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
434 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
436 self->simcall.call = SIMCALL_VM_SET_AFFINITY;
437 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
438 memset(self->simcall.args, 0, sizeof(self->simcall.args));
439 self->simcall.args[0].dp = (void*) ind_vm;
440 self->simcall.args[1].dp = (void*) ind_pm;
441 self->simcall.args[2].ul = (unsigned long) mask;
442 if (self != simix_global->maestro_process) {
443 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
444 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
445 SIMIX_process_yield(self);
447 SIMIX_simcall_handle(&self->simcall, 0);
452 inline static void simcall_BODY_vm_destroy(sg_host_t ind_vm) {
453 smx_process_t self = SIMIX_process_self();
455 /* Go to that function to follow the code flow through the simcall barrier */
456 if (0) SIMIX_vm_destroy(ind_vm);
457 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
459 self->simcall.call = SIMCALL_VM_DESTROY;
460 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
461 memset(self->simcall.args, 0, sizeof(self->simcall.args));
462 self->simcall.args[0].dp = (void*) ind_vm;
463 if (self != simix_global->maestro_process) {
464 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
465 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
466 SIMIX_process_yield(self);
468 SIMIX_simcall_handle(&self->simcall, 0);
473 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
474 smx_process_t self = SIMIX_process_self();
476 /* Go to that function to follow the code flow through the simcall barrier */
477 if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
478 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
480 self->simcall.call = SIMCALL_VM_SUSPEND;
481 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
482 memset(self->simcall.args, 0, sizeof(self->simcall.args));
483 self->simcall.args[0].dp = (void*) ind_vm;
484 if (self != simix_global->maestro_process) {
485 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
486 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
487 SIMIX_process_yield(self);
489 SIMIX_simcall_handle(&self->simcall, 0);
494 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
495 smx_process_t self = SIMIX_process_self();
497 /* Go to that function to follow the code flow through the simcall barrier */
498 if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
499 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
501 self->simcall.call = SIMCALL_VM_RESUME;
502 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
503 memset(self->simcall.args, 0, sizeof(self->simcall.args));
504 self->simcall.args[0].dp = (void*) ind_vm;
505 if (self != simix_global->maestro_process) {
506 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
507 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
508 SIMIX_process_yield(self);
510 SIMIX_simcall_handle(&self->simcall, 0);
515 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
516 smx_process_t self = SIMIX_process_self();
518 /* Go to that function to follow the code flow through the simcall barrier */
519 if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
520 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
522 self->simcall.call = SIMCALL_VM_SHUTDOWN;
523 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
524 memset(self->simcall.args, 0, sizeof(self->simcall.args));
525 self->simcall.args[0].dp = (void*) ind_vm;
526 if (self != simix_global->maestro_process) {
527 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
528 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
529 SIMIX_process_yield(self);
531 SIMIX_simcall_handle(&self->simcall, 0);
536 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
537 smx_process_t self = SIMIX_process_self();
539 /* Go to that function to follow the code flow through the simcall barrier */
540 if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
541 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
543 self->simcall.call = SIMCALL_VM_SAVE;
544 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
545 memset(self->simcall.args, 0, sizeof(self->simcall.args));
546 self->simcall.args[0].dp = (void*) ind_vm;
547 if (self != simix_global->maestro_process) {
548 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
549 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
550 SIMIX_process_yield(self);
552 SIMIX_simcall_handle(&self->simcall, 0);
557 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
558 smx_process_t self = SIMIX_process_self();
560 /* Go to that function to follow the code flow through the simcall barrier */
561 if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
562 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
564 self->simcall.call = SIMCALL_VM_RESTORE;
565 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
566 memset(self->simcall.args, 0, sizeof(self->simcall.args));
567 self->simcall.args[0].dp = (void*) ind_vm;
568 if (self != simix_global->maestro_process) {
569 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
570 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
571 SIMIX_process_yield(self);
573 SIMIX_simcall_handle(&self->simcall, 0);
578 inline static void simcall_BODY_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) {
579 smx_process_t self = SIMIX_process_self();
581 /* Go to that function to follow the code flow through the simcall barrier */
582 if (0) SIMIX_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
583 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
585 self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO;
586 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
587 memset(self->simcall.args, 0, sizeof(self->simcall.args));
588 self->simcall.args[0].dp = (void*) vm;
589 self->simcall.args[1].dp = (void*) src_pm;
590 self->simcall.args[2].dp = (void*) dst_pm;
591 if (self != simix_global->maestro_process) {
592 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
593 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
594 SIMIX_process_yield(self);
596 SIMIX_simcall_handle(&self->simcall, 0);
601 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) {
602 smx_process_t self = SIMIX_process_self();
604 /* Go to that function to follow the code flow through the simcall barrier */
605 if (0) simcall_HANDLER_process_create(&self->simcall, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
606 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
608 self->simcall.call = SIMCALL_PROCESS_CREATE;
609 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
610 memset(self->simcall.args, 0, sizeof(self->simcall.args));
611 self->simcall.args[0].cc = (const char*) name;
612 self->simcall.args[1].fp = (FPtr) code;
613 self->simcall.args[2].dp = (void*) data;
614 self->simcall.args[3].cc = (const char*) hostname;
615 self->simcall.args[4].d = (double) kill_time;
616 self->simcall.args[5].i = (int) argc;
617 self->simcall.args[6].dp = (void*) argv;
618 self->simcall.args[7].dp = (void*) properties;
619 self->simcall.args[8].i = (int) auto_restart;
620 if (self != simix_global->maestro_process) {
621 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
622 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
623 SIMIX_process_yield(self);
625 SIMIX_simcall_handle(&self->simcall, 0);
627 return (void*) self->simcall.result.dp;
630 inline static void simcall_BODY_process_kill(smx_process_t process) {
631 smx_process_t self = SIMIX_process_self();
633 /* Go to that function to follow the code flow through the simcall barrier */
634 if (0) simcall_HANDLER_process_kill(&self->simcall, process);
635 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
637 self->simcall.call = SIMCALL_PROCESS_KILL;
638 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
639 memset(self->simcall.args, 0, sizeof(self->simcall.args));
640 self->simcall.args[0].dp = (void*) process;
641 if (self != simix_global->maestro_process) {
642 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
643 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
644 SIMIX_process_yield(self);
646 SIMIX_simcall_handle(&self->simcall, 0);
651 inline static void simcall_BODY_process_killall(int reset_pid) {
652 smx_process_t self = SIMIX_process_self();
654 /* Go to that function to follow the code flow through the simcall barrier */
655 if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
656 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
658 self->simcall.call = SIMCALL_PROCESS_KILLALL;
659 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
660 memset(self->simcall.args, 0, sizeof(self->simcall.args));
661 self->simcall.args[0].i = (int) reset_pid;
662 if (self != simix_global->maestro_process) {
663 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
664 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
665 SIMIX_process_yield(self);
667 SIMIX_simcall_handle(&self->simcall, 0);
672 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
673 smx_process_t self = SIMIX_process_self();
675 /* Go to that function to follow the code flow through the simcall barrier */
676 if (0) SIMIX_process_cleanup(process);
677 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
679 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
680 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
681 memset(self->simcall.args, 0, sizeof(self->simcall.args));
682 self->simcall.args[0].dp = (void*) process;
683 if (self != simix_global->maestro_process) {
684 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
685 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
686 SIMIX_process_yield(self);
688 SIMIX_simcall_handle(&self->simcall, 0);
693 inline static void simcall_BODY_process_suspend(smx_process_t process) {
694 smx_process_t self = SIMIX_process_self();
696 /* Go to that function to follow the code flow through the simcall barrier */
697 if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
698 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
700 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
701 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
702 memset(self->simcall.args, 0, sizeof(self->simcall.args));
703 self->simcall.args[0].dp = (void*) process;
704 if (self != simix_global->maestro_process) {
705 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
706 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
707 SIMIX_process_yield(self);
709 SIMIX_simcall_handle(&self->simcall, 0);
714 inline static void simcall_BODY_process_resume(smx_process_t process) {
715 smx_process_t self = SIMIX_process_self();
717 /* Go to that function to follow the code flow through the simcall barrier */
718 if (0) simcall_HANDLER_process_resume(&self->simcall, process);
719 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
721 self->simcall.call = SIMCALL_PROCESS_RESUME;
722 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
723 memset(self->simcall.args, 0, sizeof(self->simcall.args));
724 self->simcall.args[0].dp = (void*) process;
725 if (self != simix_global->maestro_process) {
726 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
727 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
728 SIMIX_process_yield(self);
730 SIMIX_simcall_handle(&self->simcall, 0);
735 inline static int simcall_BODY_process_count() {
736 smx_process_t self = SIMIX_process_self();
738 /* Go to that function to follow the code flow through the simcall barrier */
739 if (0) SIMIX_process_count();
740 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
742 self->simcall.call = SIMCALL_PROCESS_COUNT;
743 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
744 memset(self->simcall.args, 0, sizeof(self->simcall.args));
746 if (self != simix_global->maestro_process) {
747 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
748 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
749 SIMIX_process_yield(self);
751 SIMIX_simcall_handle(&self->simcall, 0);
753 return (int) self->simcall.result.i;
756 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
757 smx_process_t self = SIMIX_process_self();
759 /* Go to that function to follow the code flow through the simcall barrier */
760 if (0) SIMIX_process_get_PID(process);
761 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
763 self->simcall.call = SIMCALL_PROCESS_GET_PID;
764 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
765 memset(self->simcall.args, 0, sizeof(self->simcall.args));
766 self->simcall.args[0].dp = (void*) process;
767 if (self != simix_global->maestro_process) {
768 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
769 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
770 SIMIX_process_yield(self);
772 SIMIX_simcall_handle(&self->simcall, 0);
774 return (int) self->simcall.result.i;
777 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
778 smx_process_t self = SIMIX_process_self();
780 /* Go to that function to follow the code flow through the simcall barrier */
781 if (0) SIMIX_process_get_PPID(process);
782 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
784 self->simcall.call = SIMCALL_PROCESS_GET_PPID;
785 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
786 memset(self->simcall.args, 0, sizeof(self->simcall.args));
787 self->simcall.args[0].dp = (void*) process;
788 if (self != simix_global->maestro_process) {
789 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
790 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
791 SIMIX_process_yield(self);
793 SIMIX_simcall_handle(&self->simcall, 0);
795 return (int) self->simcall.result.i;
798 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
799 smx_process_t self = SIMIX_process_self();
801 /* Go to that function to follow the code flow through the simcall barrier */
802 if (0) SIMIX_process_get_data(process);
803 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
805 self->simcall.call = SIMCALL_PROCESS_GET_DATA;
806 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
807 memset(self->simcall.args, 0, sizeof(self->simcall.args));
808 self->simcall.args[0].dp = (void*) process;
809 if (self != simix_global->maestro_process) {
810 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
811 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
812 SIMIX_process_yield(self);
814 SIMIX_simcall_handle(&self->simcall, 0);
816 return (void*) self->simcall.result.dp;
819 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
820 smx_process_t self = SIMIX_process_self();
822 /* Go to that function to follow the code flow through the simcall barrier */
823 if (0) SIMIX_process_set_data(process, data);
824 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
826 self->simcall.call = SIMCALL_PROCESS_SET_DATA;
827 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
828 memset(self->simcall.args, 0, sizeof(self->simcall.args));
829 self->simcall.args[0].dp = (void*) process;
830 self->simcall.args[1].dp = (void*) data;
831 if (self != simix_global->maestro_process) {
832 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
833 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
834 SIMIX_process_yield(self);
836 SIMIX_simcall_handle(&self->simcall, 0);
841 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
842 smx_process_t self = SIMIX_process_self();
844 /* Go to that function to follow the code flow through the simcall barrier */
845 if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
846 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
848 self->simcall.call = SIMCALL_PROCESS_SET_HOST;
849 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
850 memset(self->simcall.args, 0, sizeof(self->simcall.args));
851 self->simcall.args[0].dp = (void*) process;
852 self->simcall.args[1].dp = (void*) dest;
853 if (self != simix_global->maestro_process) {
854 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
855 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
856 SIMIX_process_yield(self);
858 SIMIX_simcall_handle(&self->simcall, 0);
863 inline static sg_host_t simcall_BODY_process_get_host(smx_process_t process) {
864 smx_process_t self = SIMIX_process_self();
866 /* Go to that function to follow the code flow through the simcall barrier */
867 if (0) SIMIX_process_get_host(process);
868 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
870 self->simcall.call = SIMCALL_PROCESS_GET_HOST;
871 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
872 memset(self->simcall.args, 0, sizeof(self->simcall.args));
873 self->simcall.args[0].dp = (void*) process;
874 if (self != simix_global->maestro_process) {
875 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
876 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
877 SIMIX_process_yield(self);
879 SIMIX_simcall_handle(&self->simcall, 0);
881 return (sg_host_t) self->simcall.result.dp;
884 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
885 smx_process_t self = SIMIX_process_self();
887 /* Go to that function to follow the code flow through the simcall barrier */
888 if (0) SIMIX_process_get_name(process);
889 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
891 self->simcall.call = SIMCALL_PROCESS_GET_NAME;
892 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
893 memset(self->simcall.args, 0, sizeof(self->simcall.args));
894 self->simcall.args[0].dp = (void*) process;
895 if (self != simix_global->maestro_process) {
896 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
897 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
898 SIMIX_process_yield(self);
900 SIMIX_simcall_handle(&self->simcall, 0);
902 return (const char*) self->simcall.result.cc;
905 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
906 smx_process_t self = SIMIX_process_self();
908 /* Go to that function to follow the code flow through the simcall barrier */
909 if (0) SIMIX_process_is_suspended(process);
910 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
912 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
913 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
914 memset(self->simcall.args, 0, sizeof(self->simcall.args));
915 self->simcall.args[0].dp = (void*) process;
916 if (self != simix_global->maestro_process) {
917 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
918 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
919 SIMIX_process_yield(self);
921 SIMIX_simcall_handle(&self->simcall, 0);
923 return (int) self->simcall.result.i;
926 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
927 smx_process_t self = SIMIX_process_self();
929 /* Go to that function to follow the code flow through the simcall barrier */
930 if (0) SIMIX_process_get_properties(process);
931 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
933 self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
934 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
935 memset(self->simcall.args, 0, sizeof(self->simcall.args));
936 self->simcall.args[0].dp = (void*) process;
937 if (self != simix_global->maestro_process) {
938 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
939 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
940 SIMIX_process_yield(self);
942 SIMIX_simcall_handle(&self->simcall, 0);
944 return (xbt_dict_t) self->simcall.result.dp;
947 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
948 smx_process_t self = SIMIX_process_self();
950 /* Go to that function to follow the code flow through the simcall barrier */
951 if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
952 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
954 self->simcall.call = SIMCALL_PROCESS_JOIN;
955 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
956 memset(self->simcall.args, 0, sizeof(self->simcall.args));
957 self->simcall.args[0].dp = (void*) process;
958 self->simcall.args[1].d = (double) timeout;
959 if (self != simix_global->maestro_process) {
960 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
961 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
962 SIMIX_process_yield(self);
964 SIMIX_simcall_handle(&self->simcall, 0);
966 return (int) self->simcall.result.i;
969 inline static int simcall_BODY_process_sleep(double duration) {
970 smx_process_t self = SIMIX_process_self();
972 /* Go to that function to follow the code flow through the simcall barrier */
973 if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
974 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
976 self->simcall.call = SIMCALL_PROCESS_SLEEP;
977 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
978 memset(self->simcall.args, 0, sizeof(self->simcall.args));
979 self->simcall.args[0].d = (double) duration;
980 if (self != simix_global->maestro_process) {
981 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
982 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
983 SIMIX_process_yield(self);
985 SIMIX_simcall_handle(&self->simcall, 0);
987 return (int) self->simcall.result.i;
990 inline static smx_synchro_t simcall_BODY_process_execute(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
991 smx_process_t self = SIMIX_process_self();
993 /* Go to that function to follow the code flow through the simcall barrier */
994 if (0) simcall_HANDLER_process_execute(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
995 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
997 self->simcall.call = SIMCALL_PROCESS_EXECUTE;
998 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
999 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1000 self->simcall.args[0].cc = (const char*) name;
1001 self->simcall.args[1].d = (double) flops_amount;
1002 self->simcall.args[2].d = (double) priority;
1003 self->simcall.args[3].d = (double) bound;
1004 self->simcall.args[4].ul = (unsigned long) affinity_mask;
1005 if (self != simix_global->maestro_process) {
1006 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1007 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1008 SIMIX_process_yield(self);
1010 SIMIX_simcall_handle(&self->simcall, 0);
1012 return (smx_synchro_t) self->simcall.result.dp;
1015 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) {
1016 smx_process_t self = SIMIX_process_self();
1018 /* Go to that function to follow the code flow through the simcall barrier */
1019 if (0) SIMIX_process_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
1020 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1022 self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
1023 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1024 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1025 self->simcall.args[0].cc = (const char*) name;
1026 self->simcall.args[1].i = (int) host_nb;
1027 self->simcall.args[2].dp = (void*) host_list;
1028 self->simcall.args[3].dp = (void*) flops_amount;
1029 self->simcall.args[4].dp = (void*) bytes_amount;
1030 self->simcall.args[5].d = (double) amount;
1031 self->simcall.args[6].d = (double) rate;
1032 if (self != simix_global->maestro_process) {
1033 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1034 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1035 SIMIX_process_yield(self);
1037 SIMIX_simcall_handle(&self->simcall, 0);
1039 return (smx_synchro_t) self->simcall.result.dp;
1042 inline static void simcall_BODY_process_execution_destroy(smx_synchro_t execution) {
1043 smx_process_t self = SIMIX_process_self();
1045 /* Go to that function to follow the code flow through the simcall barrier */
1046 if (0) SIMIX_process_execution_destroy(execution);
1047 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1049 self->simcall.call = SIMCALL_PROCESS_EXECUTION_DESTROY;
1050 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1051 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1052 self->simcall.args[0].dp = (void*) execution;
1053 if (self != simix_global->maestro_process) {
1054 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1055 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1056 SIMIX_process_yield(self);
1058 SIMIX_simcall_handle(&self->simcall, 0);
1063 inline static void simcall_BODY_process_execution_cancel(smx_synchro_t execution) {
1064 smx_process_t self = SIMIX_process_self();
1066 /* Go to that function to follow the code flow through the simcall barrier */
1067 if (0) SIMIX_process_execution_cancel(execution);
1068 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1070 self->simcall.call = SIMCALL_PROCESS_EXECUTION_CANCEL;
1071 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1072 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1073 self->simcall.args[0].dp = (void*) execution;
1074 if (self != simix_global->maestro_process) {
1075 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1076 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1077 SIMIX_process_yield(self);
1079 SIMIX_simcall_handle(&self->simcall, 0);
1084 inline static double simcall_BODY_process_execution_get_remains(smx_synchro_t execution) {
1085 smx_process_t self = SIMIX_process_self();
1087 /* Go to that function to follow the code flow through the simcall barrier */
1088 if (0) SIMIX_process_execution_get_remains(execution);
1089 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1091 self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_REMAINS;
1092 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1093 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1094 self->simcall.args[0].dp = (void*) execution;
1095 if (self != simix_global->maestro_process) {
1096 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1097 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1098 SIMIX_process_yield(self);
1100 SIMIX_simcall_handle(&self->simcall, 0);
1102 return (double) self->simcall.result.d;
1105 inline static e_smx_state_t simcall_BODY_process_execution_get_state(smx_synchro_t execution) {
1106 smx_process_t self = SIMIX_process_self();
1108 /* Go to that function to follow the code flow through the simcall barrier */
1109 if (0) SIMIX_process_execution_get_state(execution);
1110 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1112 self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_STATE;
1113 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1114 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1115 self->simcall.args[0].dp = (void*) execution;
1116 if (self != simix_global->maestro_process) {
1117 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1118 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1119 SIMIX_process_yield(self);
1121 SIMIX_simcall_handle(&self->simcall, 0);
1123 return (e_smx_state_t) self->simcall.result.i;
1126 inline static void simcall_BODY_process_execution_set_priority(smx_synchro_t execution, double priority) {
1127 smx_process_t self = SIMIX_process_self();
1129 /* Go to that function to follow the code flow through the simcall barrier */
1130 if (0) SIMIX_process_execution_set_priority(execution, priority);
1131 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1133 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_PRIORITY;
1134 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1135 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1136 self->simcall.args[0].dp = (void*) execution;
1137 self->simcall.args[1].d = (double) priority;
1138 if (self != simix_global->maestro_process) {
1139 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1140 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1141 SIMIX_process_yield(self);
1143 SIMIX_simcall_handle(&self->simcall, 0);
1148 inline static void simcall_BODY_process_execution_set_bound(smx_synchro_t execution, double bound) {
1149 smx_process_t self = SIMIX_process_self();
1151 /* Go to that function to follow the code flow through the simcall barrier */
1152 if (0) SIMIX_process_execution_set_bound(execution, bound);
1153 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1155 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_BOUND;
1156 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1157 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1158 self->simcall.args[0].dp = (void*) execution;
1159 self->simcall.args[1].d = (double) bound;
1160 if (self != simix_global->maestro_process) {
1161 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1162 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1163 SIMIX_process_yield(self);
1165 SIMIX_simcall_handle(&self->simcall, 0);
1170 inline static void simcall_BODY_process_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
1171 smx_process_t self = SIMIX_process_self();
1173 /* Go to that function to follow the code flow through the simcall barrier */
1174 if (0) SIMIX_process_execution_set_affinity(execution, ws, mask);
1175 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1177 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_AFFINITY;
1178 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1179 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1180 self->simcall.args[0].dp = (void*) execution;
1181 self->simcall.args[1].dp = (void*) ws;
1182 self->simcall.args[2].ul = (unsigned long) mask;
1183 if (self != simix_global->maestro_process) {
1184 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1185 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1186 SIMIX_process_yield(self);
1188 SIMIX_simcall_handle(&self->simcall, 0);
1193 inline static int simcall_BODY_process_execution_wait(smx_synchro_t execution) {
1194 smx_process_t self = SIMIX_process_self();
1196 /* Go to that function to follow the code flow through the simcall barrier */
1197 if (0) simcall_HANDLER_process_execution_wait(&self->simcall, execution);
1198 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1200 self->simcall.call = SIMCALL_PROCESS_EXECUTION_WAIT;
1201 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1202 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1203 self->simcall.args[0].dp = (void*) execution;
1204 if (self != simix_global->maestro_process) {
1205 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1206 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1207 SIMIX_process_yield(self);
1209 SIMIX_simcall_handle(&self->simcall, 0);
1211 return (int) self->simcall.result.i;
1214 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1215 smx_process_t self = SIMIX_process_self();
1217 /* Go to that function to follow the code flow through the simcall barrier */
1218 if (0) SIMIX_process_on_exit(process, fun, data);
1219 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1221 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1222 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1223 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1224 self->simcall.args[0].dp = (void*) process;
1225 self->simcall.args[1].fp = (FPtr) fun;
1226 self->simcall.args[2].dp = (void*) data;
1227 if (self != simix_global->maestro_process) {
1228 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1229 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1230 SIMIX_process_yield(self);
1232 SIMIX_simcall_handle(&self->simcall, 0);
1237 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
1238 smx_process_t self = SIMIX_process_self();
1240 /* Go to that function to follow the code flow through the simcall barrier */
1241 if (0) SIMIX_process_auto_restart_set(process, auto_restart);
1242 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1244 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
1245 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1246 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1247 self->simcall.args[0].dp = (void*) process;
1248 self->simcall.args[1].i = (int) auto_restart;
1249 if (self != simix_global->maestro_process) {
1250 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1251 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1252 SIMIX_process_yield(self);
1254 SIMIX_simcall_handle(&self->simcall, 0);
1259 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1260 smx_process_t self = SIMIX_process_self();
1262 /* Go to that function to follow the code flow through the simcall barrier */
1263 if (0) simcall_HANDLER_process_restart(&self->simcall, process);
1264 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1266 self->simcall.call = SIMCALL_PROCESS_RESTART;
1267 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1268 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1269 self->simcall.args[0].dp = (void*) process;
1270 if (self != simix_global->maestro_process) {
1271 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1272 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1273 SIMIX_process_yield(self);
1275 SIMIX_simcall_handle(&self->simcall, 0);
1277 return (smx_process_t) self->simcall.result.dp;
1280 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1281 smx_process_t self = SIMIX_process_self();
1283 /* Go to that function to follow the code flow through the simcall barrier */
1284 if (0) SIMIX_rdv_create(name);
1285 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1287 self->simcall.call = SIMCALL_RDV_CREATE;
1288 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1289 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1290 self->simcall.args[0].cc = (const char*) name;
1291 if (self != simix_global->maestro_process) {
1292 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1293 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1294 SIMIX_process_yield(self);
1296 SIMIX_simcall_handle(&self->simcall, 0);
1298 return (smx_rdv_t) self->simcall.result.dp;
1301 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1302 smx_process_t self = SIMIX_process_self();
1304 /* Go to that function to follow the code flow through the simcall barrier */
1305 if (0) SIMIX_rdv_destroy(rdv);
1306 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1308 self->simcall.call = SIMCALL_RDV_DESTROY;
1309 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1310 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1311 self->simcall.args[0].dp = (void*) rdv;
1312 if (self != simix_global->maestro_process) {
1313 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1314 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1315 SIMIX_process_yield(self);
1317 SIMIX_simcall_handle(&self->simcall, 0);
1322 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) {
1323 smx_process_t self = SIMIX_process_self();
1325 /* Go to that function to follow the code flow through the simcall barrier */
1326 if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
1327 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1329 self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1330 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1331 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1332 self->simcall.args[0].dp = (void*) rdv;
1333 self->simcall.args[1].dp = (void*) host;
1334 if (self != simix_global->maestro_process) {
1335 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1336 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1337 SIMIX_process_yield(self);
1339 SIMIX_simcall_handle(&self->simcall, 0);
1341 return (unsigned int) self->simcall.result.ui;
1344 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1345 smx_process_t self = SIMIX_process_self();
1347 /* Go to that function to follow the code flow through the simcall barrier */
1348 if (0) SIMIX_rdv_get_head(rdv);
1349 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1351 self->simcall.call = SIMCALL_RDV_GET_HEAD;
1352 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1353 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1354 self->simcall.args[0].dp = (void*) rdv;
1355 if (self != simix_global->maestro_process) {
1356 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1357 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1358 SIMIX_process_yield(self);
1360 SIMIX_simcall_handle(&self->simcall, 0);
1362 return (smx_synchro_t) self->simcall.result.dp;
1365 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1366 smx_process_t self = SIMIX_process_self();
1368 /* Go to that function to follow the code flow through the simcall barrier */
1369 if (0) SIMIX_rdv_set_receiver(rdv, receiver);
1370 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1372 self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1373 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1374 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1375 self->simcall.args[0].dp = (void*) rdv;
1376 self->simcall.args[1].dp = (void*) receiver;
1377 if (self != simix_global->maestro_process) {
1378 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1379 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1380 SIMIX_process_yield(self);
1382 SIMIX_simcall_handle(&self->simcall, 0);
1387 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1388 smx_process_t self = SIMIX_process_self();
1390 /* Go to that function to follow the code flow through the simcall barrier */
1391 if (0) SIMIX_rdv_get_receiver(rdv);
1392 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1394 self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1395 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1396 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1397 self->simcall.args[0].dp = (void*) rdv;
1398 if (self != simix_global->maestro_process) {
1399 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1400 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1401 SIMIX_process_yield(self);
1403 SIMIX_simcall_handle(&self->simcall, 0);
1405 return (smx_process_t) self->simcall.result.dp;
1408 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) {
1409 smx_process_t self = SIMIX_process_self();
1411 /* Go to that function to follow the code flow through the simcall barrier */
1412 if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1413 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1415 self->simcall.call = SIMCALL_COMM_IPROBE;
1416 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1417 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1418 self->simcall.args[0].dp = (void*) rdv;
1419 self->simcall.args[1].i = (int) type;
1420 self->simcall.args[2].i = (int) src;
1421 self->simcall.args[3].i = (int) tag;
1422 self->simcall.args[4].fp = (FPtr) match_fun;
1423 self->simcall.args[5].dp = (void*) data;
1424 if (self != simix_global->maestro_process) {
1425 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1426 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1427 SIMIX_process_yield(self);
1429 SIMIX_simcall_handle(&self->simcall, 0);
1431 return (smx_synchro_t) self->simcall.result.dp;
1434 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) {
1435 smx_process_t self = SIMIX_process_self();
1437 /* Go to that function to follow the code flow through the simcall barrier */
1438 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);
1439 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1441 self->simcall.call = SIMCALL_COMM_SEND;
1442 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1443 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1444 self->simcall.args[0].dp = (void*) sender;
1445 self->simcall.args[1].dp = (void*) rdv;
1446 self->simcall.args[2].d = (double) task_size;
1447 self->simcall.args[3].d = (double) rate;
1448 self->simcall.args[4].dp = (void*) src_buff;
1449 self->simcall.args[5].sz = (size_t) src_buff_size;
1450 self->simcall.args[6].fp = (FPtr) match_fun;
1451 self->simcall.args[7].fp = (FPtr) copy_data_fun;
1452 self->simcall.args[8].dp = (void*) data;
1453 self->simcall.args[9].d = (double) timeout;
1454 if (self != simix_global->maestro_process) {
1455 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1456 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1457 SIMIX_process_yield(self);
1459 SIMIX_simcall_handle(&self->simcall, 0);
1464 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) {
1465 smx_process_t self = SIMIX_process_self();
1467 /* Go to that function to follow the code flow through the simcall barrier */
1468 if (0) 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);
1469 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1471 self->simcall.call = SIMCALL_COMM_ISEND;
1472 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1473 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1474 self->simcall.args[0].dp = (void*) sender;
1475 self->simcall.args[1].dp = (void*) rdv;
1476 self->simcall.args[2].d = (double) task_size;
1477 self->simcall.args[3].d = (double) rate;
1478 self->simcall.args[4].dp = (void*) src_buff;
1479 self->simcall.args[5].sz = (size_t) src_buff_size;
1480 self->simcall.args[6].fp = (FPtr) match_fun;
1481 self->simcall.args[7].fp = (FPtr) clean_fun;
1482 self->simcall.args[8].fp = (FPtr) copy_data_fun;
1483 self->simcall.args[9].dp = (void*) data;
1484 self->simcall.args[10].i = (int) detached;
1485 if (self != simix_global->maestro_process) {
1486 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1487 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1488 SIMIX_process_yield(self);
1490 SIMIX_simcall_handle(&self->simcall, 0);
1492 return (smx_synchro_t) self->simcall.result.dp;
1495 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) {
1496 smx_process_t self = SIMIX_process_self();
1498 /* Go to that function to follow the code flow through the simcall barrier */
1499 if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1500 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1502 self->simcall.call = SIMCALL_COMM_RECV;
1503 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1504 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1505 self->simcall.args[0].dp = (void*) receiver;
1506 self->simcall.args[1].dp = (void*) rdv;
1507 self->simcall.args[2].dp = (void*) dst_buff;
1508 self->simcall.args[3].dp = (void*) dst_buff_size;
1509 self->simcall.args[4].fp = (FPtr) match_fun;
1510 self->simcall.args[5].fp = (FPtr) copy_data_fun;
1511 self->simcall.args[6].dp = (void*) data;
1512 self->simcall.args[7].d = (double) timeout;
1513 self->simcall.args[8].d = (double) rate;
1514 if (self != simix_global->maestro_process) {
1515 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1516 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1517 SIMIX_process_yield(self);
1519 SIMIX_simcall_handle(&self->simcall, 0);
1524 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) {
1525 smx_process_t self = SIMIX_process_self();
1527 /* Go to that function to follow the code flow through the simcall barrier */
1528 if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1529 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1531 self->simcall.call = SIMCALL_COMM_IRECV;
1532 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1533 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1534 self->simcall.args[0].dp = (void*) receiver;
1535 self->simcall.args[1].dp = (void*) rdv;
1536 self->simcall.args[2].dp = (void*) dst_buff;
1537 self->simcall.args[3].dp = (void*) dst_buff_size;
1538 self->simcall.args[4].fp = (FPtr) match_fun;
1539 self->simcall.args[5].fp = (FPtr) copy_data_fun;
1540 self->simcall.args[6].dp = (void*) data;
1541 self->simcall.args[7].d = (double) rate;
1542 if (self != simix_global->maestro_process) {
1543 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1544 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1545 SIMIX_process_yield(self);
1547 SIMIX_simcall_handle(&self->simcall, 0);
1549 return (smx_synchro_t) self->simcall.result.dp;
1552 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
1553 smx_process_t self = SIMIX_process_self();
1555 /* Go to that function to follow the code flow through the simcall barrier */
1556 if (0) SIMIX_comm_cancel(comm);
1557 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1559 self->simcall.call = SIMCALL_COMM_CANCEL;
1560 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1561 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1562 self->simcall.args[0].dp = (void*) comm;
1563 if (self != simix_global->maestro_process) {
1564 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1565 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1566 SIMIX_process_yield(self);
1568 SIMIX_simcall_handle(&self->simcall, 0);
1573 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1574 smx_process_t self = SIMIX_process_self();
1576 /* Go to that function to follow the code flow through the simcall barrier */
1577 if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
1578 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1580 self->simcall.call = SIMCALL_COMM_WAITANY;
1581 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1582 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1583 self->simcall.args[0].dp = (void*) comms;
1584 if (self != simix_global->maestro_process) {
1585 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1586 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1587 SIMIX_process_yield(self);
1589 SIMIX_simcall_handle(&self->simcall, 0);
1591 return (int) self->simcall.result.i;
1594 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
1595 smx_process_t self = SIMIX_process_self();
1597 /* Go to that function to follow the code flow through the simcall barrier */
1598 if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
1599 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1601 self->simcall.call = SIMCALL_COMM_WAIT;
1602 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1603 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1604 self->simcall.args[0].dp = (void*) comm;
1605 self->simcall.args[1].d = (double) timeout;
1606 if (self != simix_global->maestro_process) {
1607 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1608 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1609 SIMIX_process_yield(self);
1611 SIMIX_simcall_handle(&self->simcall, 0);
1616 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
1617 smx_process_t self = SIMIX_process_self();
1619 /* Go to that function to follow the code flow through the simcall barrier */
1620 if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
1621 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1623 self->simcall.call = SIMCALL_COMM_TEST;
1624 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1625 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1626 self->simcall.args[0].dp = (void*) comm;
1627 if (self != simix_global->maestro_process) {
1628 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1629 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1630 SIMIX_process_yield(self);
1632 SIMIX_simcall_handle(&self->simcall, 0);
1634 return (int) self->simcall.result.i;
1637 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1638 smx_process_t self = SIMIX_process_self();
1640 /* Go to that function to follow the code flow through the simcall barrier */
1641 if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
1642 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1644 self->simcall.call = SIMCALL_COMM_TESTANY;
1645 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1646 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1647 self->simcall.args[0].dp = (void*) comms;
1648 if (self != simix_global->maestro_process) {
1649 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1650 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1651 SIMIX_process_yield(self);
1653 SIMIX_simcall_handle(&self->simcall, 0);
1655 return (int) self->simcall.result.i;
1658 inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
1659 smx_process_t self = SIMIX_process_self();
1661 /* Go to that function to follow the code flow through the simcall barrier */
1662 if (0) SIMIX_comm_get_remains(comm);
1663 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1665 self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1666 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1667 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1668 self->simcall.args[0].dp = (void*) comm;
1669 if (self != simix_global->maestro_process) {
1670 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1671 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1672 SIMIX_process_yield(self);
1674 SIMIX_simcall_handle(&self->simcall, 0);
1676 return (double) self->simcall.result.d;
1679 inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
1680 smx_process_t self = SIMIX_process_self();
1682 /* Go to that function to follow the code flow through the simcall barrier */
1683 if (0) SIMIX_comm_get_state(comm);
1684 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1686 self->simcall.call = SIMCALL_COMM_GET_STATE;
1687 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1688 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1689 self->simcall.args[0].dp = (void*) comm;
1690 if (self != simix_global->maestro_process) {
1691 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1692 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1693 SIMIX_process_yield(self);
1695 SIMIX_simcall_handle(&self->simcall, 0);
1697 return (e_smx_state_t) self->simcall.result.i;
1700 inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
1701 smx_process_t self = SIMIX_process_self();
1703 /* Go to that function to follow the code flow through the simcall barrier */
1704 if (0) SIMIX_comm_get_src_data(comm);
1705 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1707 self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1708 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1709 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1710 self->simcall.args[0].dp = (void*) comm;
1711 if (self != simix_global->maestro_process) {
1712 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1713 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1714 SIMIX_process_yield(self);
1716 SIMIX_simcall_handle(&self->simcall, 0);
1718 return (void*) self->simcall.result.dp;
1721 inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
1722 smx_process_t self = SIMIX_process_self();
1724 /* Go to that function to follow the code flow through the simcall barrier */
1725 if (0) SIMIX_comm_get_dst_data(comm);
1726 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1728 self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1729 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1730 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1731 self->simcall.args[0].dp = (void*) comm;
1732 if (self != simix_global->maestro_process) {
1733 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1734 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1735 SIMIX_process_yield(self);
1737 SIMIX_simcall_handle(&self->simcall, 0);
1739 return (void*) self->simcall.result.dp;
1742 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_synchro_t comm) {
1743 smx_process_t self = SIMIX_process_self();
1745 /* Go to that function to follow the code flow through the simcall barrier */
1746 if (0) SIMIX_comm_get_src_proc(comm);
1747 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1749 self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1750 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1751 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1752 self->simcall.args[0].dp = (void*) comm;
1753 if (self != simix_global->maestro_process) {
1754 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1755 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1756 SIMIX_process_yield(self);
1758 SIMIX_simcall_handle(&self->simcall, 0);
1760 return (smx_process_t) self->simcall.result.dp;
1763 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_synchro_t comm) {
1764 smx_process_t self = SIMIX_process_self();
1766 /* Go to that function to follow the code flow through the simcall barrier */
1767 if (0) SIMIX_comm_get_dst_proc(comm);
1768 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1770 self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1771 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1772 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1773 self->simcall.args[0].dp = (void*) comm;
1774 if (self != simix_global->maestro_process) {
1775 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1776 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1777 SIMIX_process_yield(self);
1779 SIMIX_simcall_handle(&self->simcall, 0);
1781 return (smx_process_t) self->simcall.result.dp;
1784 inline static smx_mutex_t simcall_BODY_mutex_init() {
1785 smx_process_t self = SIMIX_process_self();
1787 /* Go to that function to follow the code flow through the simcall barrier */
1788 if (0) simcall_HANDLER_mutex_init(&self->simcall);
1789 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1791 self->simcall.call = SIMCALL_MUTEX_INIT;
1792 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1793 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1795 if (self != simix_global->maestro_process) {
1796 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1797 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1798 SIMIX_process_yield(self);
1800 SIMIX_simcall_handle(&self->simcall, 0);
1802 return (smx_mutex_t) self->simcall.result.dp;
1805 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1806 smx_process_t self = SIMIX_process_self();
1808 /* Go to that function to follow the code flow through the simcall barrier */
1809 if (0) SIMIX_mutex_destroy(mutex);
1810 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1812 self->simcall.call = SIMCALL_MUTEX_DESTROY;
1813 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1814 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1815 self->simcall.args[0].dp = (void*) mutex;
1816 if (self != simix_global->maestro_process) {
1817 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1818 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1819 SIMIX_process_yield(self);
1821 SIMIX_simcall_handle(&self->simcall, 0);
1826 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1827 smx_process_t self = SIMIX_process_self();
1829 /* Go to that function to follow the code flow through the simcall barrier */
1830 if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1831 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1833 self->simcall.call = SIMCALL_MUTEX_LOCK;
1834 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1835 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1836 self->simcall.args[0].dp = (void*) mutex;
1837 if (self != simix_global->maestro_process) {
1838 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1839 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1840 SIMIX_process_yield(self);
1842 SIMIX_simcall_handle(&self->simcall, 0);
1847 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1848 smx_process_t self = SIMIX_process_self();
1850 /* Go to that function to follow the code flow through the simcall barrier */
1851 if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
1852 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1854 self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1855 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1856 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1857 self->simcall.args[0].dp = (void*) mutex;
1858 if (self != simix_global->maestro_process) {
1859 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1860 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1861 SIMIX_process_yield(self);
1863 SIMIX_simcall_handle(&self->simcall, 0);
1865 return (int) self->simcall.result.i;
1868 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1869 smx_process_t self = SIMIX_process_self();
1871 /* Go to that function to follow the code flow through the simcall barrier */
1872 if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
1873 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1875 self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1876 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1877 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1878 self->simcall.args[0].dp = (void*) mutex;
1879 if (self != simix_global->maestro_process) {
1880 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1881 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1882 SIMIX_process_yield(self);
1884 SIMIX_simcall_handle(&self->simcall, 0);
1889 inline static smx_cond_t simcall_BODY_cond_init() {
1890 smx_process_t self = SIMIX_process_self();
1892 /* Go to that function to follow the code flow through the simcall barrier */
1893 if (0) SIMIX_cond_init();
1894 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1896 self->simcall.call = SIMCALL_COND_INIT;
1897 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1898 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1900 if (self != simix_global->maestro_process) {
1901 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1902 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1903 SIMIX_process_yield(self);
1905 SIMIX_simcall_handle(&self->simcall, 0);
1907 return (smx_cond_t) self->simcall.result.dp;
1910 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
1911 smx_process_t self = SIMIX_process_self();
1913 /* Go to that function to follow the code flow through the simcall barrier */
1914 if (0) SIMIX_cond_destroy(cond);
1915 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1917 self->simcall.call = SIMCALL_COND_DESTROY;
1918 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1919 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1920 self->simcall.args[0].dp = (void*) cond;
1921 if (self != simix_global->maestro_process) {
1922 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1923 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1924 SIMIX_process_yield(self);
1926 SIMIX_simcall_handle(&self->simcall, 0);
1931 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
1932 smx_process_t self = SIMIX_process_self();
1934 /* Go to that function to follow the code flow through the simcall barrier */
1935 if (0) SIMIX_cond_signal(cond);
1936 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1938 self->simcall.call = SIMCALL_COND_SIGNAL;
1939 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1940 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1941 self->simcall.args[0].dp = (void*) cond;
1942 if (self != simix_global->maestro_process) {
1943 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1944 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1945 SIMIX_process_yield(self);
1947 SIMIX_simcall_handle(&self->simcall, 0);
1952 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
1953 smx_process_t self = SIMIX_process_self();
1955 /* Go to that function to follow the code flow through the simcall barrier */
1956 if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
1957 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1959 self->simcall.call = SIMCALL_COND_WAIT;
1960 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1961 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1962 self->simcall.args[0].dp = (void*) cond;
1963 self->simcall.args[1].dp = (void*) mutex;
1964 if (self != simix_global->maestro_process) {
1965 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1966 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1967 SIMIX_process_yield(self);
1969 SIMIX_simcall_handle(&self->simcall, 0);
1974 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1975 smx_process_t self = SIMIX_process_self();
1977 /* Go to that function to follow the code flow through the simcall barrier */
1978 if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
1979 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1981 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
1982 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1983 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1984 self->simcall.args[0].dp = (void*) cond;
1985 self->simcall.args[1].dp = (void*) mutex;
1986 self->simcall.args[2].d = (double) timeout;
1987 if (self != simix_global->maestro_process) {
1988 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1989 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1990 SIMIX_process_yield(self);
1992 SIMIX_simcall_handle(&self->simcall, 0);
1997 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1998 smx_process_t self = SIMIX_process_self();
2000 /* Go to that function to follow the code flow through the simcall barrier */
2001 if (0) SIMIX_cond_broadcast(cond);
2002 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2004 self->simcall.call = SIMCALL_COND_BROADCAST;
2005 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2006 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2007 self->simcall.args[0].dp = (void*) cond;
2008 if (self != simix_global->maestro_process) {
2009 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2010 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2011 SIMIX_process_yield(self);
2013 SIMIX_simcall_handle(&self->simcall, 0);
2018 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
2019 smx_process_t self = SIMIX_process_self();
2021 /* Go to that function to follow the code flow through the simcall barrier */
2022 if (0) SIMIX_sem_init(capacity);
2023 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2025 self->simcall.call = SIMCALL_SEM_INIT;
2026 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2027 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2028 self->simcall.args[0].ui = (unsigned int) capacity;
2029 if (self != simix_global->maestro_process) {
2030 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2031 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2032 SIMIX_process_yield(self);
2034 SIMIX_simcall_handle(&self->simcall, 0);
2036 return (smx_sem_t) self->simcall.result.dp;
2039 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2040 smx_process_t self = SIMIX_process_self();
2042 /* Go to that function to follow the code flow through the simcall barrier */
2043 if (0) SIMIX_sem_destroy(sem);
2044 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2046 self->simcall.call = SIMCALL_SEM_DESTROY;
2047 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2048 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2049 self->simcall.args[0].dp = (void*) sem;
2050 if (self != simix_global->maestro_process) {
2051 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2052 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2053 SIMIX_process_yield(self);
2055 SIMIX_simcall_handle(&self->simcall, 0);
2060 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2061 smx_process_t self = SIMIX_process_self();
2063 /* Go to that function to follow the code flow through the simcall barrier */
2064 if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
2065 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2067 self->simcall.call = SIMCALL_SEM_RELEASE;
2068 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2069 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2070 self->simcall.args[0].dp = (void*) sem;
2071 if (self != simix_global->maestro_process) {
2072 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2073 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2074 SIMIX_process_yield(self);
2076 SIMIX_simcall_handle(&self->simcall, 0);
2081 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2082 smx_process_t self = SIMIX_process_self();
2084 /* Go to that function to follow the code flow through the simcall barrier */
2085 if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
2086 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2088 self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2089 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2090 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2091 self->simcall.args[0].dp = (void*) sem;
2092 if (self != simix_global->maestro_process) {
2093 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2094 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2095 SIMIX_process_yield(self);
2097 SIMIX_simcall_handle(&self->simcall, 0);
2099 return (int) self->simcall.result.i;
2102 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2103 smx_process_t self = SIMIX_process_self();
2105 /* Go to that function to follow the code flow through the simcall barrier */
2106 if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
2107 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2109 self->simcall.call = SIMCALL_SEM_ACQUIRE;
2110 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2111 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2112 self->simcall.args[0].dp = (void*) sem;
2113 if (self != simix_global->maestro_process) {
2114 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2115 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2116 SIMIX_process_yield(self);
2118 SIMIX_simcall_handle(&self->simcall, 0);
2123 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2124 smx_process_t self = SIMIX_process_self();
2126 /* Go to that function to follow the code flow through the simcall barrier */
2127 if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
2128 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2130 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2131 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2132 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2133 self->simcall.args[0].dp = (void*) sem;
2134 self->simcall.args[1].d = (double) timeout;
2135 if (self != simix_global->maestro_process) {
2136 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2137 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2138 SIMIX_process_yield(self);
2140 SIMIX_simcall_handle(&self->simcall, 0);
2145 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2146 smx_process_t self = SIMIX_process_self();
2148 /* Go to that function to follow the code flow through the simcall barrier */
2149 if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
2150 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2152 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2153 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2154 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2155 self->simcall.args[0].dp = (void*) sem;
2156 if (self != simix_global->maestro_process) {
2157 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2158 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2159 SIMIX_process_yield(self);
2161 SIMIX_simcall_handle(&self->simcall, 0);
2163 return (int) self->simcall.result.i;
2166 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
2167 smx_process_t self = SIMIX_process_self();
2169 /* Go to that function to follow the code flow through the simcall barrier */
2170 if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
2171 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2173 self->simcall.call = SIMCALL_FILE_READ;
2174 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2175 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2176 self->simcall.args[0].dp = (void*) fd;
2177 self->simcall.args[1].sgsz = (sg_size_t) size;
2178 self->simcall.args[2].dp = (void*) host;
2179 if (self != simix_global->maestro_process) {
2180 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2181 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2182 SIMIX_process_yield(self);
2184 SIMIX_simcall_handle(&self->simcall, 0);
2186 return (sg_size_t) self->simcall.result.sgsz;
2189 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
2190 smx_process_t self = SIMIX_process_self();
2192 /* Go to that function to follow the code flow through the simcall barrier */
2193 if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
2194 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2196 self->simcall.call = SIMCALL_FILE_WRITE;
2197 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2198 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2199 self->simcall.args[0].dp = (void*) fd;
2200 self->simcall.args[1].sgsz = (sg_size_t) size;
2201 self->simcall.args[2].dp = (void*) host;
2202 if (self != simix_global->maestro_process) {
2203 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2204 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2205 SIMIX_process_yield(self);
2207 SIMIX_simcall_handle(&self->simcall, 0);
2209 return (sg_size_t) self->simcall.result.sgsz;
2212 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
2213 smx_process_t self = SIMIX_process_self();
2215 /* Go to that function to follow the code flow through the simcall barrier */
2216 if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
2217 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2219 self->simcall.call = SIMCALL_FILE_OPEN;
2220 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2221 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2222 self->simcall.args[0].cc = (const char*) fullpath;
2223 self->simcall.args[1].dp = (void*) host;
2224 if (self != simix_global->maestro_process) {
2225 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2226 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2227 SIMIX_process_yield(self);
2229 SIMIX_simcall_handle(&self->simcall, 0);
2231 return (smx_file_t) self->simcall.result.dp;
2234 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
2235 smx_process_t self = SIMIX_process_self();
2237 /* Go to that function to follow the code flow through the simcall barrier */
2238 if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
2239 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2241 self->simcall.call = SIMCALL_FILE_CLOSE;
2242 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2243 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2244 self->simcall.args[0].dp = (void*) fd;
2245 self->simcall.args[1].dp = (void*) host;
2246 if (self != simix_global->maestro_process) {
2247 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2248 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2249 SIMIX_process_yield(self);
2251 SIMIX_simcall_handle(&self->simcall, 0);
2253 return (int) self->simcall.result.i;
2256 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
2257 smx_process_t self = SIMIX_process_self();
2259 /* Go to that function to follow the code flow through the simcall barrier */
2260 if (0) SIMIX_file_unlink(fd, host);
2261 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2263 self->simcall.call = SIMCALL_FILE_UNLINK;
2264 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2265 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2266 self->simcall.args[0].dp = (void*) fd;
2267 self->simcall.args[1].dp = (void*) host;
2268 if (self != simix_global->maestro_process) {
2269 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2270 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2271 SIMIX_process_yield(self);
2273 SIMIX_simcall_handle(&self->simcall, 0);
2275 return (int) self->simcall.result.i;
2278 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2279 smx_process_t self = SIMIX_process_self();
2281 /* Go to that function to follow the code flow through the simcall barrier */
2282 if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
2283 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2285 self->simcall.call = SIMCALL_FILE_GET_SIZE;
2286 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2287 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2288 self->simcall.args[0].dp = (void*) fd;
2289 if (self != simix_global->maestro_process) {
2290 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2291 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2292 SIMIX_process_yield(self);
2294 SIMIX_simcall_handle(&self->simcall, 0);
2296 return (sg_size_t) self->simcall.result.sgsz;
2299 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2300 smx_process_t self = SIMIX_process_self();
2302 /* Go to that function to follow the code flow through the simcall barrier */
2303 if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
2304 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2306 self->simcall.call = SIMCALL_FILE_TELL;
2307 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2308 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2309 self->simcall.args[0].dp = (void*) fd;
2310 if (self != simix_global->maestro_process) {
2311 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2312 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2313 SIMIX_process_yield(self);
2315 SIMIX_simcall_handle(&self->simcall, 0);
2317 return (sg_size_t) self->simcall.result.sgsz;
2320 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2321 smx_process_t self = SIMIX_process_self();
2323 /* Go to that function to follow the code flow through the simcall barrier */
2324 if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
2325 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2327 self->simcall.call = SIMCALL_FILE_SEEK;
2328 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2329 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2330 self->simcall.args[0].dp = (void*) fd;
2331 self->simcall.args[1].sgoff = (sg_offset_t) offset;
2332 self->simcall.args[2].i = (int) origin;
2333 if (self != simix_global->maestro_process) {
2334 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2335 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2336 SIMIX_process_yield(self);
2338 SIMIX_simcall_handle(&self->simcall, 0);
2340 return (int) self->simcall.result.i;
2343 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2344 smx_process_t self = SIMIX_process_self();
2346 /* Go to that function to follow the code flow through the simcall barrier */
2347 if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
2348 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2350 self->simcall.call = SIMCALL_FILE_GET_INFO;
2351 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2352 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2353 self->simcall.args[0].dp = (void*) fd;
2354 if (self != simix_global->maestro_process) {
2355 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2356 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2357 SIMIX_process_yield(self);
2359 SIMIX_simcall_handle(&self->simcall, 0);
2361 return (xbt_dynar_t) self->simcall.result.dp;
2364 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2365 smx_process_t self = SIMIX_process_self();
2367 /* Go to that function to follow the code flow through the simcall barrier */
2368 if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
2369 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2371 self->simcall.call = SIMCALL_FILE_MOVE;
2372 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2373 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2374 self->simcall.args[0].dp = (void*) fd;
2375 self->simcall.args[1].cc = (const char*) fullpath;
2376 if (self != simix_global->maestro_process) {
2377 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2378 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2379 SIMIX_process_yield(self);
2381 SIMIX_simcall_handle(&self->simcall, 0);
2383 return (int) self->simcall.result.i;
2386 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2387 smx_process_t self = SIMIX_process_self();
2389 /* Go to that function to follow the code flow through the simcall barrier */
2390 if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
2391 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2393 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2394 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2395 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2396 self->simcall.args[0].dp = (void*) storage;
2397 if (self != simix_global->maestro_process) {
2398 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2399 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2400 SIMIX_process_yield(self);
2402 SIMIX_simcall_handle(&self->simcall, 0);
2404 return (sg_size_t) self->simcall.result.sgsz;
2407 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2408 smx_process_t self = SIMIX_process_self();
2410 /* Go to that function to follow the code flow through the simcall barrier */
2411 if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
2412 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2414 self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2415 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2416 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2417 self->simcall.args[0].dp = (void*) name;
2418 if (self != simix_global->maestro_process) {
2419 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2420 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2421 SIMIX_process_yield(self);
2423 SIMIX_simcall_handle(&self->simcall, 0);
2425 return (sg_size_t) self->simcall.result.sgsz;
2428 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2429 smx_process_t self = SIMIX_process_self();
2431 /* Go to that function to follow the code flow through the simcall barrier */
2432 if (0) SIMIX_storage_get_properties(storage);
2433 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2435 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2436 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2437 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2438 self->simcall.args[0].dp = (void*) storage;
2439 if (self != simix_global->maestro_process) {
2440 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2441 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2442 SIMIX_process_yield(self);
2444 SIMIX_simcall_handle(&self->simcall, 0);
2446 return (xbt_dict_t) self->simcall.result.dp;
2449 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2450 smx_process_t self = SIMIX_process_self();
2452 /* Go to that function to follow the code flow through the simcall barrier */
2453 if (0) SIMIX_storage_get_content(storage);
2454 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2456 self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2457 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2458 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2459 self->simcall.args[0].dp = (void*) storage;
2460 if (self != simix_global->maestro_process) {
2461 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2462 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2463 SIMIX_process_yield(self);
2465 SIMIX_simcall_handle(&self->simcall, 0);
2467 return (xbt_dict_t) self->simcall.result.dp;
2470 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2471 smx_process_t self = SIMIX_process_self();
2473 /* Go to that function to follow the code flow through the simcall barrier */
2474 if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
2475 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2477 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2478 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2479 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2480 self->simcall.args[0].cc = (const char*) name;
2481 if (self != simix_global->maestro_process) {
2482 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2483 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2484 SIMIX_process_yield(self);
2486 SIMIX_simcall_handle(&self->simcall, 0);
2488 return (xbt_dict_t) self->simcall.result.dp;
2491 inline static int simcall_BODY_mc_random(int min, int max) {
2492 smx_process_t self = SIMIX_process_self();
2494 /* Go to that function to follow the code flow through the simcall barrier */
2495 if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
2496 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2498 self->simcall.call = SIMCALL_MC_RANDOM;
2499 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2500 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2501 self->simcall.args[0].i = (int) min;
2502 self->simcall.args[1].i = (int) max;
2503 if (self != simix_global->maestro_process) {
2504 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2505 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2506 SIMIX_process_yield(self);
2508 SIMIX_simcall_handle(&self->simcall, 0);
2510 return (int) self->simcall.result.i;
2513 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
2514 smx_process_t self = SIMIX_process_self();
2516 /* Go to that function to follow the code flow through the simcall barrier */
2517 if (0) SIMIX_set_category(synchro, category);
2518 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2520 self->simcall.call = SIMCALL_SET_CATEGORY;
2521 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2522 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2523 self->simcall.args[0].dp = (void*) synchro;
2524 self->simcall.args[1].cc = (const char*) category;
2525 if (self != simix_global->maestro_process) {
2526 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2527 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2528 SIMIX_process_yield(self);
2530 SIMIX_simcall_handle(&self->simcall, 0);
2535 inline static void simcall_BODY_run_kernel(void* code) {
2536 smx_process_t self = SIMIX_process_self();
2538 /* Go to that function to follow the code flow through the simcall barrier */
2539 if (0) SIMIX_run_kernel(code);
2540 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2542 self->simcall.call = SIMCALL_RUN_KERNEL;
2543 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2544 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2545 self->simcall.args[0].dp = (void*) code;
2546 if (self != simix_global->maestro_process) {
2547 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2548 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2549 SIMIX_process_yield(self);
2551 SIMIX_simcall_handle(&self->simcall, 0);
2555 #ifdef HAVE_LATENCY_BOUND_TRACKING
2557 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
2558 smx_process_t self = SIMIX_process_self();
2560 /* Go to that function to follow the code flow through the simcall barrier */
2561 if (0) SIMIX_comm_is_latency_bounded(comm);
2562 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2564 self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2565 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2566 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2567 self->simcall.args[0].dp = (void*) comm;
2568 if (self != simix_global->maestro_process) {
2569 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2570 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2571 SIMIX_process_yield(self);
2573 SIMIX_simcall_handle(&self->simcall, 0);
2575 return (int) self->simcall.result.i;
2581 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
2582 smx_process_t self = SIMIX_process_self();
2584 /* Go to that function to follow the code flow through the simcall barrier */
2585 if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
2586 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2588 self->simcall.call = SIMCALL_MC_SNAPSHOT;
2589 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2590 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2592 if (self != simix_global->maestro_process) {
2593 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2594 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2595 SIMIX_process_yield(self);
2597 SIMIX_simcall_handle(&self->simcall, 0);
2599 return (mc_snapshot_t) self->simcall.result.dp;
2602 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
2603 smx_process_t self = SIMIX_process_self();
2605 /* Go to that function to follow the code flow through the simcall barrier */
2606 if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
2607 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2609 self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2610 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2611 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2612 self->simcall.args[0].dp = (void*) s1;
2613 self->simcall.args[1].dp = (void*) s2;
2614 if (self != simix_global->maestro_process) {
2615 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2616 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2617 SIMIX_process_yield(self);
2619 SIMIX_simcall_handle(&self->simcall, 0);
2621 return (int) self->simcall.result.i;