1 /**********************************************************************/
2 /* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
4 /* DO NOT EVER CHANGE THIS FILE */
6 /* change simcalls specification in src/simix/simcalls.in */
7 /**********************************************************************/
10 * Note that the name comes from http://en.wikipedia.org/wiki/Popping
11 * Indeed, the control flow is doing a strange dance in there.
13 * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
16 #include "smx_private.h"
17 #include "src/mc/mc_forward.h"
20 inline static void simcall_BODY_host_on(sg_host_t host) {
21 smx_process_t self = SIMIX_process_self();
23 /* Go to that function to follow the code flow through the simcall barrier */
24 if (0) SIMIX_host_on(host);
25 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
27 self->simcall.call = SIMCALL_HOST_ON;
28 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
29 memset(self->simcall.args, 0, sizeof(self->simcall.args));
30 self->simcall.args[0].dp = (void*) host;
31 if (self != simix_global->maestro_process) {
32 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
33 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
34 SIMIX_process_yield(self);
36 SIMIX_simcall_handle(&self->simcall, 0);
41 inline static void simcall_BODY_host_off(sg_host_t host) {
42 smx_process_t self = SIMIX_process_self();
44 /* Go to that function to follow the code flow through the simcall barrier */
45 if (0) simcall_HANDLER_host_off(&self->simcall, host);
46 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
48 self->simcall.call = SIMCALL_HOST_OFF;
49 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
50 memset(self->simcall.args, 0, sizeof(self->simcall.args));
51 self->simcall.args[0].dp = (void*) host;
52 if (self != simix_global->maestro_process) {
53 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
54 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
55 SIMIX_process_yield(self);
57 SIMIX_simcall_handle(&self->simcall, 0);
62 inline static xbt_dict_t simcall_BODY_host_get_properties(sg_host_t host) {
63 smx_process_t self = SIMIX_process_self();
65 /* Go to that function to follow the code flow through the simcall barrier */
66 if (0) SIMIX_host_get_properties(host);
67 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
69 self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
70 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
71 memset(self->simcall.args, 0, sizeof(self->simcall.args));
72 self->simcall.args[0].dp = (void*) host;
73 if (self != simix_global->maestro_process) {
74 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
75 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
76 SIMIX_process_yield(self);
78 SIMIX_simcall_handle(&self->simcall, 0);
80 return (xbt_dict_t) self->simcall.result.dp;
83 inline static xbt_swag_t simcall_BODY_host_get_process_list(sg_host_t host) {
84 smx_process_t self = SIMIX_process_self();
86 /* Go to that function to follow the code flow through the simcall barrier */
87 if (0) SIMIX_host_get_process_list(host);
88 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
90 self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
91 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
92 memset(self->simcall.args, 0, sizeof(self->simcall.args));
93 self->simcall.args[0].dp = (void*) host;
94 if (self != simix_global->maestro_process) {
95 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
96 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
97 SIMIX_process_yield(self);
99 SIMIX_simcall_handle(&self->simcall, 0);
101 return (xbt_swag_t) self->simcall.result.dp;
104 inline static double simcall_BODY_host_get_current_power_peak(sg_host_t host) {
105 smx_process_t self = SIMIX_process_self();
107 /* Go to that function to follow the code flow through the simcall barrier */
108 if (0) SIMIX_host_get_current_power_peak(host);
109 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
111 self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
112 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
113 memset(self->simcall.args, 0, sizeof(self->simcall.args));
114 self->simcall.args[0].dp = (void*) host;
115 if (self != simix_global->maestro_process) {
116 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
117 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
118 SIMIX_process_yield(self);
120 SIMIX_simcall_handle(&self->simcall, 0);
122 return (double) self->simcall.result.d;
125 inline static double simcall_BODY_host_get_power_peak_at(sg_host_t host, int pstate_index) {
126 smx_process_t self = SIMIX_process_self();
128 /* Go to that function to follow the code flow through the simcall barrier */
129 if (0) SIMIX_host_get_power_peak_at(host, pstate_index);
130 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
132 self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
133 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
134 memset(self->simcall.args, 0, sizeof(self->simcall.args));
135 self->simcall.args[0].dp = (void*) host;
136 self->simcall.args[1].i = (int) pstate_index;
137 if (self != simix_global->maestro_process) {
138 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
139 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
140 SIMIX_process_yield(self);
142 SIMIX_simcall_handle(&self->simcall, 0);
144 return (double) self->simcall.result.d;
147 inline static double simcall_BODY_host_get_wattmin_at(sg_host_t host, int pstate_index) {
148 smx_process_t self = SIMIX_process_self();
150 /* Go to that function to follow the code flow through the simcall barrier */
151 if (0) SIMIX_host_get_wattmin_at(host, pstate_index);
152 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
154 self->simcall.call = SIMCALL_HOST_GET_WATTMIN_AT;
155 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
156 memset(self->simcall.args, 0, sizeof(self->simcall.args));
157 self->simcall.args[0].dp = (void*) host;
158 self->simcall.args[1].i = (int) pstate_index;
159 if (self != simix_global->maestro_process) {
160 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
161 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
162 SIMIX_process_yield(self);
164 SIMIX_simcall_handle(&self->simcall, 0);
166 return (double) self->simcall.result.d;
169 inline static double simcall_BODY_host_get_wattmax_at(sg_host_t host, int pstate_index) {
170 smx_process_t self = SIMIX_process_self();
172 /* Go to that function to follow the code flow through the simcall barrier */
173 if (0) SIMIX_host_get_wattmax_at(host, pstate_index);
174 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
176 self->simcall.call = SIMCALL_HOST_GET_WATTMAX_AT;
177 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
178 memset(self->simcall.args, 0, sizeof(self->simcall.args));
179 self->simcall.args[0].dp = (void*) host;
180 self->simcall.args[1].i = (int) pstate_index;
181 if (self != simix_global->maestro_process) {
182 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
183 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
184 SIMIX_process_yield(self);
186 SIMIX_simcall_handle(&self->simcall, 0);
188 return (double) self->simcall.result.d;
191 inline static void simcall_BODY_host_set_pstate(sg_host_t host, int pstate_index) {
192 smx_process_t self = SIMIX_process_self();
194 /* Go to that function to follow the code flow through the simcall barrier */
195 if (0) SIMIX_host_set_pstate(host, pstate_index);
196 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
198 self->simcall.call = SIMCALL_HOST_SET_PSTATE;
199 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
200 memset(self->simcall.args, 0, sizeof(self->simcall.args));
201 self->simcall.args[0].dp = (void*) host;
202 self->simcall.args[1].i = (int) pstate_index;
203 if (self != simix_global->maestro_process) {
204 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
205 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
206 SIMIX_process_yield(self);
208 SIMIX_simcall_handle(&self->simcall, 0);
213 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(sg_host_t host) {
214 smx_process_t self = SIMIX_process_self();
216 /* Go to that function to follow the code flow through the simcall barrier */
217 if (0) SIMIX_host_get_mounted_storage_list(host);
218 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
220 self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
221 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
222 memset(self->simcall.args, 0, sizeof(self->simcall.args));
223 self->simcall.args[0].dp = (void*) host;
224 if (self != simix_global->maestro_process) {
225 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
226 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
227 SIMIX_process_yield(self);
229 SIMIX_simcall_handle(&self->simcall, 0);
231 return (xbt_dict_t) self->simcall.result.dp;
234 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(sg_host_t host) {
235 smx_process_t self = SIMIX_process_self();
237 /* Go to that function to follow the code flow through the simcall barrier */
238 if (0) SIMIX_host_get_attached_storage_list(host);
239 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
241 self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
242 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
243 memset(self->simcall.args, 0, sizeof(self->simcall.args));
244 self->simcall.args[0].dp = (void*) host;
245 if (self != simix_global->maestro_process) {
246 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
247 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
248 SIMIX_process_yield(self);
250 SIMIX_simcall_handle(&self->simcall, 0);
252 return (xbt_dynar_t) self->simcall.result.dp;
255 inline static void simcall_BODY_host_get_params(sg_host_t ind_vm, vm_params_t params) {
256 smx_process_t self = SIMIX_process_self();
258 /* Go to that function to follow the code flow through the simcall barrier */
259 if (0) SIMIX_host_get_params(ind_vm, params);
260 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
262 self->simcall.call = SIMCALL_HOST_GET_PARAMS;
263 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
264 memset(self->simcall.args, 0, sizeof(self->simcall.args));
265 self->simcall.args[0].dp = (void*) ind_vm;
266 self->simcall.args[1].dp = (void*) params;
267 if (self != simix_global->maestro_process) {
268 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
269 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
270 SIMIX_process_yield(self);
272 SIMIX_simcall_handle(&self->simcall, 0);
277 inline static void simcall_BODY_host_set_params(sg_host_t ind_vm, vm_params_t params) {
278 smx_process_t self = SIMIX_process_self();
280 /* Go to that function to follow the code flow through the simcall barrier */
281 if (0) SIMIX_host_set_params(ind_vm, params);
282 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
284 self->simcall.call = SIMCALL_HOST_SET_PARAMS;
285 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
286 memset(self->simcall.args, 0, sizeof(self->simcall.args));
287 self->simcall.args[0].dp = (void*) ind_vm;
288 self->simcall.args[1].dp = (void*) params;
289 if (self != simix_global->maestro_process) {
290 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
291 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
292 SIMIX_process_yield(self);
294 SIMIX_simcall_handle(&self->simcall, 0);
299 inline static sg_host_t simcall_BODY_vm_create(const char* name, sg_host_t ind_pm) {
300 smx_process_t self = SIMIX_process_self();
302 /* Go to that function to follow the code flow through the simcall barrier */
303 if (0) SIMIX_vm_create(name, ind_pm);
304 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
306 self->simcall.call = SIMCALL_VM_CREATE;
307 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
308 memset(self->simcall.args, 0, sizeof(self->simcall.args));
309 self->simcall.args[0].cc = (const char*) name;
310 self->simcall.args[1].dp = (void*) ind_pm;
311 if (self != simix_global->maestro_process) {
312 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
313 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
314 SIMIX_process_yield(self);
316 SIMIX_simcall_handle(&self->simcall, 0);
318 return (sg_host_t) self->simcall.result.dp;
321 inline static void simcall_BODY_vm_start(sg_host_t ind_vm) {
322 smx_process_t self = SIMIX_process_self();
324 /* Go to that function to follow the code flow through the simcall barrier */
325 if (0) SIMIX_vm_start(ind_vm);
326 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
328 self->simcall.call = SIMCALL_VM_START;
329 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
330 memset(self->simcall.args, 0, sizeof(self->simcall.args));
331 self->simcall.args[0].dp = (void*) ind_vm;
332 if (self != simix_global->maestro_process) {
333 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
334 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
335 SIMIX_process_yield(self);
337 SIMIX_simcall_handle(&self->simcall, 0);
342 inline static int simcall_BODY_vm_get_state(sg_host_t ind_vm) {
343 smx_process_t self = SIMIX_process_self();
345 /* Go to that function to follow the code flow through the simcall barrier */
346 if (0) SIMIX_vm_get_state(ind_vm);
347 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
349 self->simcall.call = SIMCALL_VM_GET_STATE;
350 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
351 memset(self->simcall.args, 0, sizeof(self->simcall.args));
352 self->simcall.args[0].dp = (void*) ind_vm;
353 if (self != simix_global->maestro_process) {
354 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
355 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
356 SIMIX_process_yield(self);
358 SIMIX_simcall_handle(&self->simcall, 0);
360 return (int) self->simcall.result.i;
363 inline static void simcall_BODY_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) {
364 smx_process_t self = SIMIX_process_self();
366 /* Go to that function to follow the code flow through the simcall barrier */
367 if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
368 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
370 self->simcall.call = SIMCALL_VM_MIGRATE;
371 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
372 memset(self->simcall.args, 0, sizeof(self->simcall.args));
373 self->simcall.args[0].dp = (void*) ind_vm;
374 self->simcall.args[1].dp = (void*) ind_dst_pm;
375 if (self != simix_global->maestro_process) {
376 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
377 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
378 SIMIX_process_yield(self);
380 SIMIX_simcall_handle(&self->simcall, 0);
385 inline static void* simcall_BODY_vm_get_pm(sg_host_t ind_vm) {
386 smx_process_t self = SIMIX_process_self();
388 /* Go to that function to follow the code flow through the simcall barrier */
389 if (0) SIMIX_vm_get_pm(ind_vm);
390 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
392 self->simcall.call = SIMCALL_VM_GET_PM;
393 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
394 memset(self->simcall.args, 0, sizeof(self->simcall.args));
395 self->simcall.args[0].dp = (void*) ind_vm;
396 if (self != simix_global->maestro_process) {
397 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
398 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
399 SIMIX_process_yield(self);
401 SIMIX_simcall_handle(&self->simcall, 0);
403 return (void*) self->simcall.result.dp;
406 inline static void simcall_BODY_vm_set_bound(sg_host_t ind_vm, double bound) {
407 smx_process_t self = SIMIX_process_self();
409 /* Go to that function to follow the code flow through the simcall barrier */
410 if (0) SIMIX_vm_set_bound(ind_vm, bound);
411 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
413 self->simcall.call = SIMCALL_VM_SET_BOUND;
414 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
415 memset(self->simcall.args, 0, sizeof(self->simcall.args));
416 self->simcall.args[0].dp = (void*) ind_vm;
417 self->simcall.args[1].d = (double) bound;
418 if (self != simix_global->maestro_process) {
419 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
420 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
421 SIMIX_process_yield(self);
423 SIMIX_simcall_handle(&self->simcall, 0);
428 inline static void simcall_BODY_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) {
429 smx_process_t self = SIMIX_process_self();
431 /* Go to that function to follow the code flow through the simcall barrier */
432 if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
433 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
435 self->simcall.call = SIMCALL_VM_SET_AFFINITY;
436 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
437 memset(self->simcall.args, 0, sizeof(self->simcall.args));
438 self->simcall.args[0].dp = (void*) ind_vm;
439 self->simcall.args[1].dp = (void*) ind_pm;
440 self->simcall.args[2].ul = (unsigned long) mask;
441 if (self != simix_global->maestro_process) {
442 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
443 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
444 SIMIX_process_yield(self);
446 SIMIX_simcall_handle(&self->simcall, 0);
451 inline static void simcall_BODY_vm_destroy(sg_host_t ind_vm) {
452 smx_process_t self = SIMIX_process_self();
454 /* Go to that function to follow the code flow through the simcall barrier */
455 if (0) SIMIX_vm_destroy(ind_vm);
456 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
458 self->simcall.call = SIMCALL_VM_DESTROY;
459 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
460 memset(self->simcall.args, 0, sizeof(self->simcall.args));
461 self->simcall.args[0].dp = (void*) ind_vm;
462 if (self != simix_global->maestro_process) {
463 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
464 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
465 SIMIX_process_yield(self);
467 SIMIX_simcall_handle(&self->simcall, 0);
472 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
473 smx_process_t self = SIMIX_process_self();
475 /* Go to that function to follow the code flow through the simcall barrier */
476 if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
477 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
479 self->simcall.call = SIMCALL_VM_SUSPEND;
480 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
481 memset(self->simcall.args, 0, sizeof(self->simcall.args));
482 self->simcall.args[0].dp = (void*) ind_vm;
483 if (self != simix_global->maestro_process) {
484 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
485 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
486 SIMIX_process_yield(self);
488 SIMIX_simcall_handle(&self->simcall, 0);
493 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
494 smx_process_t self = SIMIX_process_self();
496 /* Go to that function to follow the code flow through the simcall barrier */
497 if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
498 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
500 self->simcall.call = SIMCALL_VM_RESUME;
501 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
502 memset(self->simcall.args, 0, sizeof(self->simcall.args));
503 self->simcall.args[0].dp = (void*) ind_vm;
504 if (self != simix_global->maestro_process) {
505 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
506 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
507 SIMIX_process_yield(self);
509 SIMIX_simcall_handle(&self->simcall, 0);
514 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
515 smx_process_t self = SIMIX_process_self();
517 /* Go to that function to follow the code flow through the simcall barrier */
518 if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
519 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
521 self->simcall.call = SIMCALL_VM_SHUTDOWN;
522 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
523 memset(self->simcall.args, 0, sizeof(self->simcall.args));
524 self->simcall.args[0].dp = (void*) ind_vm;
525 if (self != simix_global->maestro_process) {
526 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
527 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
528 SIMIX_process_yield(self);
530 SIMIX_simcall_handle(&self->simcall, 0);
535 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
536 smx_process_t self = SIMIX_process_self();
538 /* Go to that function to follow the code flow through the simcall barrier */
539 if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
540 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
542 self->simcall.call = SIMCALL_VM_SAVE;
543 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
544 memset(self->simcall.args, 0, sizeof(self->simcall.args));
545 self->simcall.args[0].dp = (void*) ind_vm;
546 if (self != simix_global->maestro_process) {
547 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
548 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
549 SIMIX_process_yield(self);
551 SIMIX_simcall_handle(&self->simcall, 0);
556 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
557 smx_process_t self = SIMIX_process_self();
559 /* Go to that function to follow the code flow through the simcall barrier */
560 if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
561 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
563 self->simcall.call = SIMCALL_VM_RESTORE;
564 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
565 memset(self->simcall.args, 0, sizeof(self->simcall.args));
566 self->simcall.args[0].dp = (void*) ind_vm;
567 if (self != simix_global->maestro_process) {
568 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
569 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
570 SIMIX_process_yield(self);
572 SIMIX_simcall_handle(&self->simcall, 0);
577 inline static void simcall_BODY_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) {
578 smx_process_t self = SIMIX_process_self();
580 /* Go to that function to follow the code flow through the simcall barrier */
581 if (0) SIMIX_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
582 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
584 self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO;
585 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
586 memset(self->simcall.args, 0, sizeof(self->simcall.args));
587 self->simcall.args[0].dp = (void*) vm;
588 self->simcall.args[1].dp = (void*) src_pm;
589 self->simcall.args[2].dp = (void*) dst_pm;
590 if (self != simix_global->maestro_process) {
591 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
592 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
593 SIMIX_process_yield(self);
595 SIMIX_simcall_handle(&self->simcall, 0);
600 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) {
601 smx_process_t self = SIMIX_process_self();
603 /* Go to that function to follow the code flow through the simcall barrier */
604 if (0) simcall_HANDLER_process_create(&self->simcall, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
605 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
607 self->simcall.call = SIMCALL_PROCESS_CREATE;
608 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
609 memset(self->simcall.args, 0, sizeof(self->simcall.args));
610 self->simcall.args[0].cc = (const char*) name;
611 self->simcall.args[1].fp = (FPtr) code;
612 self->simcall.args[2].dp = (void*) data;
613 self->simcall.args[3].cc = (const char*) hostname;
614 self->simcall.args[4].d = (double) kill_time;
615 self->simcall.args[5].i = (int) argc;
616 self->simcall.args[6].dp = (void*) argv;
617 self->simcall.args[7].dp = (void*) properties;
618 self->simcall.args[8].i = (int) auto_restart;
619 if (self != simix_global->maestro_process) {
620 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
621 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
622 SIMIX_process_yield(self);
624 SIMIX_simcall_handle(&self->simcall, 0);
626 return (void*) self->simcall.result.dp;
629 inline static void simcall_BODY_process_kill(smx_process_t process) {
630 smx_process_t self = SIMIX_process_self();
632 /* Go to that function to follow the code flow through the simcall barrier */
633 if (0) simcall_HANDLER_process_kill(&self->simcall, process);
634 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
636 self->simcall.call = SIMCALL_PROCESS_KILL;
637 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
638 memset(self->simcall.args, 0, sizeof(self->simcall.args));
639 self->simcall.args[0].dp = (void*) process;
640 if (self != simix_global->maestro_process) {
641 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
642 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
643 SIMIX_process_yield(self);
645 SIMIX_simcall_handle(&self->simcall, 0);
650 inline static void simcall_BODY_process_killall(int reset_pid) {
651 smx_process_t self = SIMIX_process_self();
653 /* Go to that function to follow the code flow through the simcall barrier */
654 if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
655 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
657 self->simcall.call = SIMCALL_PROCESS_KILLALL;
658 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
659 memset(self->simcall.args, 0, sizeof(self->simcall.args));
660 self->simcall.args[0].i = (int) reset_pid;
661 if (self != simix_global->maestro_process) {
662 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
663 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
664 SIMIX_process_yield(self);
666 SIMIX_simcall_handle(&self->simcall, 0);
671 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
672 smx_process_t self = SIMIX_process_self();
674 /* Go to that function to follow the code flow through the simcall barrier */
675 if (0) SIMIX_process_cleanup(process);
676 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
678 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
679 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
680 memset(self->simcall.args, 0, sizeof(self->simcall.args));
681 self->simcall.args[0].dp = (void*) process;
682 if (self != simix_global->maestro_process) {
683 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
684 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
685 SIMIX_process_yield(self);
687 SIMIX_simcall_handle(&self->simcall, 0);
692 inline static void simcall_BODY_process_suspend(smx_process_t process) {
693 smx_process_t self = SIMIX_process_self();
695 /* Go to that function to follow the code flow through the simcall barrier */
696 if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
697 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
699 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
700 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
701 memset(self->simcall.args, 0, sizeof(self->simcall.args));
702 self->simcall.args[0].dp = (void*) process;
703 if (self != simix_global->maestro_process) {
704 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
705 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
706 SIMIX_process_yield(self);
708 SIMIX_simcall_handle(&self->simcall, 0);
713 inline static void simcall_BODY_process_resume(smx_process_t process) {
714 smx_process_t self = SIMIX_process_self();
716 /* Go to that function to follow the code flow through the simcall barrier */
717 if (0) simcall_HANDLER_process_resume(&self->simcall, process);
718 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
720 self->simcall.call = SIMCALL_PROCESS_RESUME;
721 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
722 memset(self->simcall.args, 0, sizeof(self->simcall.args));
723 self->simcall.args[0].dp = (void*) process;
724 if (self != simix_global->maestro_process) {
725 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
726 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
727 SIMIX_process_yield(self);
729 SIMIX_simcall_handle(&self->simcall, 0);
734 inline static int simcall_BODY_process_count() {
735 smx_process_t self = SIMIX_process_self();
737 /* Go to that function to follow the code flow through the simcall barrier */
738 if (0) SIMIX_process_count();
739 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
741 self->simcall.call = SIMCALL_PROCESS_COUNT;
742 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
743 memset(self->simcall.args, 0, sizeof(self->simcall.args));
745 if (self != simix_global->maestro_process) {
746 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
747 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
748 SIMIX_process_yield(self);
750 SIMIX_simcall_handle(&self->simcall, 0);
752 return (int) self->simcall.result.i;
755 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
756 smx_process_t self = SIMIX_process_self();
758 /* Go to that function to follow the code flow through the simcall barrier */
759 if (0) SIMIX_process_get_PID(process);
760 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
762 self->simcall.call = SIMCALL_PROCESS_GET_PID;
763 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
764 memset(self->simcall.args, 0, sizeof(self->simcall.args));
765 self->simcall.args[0].dp = (void*) process;
766 if (self != simix_global->maestro_process) {
767 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
768 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
769 SIMIX_process_yield(self);
771 SIMIX_simcall_handle(&self->simcall, 0);
773 return (int) self->simcall.result.i;
776 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
777 smx_process_t self = SIMIX_process_self();
779 /* Go to that function to follow the code flow through the simcall barrier */
780 if (0) SIMIX_process_get_PPID(process);
781 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
783 self->simcall.call = SIMCALL_PROCESS_GET_PPID;
784 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
785 memset(self->simcall.args, 0, sizeof(self->simcall.args));
786 self->simcall.args[0].dp = (void*) process;
787 if (self != simix_global->maestro_process) {
788 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
789 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
790 SIMIX_process_yield(self);
792 SIMIX_simcall_handle(&self->simcall, 0);
794 return (int) self->simcall.result.i;
797 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
798 smx_process_t self = SIMIX_process_self();
800 /* Go to that function to follow the code flow through the simcall barrier */
801 if (0) SIMIX_process_get_data(process);
802 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
804 self->simcall.call = SIMCALL_PROCESS_GET_DATA;
805 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
806 memset(self->simcall.args, 0, sizeof(self->simcall.args));
807 self->simcall.args[0].dp = (void*) process;
808 if (self != simix_global->maestro_process) {
809 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
810 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
811 SIMIX_process_yield(self);
813 SIMIX_simcall_handle(&self->simcall, 0);
815 return (void*) self->simcall.result.dp;
818 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
819 smx_process_t self = SIMIX_process_self();
821 /* Go to that function to follow the code flow through the simcall barrier */
822 if (0) SIMIX_process_set_data(process, data);
823 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
825 self->simcall.call = SIMCALL_PROCESS_SET_DATA;
826 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
827 memset(self->simcall.args, 0, sizeof(self->simcall.args));
828 self->simcall.args[0].dp = (void*) process;
829 self->simcall.args[1].dp = (void*) data;
830 if (self != simix_global->maestro_process) {
831 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
832 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
833 SIMIX_process_yield(self);
835 SIMIX_simcall_handle(&self->simcall, 0);
840 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
841 smx_process_t self = SIMIX_process_self();
843 /* Go to that function to follow the code flow through the simcall barrier */
844 if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
845 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
847 self->simcall.call = SIMCALL_PROCESS_SET_HOST;
848 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
849 memset(self->simcall.args, 0, sizeof(self->simcall.args));
850 self->simcall.args[0].dp = (void*) process;
851 self->simcall.args[1].dp = (void*) dest;
852 if (self != simix_global->maestro_process) {
853 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
854 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
855 SIMIX_process_yield(self);
857 SIMIX_simcall_handle(&self->simcall, 0);
862 inline static sg_host_t simcall_BODY_process_get_host(smx_process_t process) {
863 smx_process_t self = SIMIX_process_self();
865 /* Go to that function to follow the code flow through the simcall barrier */
866 if (0) SIMIX_process_get_host(process);
867 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
869 self->simcall.call = SIMCALL_PROCESS_GET_HOST;
870 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
871 memset(self->simcall.args, 0, sizeof(self->simcall.args));
872 self->simcall.args[0].dp = (void*) process;
873 if (self != simix_global->maestro_process) {
874 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
875 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
876 SIMIX_process_yield(self);
878 SIMIX_simcall_handle(&self->simcall, 0);
880 return (sg_host_t) self->simcall.result.dp;
883 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
884 smx_process_t self = SIMIX_process_self();
886 /* Go to that function to follow the code flow through the simcall barrier */
887 if (0) SIMIX_process_get_name(process);
888 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
890 self->simcall.call = SIMCALL_PROCESS_GET_NAME;
891 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
892 memset(self->simcall.args, 0, sizeof(self->simcall.args));
893 self->simcall.args[0].dp = (void*) process;
894 if (self != simix_global->maestro_process) {
895 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
896 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
897 SIMIX_process_yield(self);
899 SIMIX_simcall_handle(&self->simcall, 0);
901 return (const char*) self->simcall.result.cc;
904 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
905 smx_process_t self = SIMIX_process_self();
907 /* Go to that function to follow the code flow through the simcall barrier */
908 if (0) SIMIX_process_is_suspended(process);
909 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
911 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
912 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
913 memset(self->simcall.args, 0, sizeof(self->simcall.args));
914 self->simcall.args[0].dp = (void*) process;
915 if (self != simix_global->maestro_process) {
916 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
917 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
918 SIMIX_process_yield(self);
920 SIMIX_simcall_handle(&self->simcall, 0);
922 return (int) self->simcall.result.i;
925 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
926 smx_process_t self = SIMIX_process_self();
928 /* Go to that function to follow the code flow through the simcall barrier */
929 if (0) SIMIX_process_get_properties(process);
930 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
932 self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
933 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
934 memset(self->simcall.args, 0, sizeof(self->simcall.args));
935 self->simcall.args[0].dp = (void*) process;
936 if (self != simix_global->maestro_process) {
937 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
938 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
939 SIMIX_process_yield(self);
941 SIMIX_simcall_handle(&self->simcall, 0);
943 return (xbt_dict_t) self->simcall.result.dp;
946 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
947 smx_process_t self = SIMIX_process_self();
949 /* Go to that function to follow the code flow through the simcall barrier */
950 if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
951 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
953 self->simcall.call = SIMCALL_PROCESS_JOIN;
954 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
955 memset(self->simcall.args, 0, sizeof(self->simcall.args));
956 self->simcall.args[0].dp = (void*) process;
957 self->simcall.args[1].d = (double) timeout;
958 if (self != simix_global->maestro_process) {
959 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
960 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
961 SIMIX_process_yield(self);
963 SIMIX_simcall_handle(&self->simcall, 0);
965 return (int) self->simcall.result.i;
968 inline static int simcall_BODY_process_sleep(double duration) {
969 smx_process_t self = SIMIX_process_self();
971 /* Go to that function to follow the code flow through the simcall barrier */
972 if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
973 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
975 self->simcall.call = SIMCALL_PROCESS_SLEEP;
976 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
977 memset(self->simcall.args, 0, sizeof(self->simcall.args));
978 self->simcall.args[0].d = (double) duration;
979 if (self != simix_global->maestro_process) {
980 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
981 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
982 SIMIX_process_yield(self);
984 SIMIX_simcall_handle(&self->simcall, 0);
986 return (int) self->simcall.result.i;
989 inline static smx_synchro_t simcall_BODY_process_execute(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
990 smx_process_t self = SIMIX_process_self();
992 /* Go to that function to follow the code flow through the simcall barrier */
993 if (0) simcall_HANDLER_process_execute(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
994 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
996 self->simcall.call = SIMCALL_PROCESS_EXECUTE;
997 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
998 memset(self->simcall.args, 0, sizeof(self->simcall.args));
999 self->simcall.args[0].cc = (const char*) name;
1000 self->simcall.args[1].d = (double) flops_amount;
1001 self->simcall.args[2].d = (double) priority;
1002 self->simcall.args[3].d = (double) bound;
1003 self->simcall.args[4].ul = (unsigned long) affinity_mask;
1004 if (self != simix_global->maestro_process) {
1005 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1006 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1007 SIMIX_process_yield(self);
1009 SIMIX_simcall_handle(&self->simcall, 0);
1011 return (smx_synchro_t) self->simcall.result.dp;
1014 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) {
1015 smx_process_t self = SIMIX_process_self();
1017 /* Go to that function to follow the code flow through the simcall barrier */
1018 if (0) SIMIX_process_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
1019 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1021 self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
1022 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1023 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1024 self->simcall.args[0].cc = (const char*) name;
1025 self->simcall.args[1].i = (int) host_nb;
1026 self->simcall.args[2].dp = (void*) host_list;
1027 self->simcall.args[3].dp = (void*) flops_amount;
1028 self->simcall.args[4].dp = (void*) bytes_amount;
1029 self->simcall.args[5].d = (double) amount;
1030 self->simcall.args[6].d = (double) rate;
1031 if (self != simix_global->maestro_process) {
1032 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1033 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1034 SIMIX_process_yield(self);
1036 SIMIX_simcall_handle(&self->simcall, 0);
1038 return (smx_synchro_t) self->simcall.result.dp;
1041 inline static void simcall_BODY_process_execution_destroy(smx_synchro_t execution) {
1042 smx_process_t self = SIMIX_process_self();
1044 /* Go to that function to follow the code flow through the simcall barrier */
1045 if (0) SIMIX_process_execution_destroy(execution);
1046 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1048 self->simcall.call = SIMCALL_PROCESS_EXECUTION_DESTROY;
1049 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1050 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1051 self->simcall.args[0].dp = (void*) execution;
1052 if (self != simix_global->maestro_process) {
1053 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1054 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1055 SIMIX_process_yield(self);
1057 SIMIX_simcall_handle(&self->simcall, 0);
1062 inline static void simcall_BODY_process_execution_cancel(smx_synchro_t execution) {
1063 smx_process_t self = SIMIX_process_self();
1065 /* Go to that function to follow the code flow through the simcall barrier */
1066 if (0) SIMIX_process_execution_cancel(execution);
1067 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1069 self->simcall.call = SIMCALL_PROCESS_EXECUTION_CANCEL;
1070 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1071 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1072 self->simcall.args[0].dp = (void*) execution;
1073 if (self != simix_global->maestro_process) {
1074 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1075 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1076 SIMIX_process_yield(self);
1078 SIMIX_simcall_handle(&self->simcall, 0);
1083 inline static double simcall_BODY_process_execution_get_remains(smx_synchro_t execution) {
1084 smx_process_t self = SIMIX_process_self();
1086 /* Go to that function to follow the code flow through the simcall barrier */
1087 if (0) SIMIX_process_execution_get_remains(execution);
1088 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1090 self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_REMAINS;
1091 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1092 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1093 self->simcall.args[0].dp = (void*) execution;
1094 if (self != simix_global->maestro_process) {
1095 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1096 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1097 SIMIX_process_yield(self);
1099 SIMIX_simcall_handle(&self->simcall, 0);
1101 return (double) self->simcall.result.d;
1104 inline static e_smx_state_t simcall_BODY_process_execution_get_state(smx_synchro_t execution) {
1105 smx_process_t self = SIMIX_process_self();
1107 /* Go to that function to follow the code flow through the simcall barrier */
1108 if (0) SIMIX_process_execution_get_state(execution);
1109 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1111 self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_STATE;
1112 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1113 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1114 self->simcall.args[0].dp = (void*) execution;
1115 if (self != simix_global->maestro_process) {
1116 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1117 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1118 SIMIX_process_yield(self);
1120 SIMIX_simcall_handle(&self->simcall, 0);
1122 return (e_smx_state_t) self->simcall.result.i;
1125 inline static void simcall_BODY_process_execution_set_priority(smx_synchro_t execution, double priority) {
1126 smx_process_t self = SIMIX_process_self();
1128 /* Go to that function to follow the code flow through the simcall barrier */
1129 if (0) SIMIX_process_execution_set_priority(execution, priority);
1130 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1132 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_PRIORITY;
1133 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1134 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1135 self->simcall.args[0].dp = (void*) execution;
1136 self->simcall.args[1].d = (double) priority;
1137 if (self != simix_global->maestro_process) {
1138 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1139 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1140 SIMIX_process_yield(self);
1142 SIMIX_simcall_handle(&self->simcall, 0);
1147 inline static void simcall_BODY_process_execution_set_bound(smx_synchro_t execution, double bound) {
1148 smx_process_t self = SIMIX_process_self();
1150 /* Go to that function to follow the code flow through the simcall barrier */
1151 if (0) SIMIX_process_execution_set_bound(execution, bound);
1152 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1154 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_BOUND;
1155 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1156 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1157 self->simcall.args[0].dp = (void*) execution;
1158 self->simcall.args[1].d = (double) bound;
1159 if (self != simix_global->maestro_process) {
1160 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1161 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1162 SIMIX_process_yield(self);
1164 SIMIX_simcall_handle(&self->simcall, 0);
1169 inline static void simcall_BODY_process_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
1170 smx_process_t self = SIMIX_process_self();
1172 /* Go to that function to follow the code flow through the simcall barrier */
1173 if (0) SIMIX_process_execution_set_affinity(execution, ws, mask);
1174 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1176 self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_AFFINITY;
1177 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1178 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1179 self->simcall.args[0].dp = (void*) execution;
1180 self->simcall.args[1].dp = (void*) ws;
1181 self->simcall.args[2].ul = (unsigned long) mask;
1182 if (self != simix_global->maestro_process) {
1183 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1184 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1185 SIMIX_process_yield(self);
1187 SIMIX_simcall_handle(&self->simcall, 0);
1192 inline static int simcall_BODY_process_execution_wait(smx_synchro_t execution) {
1193 smx_process_t self = SIMIX_process_self();
1195 /* Go to that function to follow the code flow through the simcall barrier */
1196 if (0) simcall_HANDLER_process_execution_wait(&self->simcall, execution);
1197 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1199 self->simcall.call = SIMCALL_PROCESS_EXECUTION_WAIT;
1200 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1201 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1202 self->simcall.args[0].dp = (void*) execution;
1203 if (self != simix_global->maestro_process) {
1204 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1205 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1206 SIMIX_process_yield(self);
1208 SIMIX_simcall_handle(&self->simcall, 0);
1210 return (int) self->simcall.result.i;
1213 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1214 smx_process_t self = SIMIX_process_self();
1216 /* Go to that function to follow the code flow through the simcall barrier */
1217 if (0) SIMIX_process_on_exit(process, fun, data);
1218 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1220 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1221 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1222 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1223 self->simcall.args[0].dp = (void*) process;
1224 self->simcall.args[1].fp = (FPtr) fun;
1225 self->simcall.args[2].dp = (void*) data;
1226 if (self != simix_global->maestro_process) {
1227 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1228 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1229 SIMIX_process_yield(self);
1231 SIMIX_simcall_handle(&self->simcall, 0);
1236 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
1237 smx_process_t self = SIMIX_process_self();
1239 /* Go to that function to follow the code flow through the simcall barrier */
1240 if (0) SIMIX_process_auto_restart_set(process, auto_restart);
1241 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1243 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
1244 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1245 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1246 self->simcall.args[0].dp = (void*) process;
1247 self->simcall.args[1].i = (int) auto_restart;
1248 if (self != simix_global->maestro_process) {
1249 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1250 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1251 SIMIX_process_yield(self);
1253 SIMIX_simcall_handle(&self->simcall, 0);
1258 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1259 smx_process_t self = SIMIX_process_self();
1261 /* Go to that function to follow the code flow through the simcall barrier */
1262 if (0) simcall_HANDLER_process_restart(&self->simcall, process);
1263 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1265 self->simcall.call = SIMCALL_PROCESS_RESTART;
1266 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1267 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1268 self->simcall.args[0].dp = (void*) process;
1269 if (self != simix_global->maestro_process) {
1270 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1271 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1272 SIMIX_process_yield(self);
1274 SIMIX_simcall_handle(&self->simcall, 0);
1276 return (smx_process_t) self->simcall.result.dp;
1279 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1280 smx_process_t self = SIMIX_process_self();
1282 /* Go to that function to follow the code flow through the simcall barrier */
1283 if (0) SIMIX_rdv_create(name);
1284 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1286 self->simcall.call = SIMCALL_RDV_CREATE;
1287 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1288 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1289 self->simcall.args[0].cc = (const char*) name;
1290 if (self != simix_global->maestro_process) {
1291 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1292 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1293 SIMIX_process_yield(self);
1295 SIMIX_simcall_handle(&self->simcall, 0);
1297 return (smx_rdv_t) self->simcall.result.dp;
1300 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1301 smx_process_t self = SIMIX_process_self();
1303 /* Go to that function to follow the code flow through the simcall barrier */
1304 if (0) SIMIX_rdv_destroy(rdv);
1305 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1307 self->simcall.call = SIMCALL_RDV_DESTROY;
1308 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1309 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1310 self->simcall.args[0].dp = (void*) rdv;
1311 if (self != simix_global->maestro_process) {
1312 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1313 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1314 SIMIX_process_yield(self);
1316 SIMIX_simcall_handle(&self->simcall, 0);
1321 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) {
1322 smx_process_t self = SIMIX_process_self();
1324 /* Go to that function to follow the code flow through the simcall barrier */
1325 if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
1326 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1328 self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1329 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1330 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1331 self->simcall.args[0].dp = (void*) rdv;
1332 self->simcall.args[1].dp = (void*) host;
1333 if (self != simix_global->maestro_process) {
1334 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1335 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1336 SIMIX_process_yield(self);
1338 SIMIX_simcall_handle(&self->simcall, 0);
1340 return (unsigned int) self->simcall.result.ui;
1343 inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1344 smx_process_t self = SIMIX_process_self();
1346 /* Go to that function to follow the code flow through the simcall barrier */
1347 if (0) SIMIX_rdv_get_head(rdv);
1348 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1350 self->simcall.call = SIMCALL_RDV_GET_HEAD;
1351 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1352 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1353 self->simcall.args[0].dp = (void*) rdv;
1354 if (self != simix_global->maestro_process) {
1355 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1356 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1357 SIMIX_process_yield(self);
1359 SIMIX_simcall_handle(&self->simcall, 0);
1361 return (smx_synchro_t) self->simcall.result.dp;
1364 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1365 smx_process_t self = SIMIX_process_self();
1367 /* Go to that function to follow the code flow through the simcall barrier */
1368 if (0) SIMIX_rdv_set_receiver(rdv, receiver);
1369 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1371 self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1372 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1373 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1374 self->simcall.args[0].dp = (void*) rdv;
1375 self->simcall.args[1].dp = (void*) receiver;
1376 if (self != simix_global->maestro_process) {
1377 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1378 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1379 SIMIX_process_yield(self);
1381 SIMIX_simcall_handle(&self->simcall, 0);
1386 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1387 smx_process_t self = SIMIX_process_self();
1389 /* Go to that function to follow the code flow through the simcall barrier */
1390 if (0) SIMIX_rdv_get_receiver(rdv);
1391 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1393 self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1394 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1395 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1396 self->simcall.args[0].dp = (void*) rdv;
1397 if (self != simix_global->maestro_process) {
1398 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1399 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1400 SIMIX_process_yield(self);
1402 SIMIX_simcall_handle(&self->simcall, 0);
1404 return (smx_process_t) self->simcall.result.dp;
1407 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) {
1408 smx_process_t self = SIMIX_process_self();
1410 /* Go to that function to follow the code flow through the simcall barrier */
1411 if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1412 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1414 self->simcall.call = SIMCALL_COMM_IPROBE;
1415 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1416 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1417 self->simcall.args[0].dp = (void*) rdv;
1418 self->simcall.args[1].i = (int) type;
1419 self->simcall.args[2].i = (int) src;
1420 self->simcall.args[3].i = (int) tag;
1421 self->simcall.args[4].fp = (FPtr) match_fun;
1422 self->simcall.args[5].dp = (void*) data;
1423 if (self != simix_global->maestro_process) {
1424 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1425 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1426 SIMIX_process_yield(self);
1428 SIMIX_simcall_handle(&self->simcall, 0);
1430 return (smx_synchro_t) self->simcall.result.dp;
1433 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) {
1434 smx_process_t self = SIMIX_process_self();
1436 /* Go to that function to follow the code flow through the simcall barrier */
1437 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);
1438 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1440 self->simcall.call = SIMCALL_COMM_SEND;
1441 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1442 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1443 self->simcall.args[0].dp = (void*) sender;
1444 self->simcall.args[1].dp = (void*) rdv;
1445 self->simcall.args[2].d = (double) task_size;
1446 self->simcall.args[3].d = (double) rate;
1447 self->simcall.args[4].dp = (void*) src_buff;
1448 self->simcall.args[5].sz = (size_t) src_buff_size;
1449 self->simcall.args[6].fp = (FPtr) match_fun;
1450 self->simcall.args[7].fp = (FPtr) copy_data_fun;
1451 self->simcall.args[8].dp = (void*) data;
1452 self->simcall.args[9].d = (double) timeout;
1453 if (self != simix_global->maestro_process) {
1454 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1455 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1456 SIMIX_process_yield(self);
1458 SIMIX_simcall_handle(&self->simcall, 0);
1463 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) {
1464 smx_process_t self = SIMIX_process_self();
1466 /* Go to that function to follow the code flow through the simcall barrier */
1467 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);
1468 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1470 self->simcall.call = SIMCALL_COMM_ISEND;
1471 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1472 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1473 self->simcall.args[0].dp = (void*) sender;
1474 self->simcall.args[1].dp = (void*) rdv;
1475 self->simcall.args[2].d = (double) task_size;
1476 self->simcall.args[3].d = (double) rate;
1477 self->simcall.args[4].dp = (void*) src_buff;
1478 self->simcall.args[5].sz = (size_t) src_buff_size;
1479 self->simcall.args[6].fp = (FPtr) match_fun;
1480 self->simcall.args[7].fp = (FPtr) clean_fun;
1481 self->simcall.args[8].fp = (FPtr) copy_data_fun;
1482 self->simcall.args[9].dp = (void*) data;
1483 self->simcall.args[10].i = (int) detached;
1484 if (self != simix_global->maestro_process) {
1485 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1486 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1487 SIMIX_process_yield(self);
1489 SIMIX_simcall_handle(&self->simcall, 0);
1491 return (smx_synchro_t) self->simcall.result.dp;
1494 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) {
1495 smx_process_t self = SIMIX_process_self();
1497 /* Go to that function to follow the code flow through the simcall barrier */
1498 if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1499 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1501 self->simcall.call = SIMCALL_COMM_RECV;
1502 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1503 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1504 self->simcall.args[0].dp = (void*) receiver;
1505 self->simcall.args[1].dp = (void*) rdv;
1506 self->simcall.args[2].dp = (void*) dst_buff;
1507 self->simcall.args[3].dp = (void*) dst_buff_size;
1508 self->simcall.args[4].fp = (FPtr) match_fun;
1509 self->simcall.args[5].fp = (FPtr) copy_data_fun;
1510 self->simcall.args[6].dp = (void*) data;
1511 self->simcall.args[7].d = (double) timeout;
1512 self->simcall.args[8].d = (double) rate;
1513 if (self != simix_global->maestro_process) {
1514 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1515 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1516 SIMIX_process_yield(self);
1518 SIMIX_simcall_handle(&self->simcall, 0);
1523 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) {
1524 smx_process_t self = SIMIX_process_self();
1526 /* Go to that function to follow the code flow through the simcall barrier */
1527 if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1528 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1530 self->simcall.call = SIMCALL_COMM_IRECV;
1531 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1532 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1533 self->simcall.args[0].dp = (void*) receiver;
1534 self->simcall.args[1].dp = (void*) rdv;
1535 self->simcall.args[2].dp = (void*) dst_buff;
1536 self->simcall.args[3].dp = (void*) dst_buff_size;
1537 self->simcall.args[4].fp = (FPtr) match_fun;
1538 self->simcall.args[5].fp = (FPtr) copy_data_fun;
1539 self->simcall.args[6].dp = (void*) data;
1540 self->simcall.args[7].d = (double) rate;
1541 if (self != simix_global->maestro_process) {
1542 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1543 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1544 SIMIX_process_yield(self);
1546 SIMIX_simcall_handle(&self->simcall, 0);
1548 return (smx_synchro_t) self->simcall.result.dp;
1551 inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
1552 smx_process_t self = SIMIX_process_self();
1554 /* Go to that function to follow the code flow through the simcall barrier */
1555 if (0) SIMIX_comm_cancel(comm);
1556 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1558 self->simcall.call = SIMCALL_COMM_CANCEL;
1559 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1560 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1561 self->simcall.args[0].dp = (void*) comm;
1562 if (self != simix_global->maestro_process) {
1563 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1564 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1565 SIMIX_process_yield(self);
1567 SIMIX_simcall_handle(&self->simcall, 0);
1572 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1573 smx_process_t self = SIMIX_process_self();
1575 /* Go to that function to follow the code flow through the simcall barrier */
1576 if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
1577 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1579 self->simcall.call = SIMCALL_COMM_WAITANY;
1580 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1581 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1582 self->simcall.args[0].dp = (void*) comms;
1583 if (self != simix_global->maestro_process) {
1584 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1585 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1586 SIMIX_process_yield(self);
1588 SIMIX_simcall_handle(&self->simcall, 0);
1590 return (int) self->simcall.result.i;
1593 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
1594 smx_process_t self = SIMIX_process_self();
1596 /* Go to that function to follow the code flow through the simcall barrier */
1597 if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
1598 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1600 self->simcall.call = SIMCALL_COMM_WAIT;
1601 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1602 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1603 self->simcall.args[0].dp = (void*) comm;
1604 self->simcall.args[1].d = (double) timeout;
1605 if (self != simix_global->maestro_process) {
1606 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1607 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1608 SIMIX_process_yield(self);
1610 SIMIX_simcall_handle(&self->simcall, 0);
1615 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
1616 smx_process_t self = SIMIX_process_self();
1618 /* Go to that function to follow the code flow through the simcall barrier */
1619 if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
1620 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1622 self->simcall.call = SIMCALL_COMM_TEST;
1623 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1624 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1625 self->simcall.args[0].dp = (void*) comm;
1626 if (self != simix_global->maestro_process) {
1627 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1628 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1629 SIMIX_process_yield(self);
1631 SIMIX_simcall_handle(&self->simcall, 0);
1633 return (int) self->simcall.result.i;
1636 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1637 smx_process_t self = SIMIX_process_self();
1639 /* Go to that function to follow the code flow through the simcall barrier */
1640 if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
1641 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1643 self->simcall.call = SIMCALL_COMM_TESTANY;
1644 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1645 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1646 self->simcall.args[0].dp = (void*) comms;
1647 if (self != simix_global->maestro_process) {
1648 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1649 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1650 SIMIX_process_yield(self);
1652 SIMIX_simcall_handle(&self->simcall, 0);
1654 return (int) self->simcall.result.i;
1657 inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
1658 smx_process_t self = SIMIX_process_self();
1660 /* Go to that function to follow the code flow through the simcall barrier */
1661 if (0) SIMIX_comm_get_remains(comm);
1662 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1664 self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1665 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1666 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1667 self->simcall.args[0].dp = (void*) comm;
1668 if (self != simix_global->maestro_process) {
1669 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1670 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1671 SIMIX_process_yield(self);
1673 SIMIX_simcall_handle(&self->simcall, 0);
1675 return (double) self->simcall.result.d;
1678 inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
1679 smx_process_t self = SIMIX_process_self();
1681 /* Go to that function to follow the code flow through the simcall barrier */
1682 if (0) SIMIX_comm_get_state(comm);
1683 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1685 self->simcall.call = SIMCALL_COMM_GET_STATE;
1686 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1687 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1688 self->simcall.args[0].dp = (void*) comm;
1689 if (self != simix_global->maestro_process) {
1690 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1691 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1692 SIMIX_process_yield(self);
1694 SIMIX_simcall_handle(&self->simcall, 0);
1696 return (e_smx_state_t) self->simcall.result.i;
1699 inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
1700 smx_process_t self = SIMIX_process_self();
1702 /* Go to that function to follow the code flow through the simcall barrier */
1703 if (0) SIMIX_comm_get_src_data(comm);
1704 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1706 self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1707 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1708 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1709 self->simcall.args[0].dp = (void*) comm;
1710 if (self != simix_global->maestro_process) {
1711 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1712 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1713 SIMIX_process_yield(self);
1715 SIMIX_simcall_handle(&self->simcall, 0);
1717 return (void*) self->simcall.result.dp;
1720 inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
1721 smx_process_t self = SIMIX_process_self();
1723 /* Go to that function to follow the code flow through the simcall barrier */
1724 if (0) SIMIX_comm_get_dst_data(comm);
1725 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1727 self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1728 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1729 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1730 self->simcall.args[0].dp = (void*) comm;
1731 if (self != simix_global->maestro_process) {
1732 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1733 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1734 SIMIX_process_yield(self);
1736 SIMIX_simcall_handle(&self->simcall, 0);
1738 return (void*) self->simcall.result.dp;
1741 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_synchro_t comm) {
1742 smx_process_t self = SIMIX_process_self();
1744 /* Go to that function to follow the code flow through the simcall barrier */
1745 if (0) SIMIX_comm_get_src_proc(comm);
1746 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1748 self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1749 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1750 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1751 self->simcall.args[0].dp = (void*) comm;
1752 if (self != simix_global->maestro_process) {
1753 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1754 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1755 SIMIX_process_yield(self);
1757 SIMIX_simcall_handle(&self->simcall, 0);
1759 return (smx_process_t) self->simcall.result.dp;
1762 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_synchro_t comm) {
1763 smx_process_t self = SIMIX_process_self();
1765 /* Go to that function to follow the code flow through the simcall barrier */
1766 if (0) SIMIX_comm_get_dst_proc(comm);
1767 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1769 self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1770 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1771 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1772 self->simcall.args[0].dp = (void*) comm;
1773 if (self != simix_global->maestro_process) {
1774 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1775 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1776 SIMIX_process_yield(self);
1778 SIMIX_simcall_handle(&self->simcall, 0);
1780 return (smx_process_t) self->simcall.result.dp;
1783 inline static smx_mutex_t simcall_BODY_mutex_init() {
1784 smx_process_t self = SIMIX_process_self();
1786 /* Go to that function to follow the code flow through the simcall barrier */
1787 if (0) simcall_HANDLER_mutex_init(&self->simcall);
1788 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1790 self->simcall.call = SIMCALL_MUTEX_INIT;
1791 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1792 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1794 if (self != simix_global->maestro_process) {
1795 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1796 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1797 SIMIX_process_yield(self);
1799 SIMIX_simcall_handle(&self->simcall, 0);
1801 return (smx_mutex_t) self->simcall.result.dp;
1804 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1805 smx_process_t self = SIMIX_process_self();
1807 /* Go to that function to follow the code flow through the simcall barrier */
1808 if (0) SIMIX_mutex_destroy(mutex);
1809 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1811 self->simcall.call = SIMCALL_MUTEX_DESTROY;
1812 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1813 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1814 self->simcall.args[0].dp = (void*) mutex;
1815 if (self != simix_global->maestro_process) {
1816 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1817 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1818 SIMIX_process_yield(self);
1820 SIMIX_simcall_handle(&self->simcall, 0);
1825 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1826 smx_process_t self = SIMIX_process_self();
1828 /* Go to that function to follow the code flow through the simcall barrier */
1829 if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
1830 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1832 self->simcall.call = SIMCALL_MUTEX_LOCK;
1833 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1834 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1835 self->simcall.args[0].dp = (void*) mutex;
1836 if (self != simix_global->maestro_process) {
1837 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1838 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1839 SIMIX_process_yield(self);
1841 SIMIX_simcall_handle(&self->simcall, 0);
1846 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1847 smx_process_t self = SIMIX_process_self();
1849 /* Go to that function to follow the code flow through the simcall barrier */
1850 if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
1851 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1853 self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1854 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1855 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1856 self->simcall.args[0].dp = (void*) mutex;
1857 if (self != simix_global->maestro_process) {
1858 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1859 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1860 SIMIX_process_yield(self);
1862 SIMIX_simcall_handle(&self->simcall, 0);
1864 return (int) self->simcall.result.i;
1867 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1868 smx_process_t self = SIMIX_process_self();
1870 /* Go to that function to follow the code flow through the simcall barrier */
1871 if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
1872 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1874 self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1875 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1876 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1877 self->simcall.args[0].dp = (void*) mutex;
1878 if (self != simix_global->maestro_process) {
1879 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1880 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1881 SIMIX_process_yield(self);
1883 SIMIX_simcall_handle(&self->simcall, 0);
1888 inline static smx_cond_t simcall_BODY_cond_init() {
1889 smx_process_t self = SIMIX_process_self();
1891 /* Go to that function to follow the code flow through the simcall barrier */
1892 if (0) SIMIX_cond_init();
1893 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1895 self->simcall.call = SIMCALL_COND_INIT;
1896 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1897 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1899 if (self != simix_global->maestro_process) {
1900 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1901 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1902 SIMIX_process_yield(self);
1904 SIMIX_simcall_handle(&self->simcall, 0);
1906 return (smx_cond_t) self->simcall.result.dp;
1909 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
1910 smx_process_t self = SIMIX_process_self();
1912 /* Go to that function to follow the code flow through the simcall barrier */
1913 if (0) SIMIX_cond_destroy(cond);
1914 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1916 self->simcall.call = SIMCALL_COND_DESTROY;
1917 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1918 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1919 self->simcall.args[0].dp = (void*) cond;
1920 if (self != simix_global->maestro_process) {
1921 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1922 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1923 SIMIX_process_yield(self);
1925 SIMIX_simcall_handle(&self->simcall, 0);
1930 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
1931 smx_process_t self = SIMIX_process_self();
1933 /* Go to that function to follow the code flow through the simcall barrier */
1934 if (0) SIMIX_cond_signal(cond);
1935 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1937 self->simcall.call = SIMCALL_COND_SIGNAL;
1938 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1939 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1940 self->simcall.args[0].dp = (void*) cond;
1941 if (self != simix_global->maestro_process) {
1942 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1943 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1944 SIMIX_process_yield(self);
1946 SIMIX_simcall_handle(&self->simcall, 0);
1951 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
1952 smx_process_t self = SIMIX_process_self();
1954 /* Go to that function to follow the code flow through the simcall barrier */
1955 if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
1956 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1958 self->simcall.call = SIMCALL_COND_WAIT;
1959 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1960 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1961 self->simcall.args[0].dp = (void*) cond;
1962 self->simcall.args[1].dp = (void*) mutex;
1963 if (self != simix_global->maestro_process) {
1964 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1965 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1966 SIMIX_process_yield(self);
1968 SIMIX_simcall_handle(&self->simcall, 0);
1973 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
1974 smx_process_t self = SIMIX_process_self();
1976 /* Go to that function to follow the code flow through the simcall barrier */
1977 if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
1978 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1980 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
1981 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1982 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1983 self->simcall.args[0].dp = (void*) cond;
1984 self->simcall.args[1].dp = (void*) mutex;
1985 self->simcall.args[2].d = (double) timeout;
1986 if (self != simix_global->maestro_process) {
1987 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1988 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1989 SIMIX_process_yield(self);
1991 SIMIX_simcall_handle(&self->simcall, 0);
1996 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1997 smx_process_t self = SIMIX_process_self();
1999 /* Go to that function to follow the code flow through the simcall barrier */
2000 if (0) SIMIX_cond_broadcast(cond);
2001 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2003 self->simcall.call = SIMCALL_COND_BROADCAST;
2004 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2005 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2006 self->simcall.args[0].dp = (void*) cond;
2007 if (self != simix_global->maestro_process) {
2008 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2009 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2010 SIMIX_process_yield(self);
2012 SIMIX_simcall_handle(&self->simcall, 0);
2017 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
2018 smx_process_t self = SIMIX_process_self();
2020 /* Go to that function to follow the code flow through the simcall barrier */
2021 if (0) SIMIX_sem_init(capacity);
2022 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2024 self->simcall.call = SIMCALL_SEM_INIT;
2025 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2026 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2027 self->simcall.args[0].ui = (unsigned int) capacity;
2028 if (self != simix_global->maestro_process) {
2029 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2030 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2031 SIMIX_process_yield(self);
2033 SIMIX_simcall_handle(&self->simcall, 0);
2035 return (smx_sem_t) self->simcall.result.dp;
2038 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2039 smx_process_t self = SIMIX_process_self();
2041 /* Go to that function to follow the code flow through the simcall barrier */
2042 if (0) SIMIX_sem_destroy(sem);
2043 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2045 self->simcall.call = SIMCALL_SEM_DESTROY;
2046 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2047 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2048 self->simcall.args[0].dp = (void*) sem;
2049 if (self != simix_global->maestro_process) {
2050 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2051 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2052 SIMIX_process_yield(self);
2054 SIMIX_simcall_handle(&self->simcall, 0);
2059 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2060 smx_process_t self = SIMIX_process_self();
2062 /* Go to that function to follow the code flow through the simcall barrier */
2063 if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
2064 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2066 self->simcall.call = SIMCALL_SEM_RELEASE;
2067 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2068 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2069 self->simcall.args[0].dp = (void*) sem;
2070 if (self != simix_global->maestro_process) {
2071 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2072 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2073 SIMIX_process_yield(self);
2075 SIMIX_simcall_handle(&self->simcall, 0);
2080 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2081 smx_process_t self = SIMIX_process_self();
2083 /* Go to that function to follow the code flow through the simcall barrier */
2084 if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
2085 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2087 self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2088 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2089 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2090 self->simcall.args[0].dp = (void*) sem;
2091 if (self != simix_global->maestro_process) {
2092 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2093 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2094 SIMIX_process_yield(self);
2096 SIMIX_simcall_handle(&self->simcall, 0);
2098 return (int) self->simcall.result.i;
2101 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2102 smx_process_t self = SIMIX_process_self();
2104 /* Go to that function to follow the code flow through the simcall barrier */
2105 if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
2106 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2108 self->simcall.call = SIMCALL_SEM_ACQUIRE;
2109 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2110 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2111 self->simcall.args[0].dp = (void*) sem;
2112 if (self != simix_global->maestro_process) {
2113 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2114 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2115 SIMIX_process_yield(self);
2117 SIMIX_simcall_handle(&self->simcall, 0);
2122 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2123 smx_process_t self = SIMIX_process_self();
2125 /* Go to that function to follow the code flow through the simcall barrier */
2126 if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
2127 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2129 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2130 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2131 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2132 self->simcall.args[0].dp = (void*) sem;
2133 self->simcall.args[1].d = (double) timeout;
2134 if (self != simix_global->maestro_process) {
2135 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2136 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2137 SIMIX_process_yield(self);
2139 SIMIX_simcall_handle(&self->simcall, 0);
2144 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2145 smx_process_t self = SIMIX_process_self();
2147 /* Go to that function to follow the code flow through the simcall barrier */
2148 if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
2149 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2151 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2152 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2153 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2154 self->simcall.args[0].dp = (void*) sem;
2155 if (self != simix_global->maestro_process) {
2156 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2157 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2158 SIMIX_process_yield(self);
2160 SIMIX_simcall_handle(&self->simcall, 0);
2162 return (int) self->simcall.result.i;
2165 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
2166 smx_process_t self = SIMIX_process_self();
2168 /* Go to that function to follow the code flow through the simcall barrier */
2169 if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
2170 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2172 self->simcall.call = SIMCALL_FILE_READ;
2173 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2174 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2175 self->simcall.args[0].dp = (void*) fd;
2176 self->simcall.args[1].sgsz = (sg_size_t) size;
2177 self->simcall.args[2].dp = (void*) host;
2178 if (self != simix_global->maestro_process) {
2179 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2180 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2181 SIMIX_process_yield(self);
2183 SIMIX_simcall_handle(&self->simcall, 0);
2185 return (sg_size_t) self->simcall.result.sgsz;
2188 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
2189 smx_process_t self = SIMIX_process_self();
2191 /* Go to that function to follow the code flow through the simcall barrier */
2192 if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
2193 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2195 self->simcall.call = SIMCALL_FILE_WRITE;
2196 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2197 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2198 self->simcall.args[0].dp = (void*) fd;
2199 self->simcall.args[1].sgsz = (sg_size_t) size;
2200 self->simcall.args[2].dp = (void*) host;
2201 if (self != simix_global->maestro_process) {
2202 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2203 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2204 SIMIX_process_yield(self);
2206 SIMIX_simcall_handle(&self->simcall, 0);
2208 return (sg_size_t) self->simcall.result.sgsz;
2211 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
2212 smx_process_t self = SIMIX_process_self();
2214 /* Go to that function to follow the code flow through the simcall barrier */
2215 if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
2216 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2218 self->simcall.call = SIMCALL_FILE_OPEN;
2219 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2220 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2221 self->simcall.args[0].cc = (const char*) fullpath;
2222 self->simcall.args[1].dp = (void*) host;
2223 if (self != simix_global->maestro_process) {
2224 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2225 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2226 SIMIX_process_yield(self);
2228 SIMIX_simcall_handle(&self->simcall, 0);
2230 return (smx_file_t) self->simcall.result.dp;
2233 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
2234 smx_process_t self = SIMIX_process_self();
2236 /* Go to that function to follow the code flow through the simcall barrier */
2237 if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
2238 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2240 self->simcall.call = SIMCALL_FILE_CLOSE;
2241 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2242 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2243 self->simcall.args[0].dp = (void*) fd;
2244 self->simcall.args[1].dp = (void*) host;
2245 if (self != simix_global->maestro_process) {
2246 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2247 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2248 SIMIX_process_yield(self);
2250 SIMIX_simcall_handle(&self->simcall, 0);
2252 return (int) self->simcall.result.i;
2255 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
2256 smx_process_t self = SIMIX_process_self();
2258 /* Go to that function to follow the code flow through the simcall barrier */
2259 if (0) SIMIX_file_unlink(fd, host);
2260 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2262 self->simcall.call = SIMCALL_FILE_UNLINK;
2263 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2264 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2265 self->simcall.args[0].dp = (void*) fd;
2266 self->simcall.args[1].dp = (void*) host;
2267 if (self != simix_global->maestro_process) {
2268 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2269 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2270 SIMIX_process_yield(self);
2272 SIMIX_simcall_handle(&self->simcall, 0);
2274 return (int) self->simcall.result.i;
2277 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2278 smx_process_t self = SIMIX_process_self();
2280 /* Go to that function to follow the code flow through the simcall barrier */
2281 if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
2282 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2284 self->simcall.call = SIMCALL_FILE_GET_SIZE;
2285 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2286 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2287 self->simcall.args[0].dp = (void*) fd;
2288 if (self != simix_global->maestro_process) {
2289 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2290 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2291 SIMIX_process_yield(self);
2293 SIMIX_simcall_handle(&self->simcall, 0);
2295 return (sg_size_t) self->simcall.result.sgsz;
2298 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2299 smx_process_t self = SIMIX_process_self();
2301 /* Go to that function to follow the code flow through the simcall barrier */
2302 if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
2303 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2305 self->simcall.call = SIMCALL_FILE_TELL;
2306 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2307 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2308 self->simcall.args[0].dp = (void*) fd;
2309 if (self != simix_global->maestro_process) {
2310 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2311 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2312 SIMIX_process_yield(self);
2314 SIMIX_simcall_handle(&self->simcall, 0);
2316 return (sg_size_t) self->simcall.result.sgsz;
2319 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2320 smx_process_t self = SIMIX_process_self();
2322 /* Go to that function to follow the code flow through the simcall barrier */
2323 if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
2324 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2326 self->simcall.call = SIMCALL_FILE_SEEK;
2327 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2328 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2329 self->simcall.args[0].dp = (void*) fd;
2330 self->simcall.args[1].sgoff = (sg_offset_t) offset;
2331 self->simcall.args[2].i = (int) origin;
2332 if (self != simix_global->maestro_process) {
2333 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2334 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2335 SIMIX_process_yield(self);
2337 SIMIX_simcall_handle(&self->simcall, 0);
2339 return (int) self->simcall.result.i;
2342 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2343 smx_process_t self = SIMIX_process_self();
2345 /* Go to that function to follow the code flow through the simcall barrier */
2346 if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
2347 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2349 self->simcall.call = SIMCALL_FILE_GET_INFO;
2350 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2351 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2352 self->simcall.args[0].dp = (void*) fd;
2353 if (self != simix_global->maestro_process) {
2354 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2355 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2356 SIMIX_process_yield(self);
2358 SIMIX_simcall_handle(&self->simcall, 0);
2360 return (xbt_dynar_t) self->simcall.result.dp;
2363 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2364 smx_process_t self = SIMIX_process_self();
2366 /* Go to that function to follow the code flow through the simcall barrier */
2367 if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
2368 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2370 self->simcall.call = SIMCALL_FILE_MOVE;
2371 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2372 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2373 self->simcall.args[0].dp = (void*) fd;
2374 self->simcall.args[1].cc = (const char*) fullpath;
2375 if (self != simix_global->maestro_process) {
2376 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2377 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2378 SIMIX_process_yield(self);
2380 SIMIX_simcall_handle(&self->simcall, 0);
2382 return (int) self->simcall.result.i;
2385 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2386 smx_process_t self = SIMIX_process_self();
2388 /* Go to that function to follow the code flow through the simcall barrier */
2389 if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
2390 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2392 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2393 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2394 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2395 self->simcall.args[0].dp = (void*) storage;
2396 if (self != simix_global->maestro_process) {
2397 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2398 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2399 SIMIX_process_yield(self);
2401 SIMIX_simcall_handle(&self->simcall, 0);
2403 return (sg_size_t) self->simcall.result.sgsz;
2406 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2407 smx_process_t self = SIMIX_process_self();
2409 /* Go to that function to follow the code flow through the simcall barrier */
2410 if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
2411 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2413 self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2414 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2415 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2416 self->simcall.args[0].dp = (void*) name;
2417 if (self != simix_global->maestro_process) {
2418 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2419 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2420 SIMIX_process_yield(self);
2422 SIMIX_simcall_handle(&self->simcall, 0);
2424 return (sg_size_t) self->simcall.result.sgsz;
2427 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2428 smx_process_t self = SIMIX_process_self();
2430 /* Go to that function to follow the code flow through the simcall barrier */
2431 if (0) SIMIX_storage_get_properties(storage);
2432 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2434 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2435 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2436 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2437 self->simcall.args[0].dp = (void*) storage;
2438 if (self != simix_global->maestro_process) {
2439 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2440 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2441 SIMIX_process_yield(self);
2443 SIMIX_simcall_handle(&self->simcall, 0);
2445 return (xbt_dict_t) self->simcall.result.dp;
2448 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2449 smx_process_t self = SIMIX_process_self();
2451 /* Go to that function to follow the code flow through the simcall barrier */
2452 if (0) SIMIX_storage_get_content(storage);
2453 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2455 self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2456 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2457 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2458 self->simcall.args[0].dp = (void*) storage;
2459 if (self != simix_global->maestro_process) {
2460 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2461 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2462 SIMIX_process_yield(self);
2464 SIMIX_simcall_handle(&self->simcall, 0);
2466 return (xbt_dict_t) self->simcall.result.dp;
2469 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2470 smx_process_t self = SIMIX_process_self();
2472 /* Go to that function to follow the code flow through the simcall barrier */
2473 if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
2474 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2476 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2477 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2478 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2479 self->simcall.args[0].cc = (const char*) name;
2480 if (self != simix_global->maestro_process) {
2481 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2482 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2483 SIMIX_process_yield(self);
2485 SIMIX_simcall_handle(&self->simcall, 0);
2487 return (xbt_dict_t) self->simcall.result.dp;
2490 inline static int simcall_BODY_mc_random(int min, int max) {
2491 smx_process_t self = SIMIX_process_self();
2493 /* Go to that function to follow the code flow through the simcall barrier */
2494 if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
2495 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2497 self->simcall.call = SIMCALL_MC_RANDOM;
2498 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2499 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2500 self->simcall.args[0].i = (int) min;
2501 self->simcall.args[1].i = (int) max;
2502 if (self != simix_global->maestro_process) {
2503 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2504 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2505 SIMIX_process_yield(self);
2507 SIMIX_simcall_handle(&self->simcall, 0);
2509 return (int) self->simcall.result.i;
2512 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
2513 smx_process_t self = SIMIX_process_self();
2515 /* Go to that function to follow the code flow through the simcall barrier */
2516 if (0) SIMIX_set_category(synchro, category);
2517 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2519 self->simcall.call = SIMCALL_SET_CATEGORY;
2520 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2521 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2522 self->simcall.args[0].dp = (void*) synchro;
2523 self->simcall.args[1].cc = (const char*) category;
2524 if (self != simix_global->maestro_process) {
2525 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2526 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2527 SIMIX_process_yield(self);
2529 SIMIX_simcall_handle(&self->simcall, 0);
2533 #ifdef HAVE_LATENCY_BOUND_TRACKING
2535 inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
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_comm_is_latency_bounded(comm);
2540 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2542 self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
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*) comm;
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);
2553 return (int) self->simcall.result.i;
2559 inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
2560 smx_process_t self = SIMIX_process_self();
2562 /* Go to that function to follow the code flow through the simcall barrier */
2563 if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
2564 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2566 self->simcall.call = SIMCALL_MC_SNAPSHOT;
2567 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2568 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2570 if (self != simix_global->maestro_process) {
2571 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2572 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2573 SIMIX_process_yield(self);
2575 SIMIX_simcall_handle(&self->simcall, 0);
2577 return (mc_snapshot_t) self->simcall.result.dp;
2580 inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
2581 smx_process_t self = SIMIX_process_self();
2583 /* Go to that function to follow the code flow through the simcall barrier */
2584 if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
2585 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2587 self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2588 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2589 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2590 self->simcall.args[0].dp = (void*) s1;
2591 self->simcall.args[1].dp = (void*) s2;
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 (int) self->simcall.result.i;