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.hpp"
19 #include <simgrid/simix.hpp>
20 /** @cond */ // Please Doxygen, don't look at this
22 inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) {
23 smx_process_t self = SIMIX_process_self();
25 /* Go to that function to follow the code flow through the simcall barrier */
26 if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
27 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
29 self->simcall.call = SIMCALL_VM_SUSPEND;
30 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
31 memset(self->simcall.args, 0, sizeof(self->simcall.args));
32 self->simcall.args[0].dp = (void*) ind_vm;
33 if (self != simix_global->maestro_process) {
34 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
35 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
36 SIMIX_process_yield(self);
38 SIMIX_simcall_handle(&self->simcall, 0);
43 inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) {
44 smx_process_t self = SIMIX_process_self();
46 /* Go to that function to follow the code flow through the simcall barrier */
47 if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
48 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
50 self->simcall.call = SIMCALL_VM_RESUME;
51 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
52 memset(self->simcall.args, 0, sizeof(self->simcall.args));
53 self->simcall.args[0].dp = (void*) ind_vm;
54 if (self != simix_global->maestro_process) {
55 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
56 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
57 SIMIX_process_yield(self);
59 SIMIX_simcall_handle(&self->simcall, 0);
64 inline static void simcall_BODY_vm_shutdown(sg_host_t ind_vm) {
65 smx_process_t self = SIMIX_process_self();
67 /* Go to that function to follow the code flow through the simcall barrier */
68 if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
69 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
71 self->simcall.call = SIMCALL_VM_SHUTDOWN;
72 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
73 memset(self->simcall.args, 0, sizeof(self->simcall.args));
74 self->simcall.args[0].dp = (void*) ind_vm;
75 if (self != simix_global->maestro_process) {
76 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
77 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
78 SIMIX_process_yield(self);
80 SIMIX_simcall_handle(&self->simcall, 0);
85 inline static void simcall_BODY_vm_save(sg_host_t ind_vm) {
86 smx_process_t self = SIMIX_process_self();
88 /* Go to that function to follow the code flow through the simcall barrier */
89 if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
90 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
92 self->simcall.call = SIMCALL_VM_SAVE;
93 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
94 memset(self->simcall.args, 0, sizeof(self->simcall.args));
95 self->simcall.args[0].dp = (void*) ind_vm;
96 if (self != simix_global->maestro_process) {
97 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
98 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
99 SIMIX_process_yield(self);
101 SIMIX_simcall_handle(&self->simcall, 0);
106 inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) {
107 smx_process_t self = SIMIX_process_self();
109 /* Go to that function to follow the code flow through the simcall barrier */
110 if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
111 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
113 self->simcall.call = SIMCALL_VM_RESTORE;
114 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
115 memset(self->simcall.args, 0, sizeof(self->simcall.args));
116 self->simcall.args[0].dp = (void*) ind_vm;
117 if (self != simix_global->maestro_process) {
118 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
119 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
120 SIMIX_process_yield(self);
122 SIMIX_simcall_handle(&self->simcall, 0);
127 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) {
128 smx_process_t self = SIMIX_process_self();
130 /* Go to that function to follow the code flow through the simcall barrier */
131 if (0) simcall_HANDLER_process_create(&self->simcall, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
132 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
134 self->simcall.call = SIMCALL_PROCESS_CREATE;
135 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
136 memset(self->simcall.args, 0, sizeof(self->simcall.args));
137 self->simcall.args[0].cc = (const char*) name;
138 self->simcall.args[1].fp = (FPtr) code;
139 self->simcall.args[2].dp = (void*) data;
140 self->simcall.args[3].cc = (const char*) hostname;
141 self->simcall.args[4].d = (double) kill_time;
142 self->simcall.args[5].i = (int) argc;
143 self->simcall.args[6].dp = (void*) argv;
144 self->simcall.args[7].dp = (void*) properties;
145 self->simcall.args[8].i = (int) auto_restart;
146 if (self != simix_global->maestro_process) {
147 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
148 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
149 SIMIX_process_yield(self);
151 SIMIX_simcall_handle(&self->simcall, 0);
153 return (void*) self->simcall.result.dp;
156 inline static void simcall_BODY_process_kill(smx_process_t process) {
157 smx_process_t self = SIMIX_process_self();
159 /* Go to that function to follow the code flow through the simcall barrier */
160 if (0) simcall_HANDLER_process_kill(&self->simcall, process);
161 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
163 self->simcall.call = SIMCALL_PROCESS_KILL;
164 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
165 memset(self->simcall.args, 0, sizeof(self->simcall.args));
166 self->simcall.args[0].dp = (void*) process;
167 if (self != simix_global->maestro_process) {
168 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
169 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
170 SIMIX_process_yield(self);
172 SIMIX_simcall_handle(&self->simcall, 0);
177 inline static void simcall_BODY_process_killall(int reset_pid) {
178 smx_process_t self = SIMIX_process_self();
180 /* Go to that function to follow the code flow through the simcall barrier */
181 if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
182 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
184 self->simcall.call = SIMCALL_PROCESS_KILLALL;
185 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
186 memset(self->simcall.args, 0, sizeof(self->simcall.args));
187 self->simcall.args[0].i = (int) reset_pid;
188 if (self != simix_global->maestro_process) {
189 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
190 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
191 SIMIX_process_yield(self);
193 SIMIX_simcall_handle(&self->simcall, 0);
198 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
199 smx_process_t self = SIMIX_process_self();
201 /* Go to that function to follow the code flow through the simcall barrier */
202 if (0) SIMIX_process_cleanup(process);
203 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
205 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
206 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
207 memset(self->simcall.args, 0, sizeof(self->simcall.args));
208 self->simcall.args[0].dp = (void*) process;
209 if (self != simix_global->maestro_process) {
210 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
211 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
212 SIMIX_process_yield(self);
214 SIMIX_simcall_handle(&self->simcall, 0);
219 inline static void simcall_BODY_process_suspend(smx_process_t process) {
220 smx_process_t self = SIMIX_process_self();
222 /* Go to that function to follow the code flow through the simcall barrier */
223 if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
224 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
226 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
227 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
228 memset(self->simcall.args, 0, sizeof(self->simcall.args));
229 self->simcall.args[0].dp = (void*) process;
230 if (self != simix_global->maestro_process) {
231 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
232 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
233 SIMIX_process_yield(self);
235 SIMIX_simcall_handle(&self->simcall, 0);
240 inline static void simcall_BODY_process_resume(smx_process_t process) {
241 smx_process_t self = SIMIX_process_self();
243 /* Go to that function to follow the code flow through the simcall barrier */
244 if (0) simcall_HANDLER_process_resume(&self->simcall, process);
245 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
247 self->simcall.call = SIMCALL_PROCESS_RESUME;
248 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
249 memset(self->simcall.args, 0, sizeof(self->simcall.args));
250 self->simcall.args[0].dp = (void*) process;
251 if (self != simix_global->maestro_process) {
252 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
253 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
254 SIMIX_process_yield(self);
256 SIMIX_simcall_handle(&self->simcall, 0);
261 inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) {
262 smx_process_t self = SIMIX_process_self();
264 /* Go to that function to follow the code flow through the simcall barrier */
265 if (0) simcall_HANDLER_process_set_host(&self->simcall, process, dest);
266 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
268 self->simcall.call = SIMCALL_PROCESS_SET_HOST;
269 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
270 memset(self->simcall.args, 0, sizeof(self->simcall.args));
271 self->simcall.args[0].dp = (void*) process;
272 self->simcall.args[1].dp = (void*) dest;
273 if (self != simix_global->maestro_process) {
274 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
275 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
276 SIMIX_process_yield(self);
278 SIMIX_simcall_handle(&self->simcall, 0);
283 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
284 smx_process_t self = SIMIX_process_self();
286 /* Go to that function to follow the code flow through the simcall barrier */
287 if (0) SIMIX_process_is_suspended(process);
288 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
290 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
291 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
292 memset(self->simcall.args, 0, sizeof(self->simcall.args));
293 self->simcall.args[0].dp = (void*) process;
294 if (self != simix_global->maestro_process) {
295 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
296 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
297 SIMIX_process_yield(self);
299 SIMIX_simcall_handle(&self->simcall, 0);
301 return (int) self->simcall.result.i;
304 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
305 smx_process_t self = SIMIX_process_self();
307 /* Go to that function to follow the code flow through the simcall barrier */
308 if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
309 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
311 self->simcall.call = SIMCALL_PROCESS_JOIN;
312 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
313 memset(self->simcall.args, 0, sizeof(self->simcall.args));
314 self->simcall.args[0].dp = (void*) process;
315 self->simcall.args[1].d = (double) timeout;
316 if (self != simix_global->maestro_process) {
317 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
318 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
319 SIMIX_process_yield(self);
321 SIMIX_simcall_handle(&self->simcall, 0);
323 return (int) self->simcall.result.i;
326 inline static int simcall_BODY_process_sleep(double duration) {
327 smx_process_t self = SIMIX_process_self();
329 /* Go to that function to follow the code flow through the simcall barrier */
330 if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
331 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
333 self->simcall.call = SIMCALL_PROCESS_SLEEP;
334 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
335 memset(self->simcall.args, 0, sizeof(self->simcall.args));
336 self->simcall.args[0].d = (double) duration;
337 if (self != simix_global->maestro_process) {
338 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
339 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
340 SIMIX_process_yield(self);
342 SIMIX_simcall_handle(&self->simcall, 0);
344 return (int) self->simcall.result.i;
347 inline static smx_synchro_t simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
348 smx_process_t self = SIMIX_process_self();
350 /* Go to that function to follow the code flow through the simcall barrier */
351 if (0) simcall_HANDLER_execution_start(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
352 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
354 self->simcall.call = SIMCALL_EXECUTION_START;
355 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
356 memset(self->simcall.args, 0, sizeof(self->simcall.args));
357 self->simcall.args[0].cc = (const char*) name;
358 self->simcall.args[1].d = (double) flops_amount;
359 self->simcall.args[2].d = (double) priority;
360 self->simcall.args[3].d = (double) bound;
361 self->simcall.args[4].ul = (unsigned long) affinity_mask;
362 if (self != simix_global->maestro_process) {
363 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
364 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
365 SIMIX_process_yield(self);
367 SIMIX_simcall_handle(&self->simcall, 0);
369 return (smx_synchro_t) self->simcall.result.dp;
372 inline static smx_synchro_t simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
373 smx_process_t self = SIMIX_process_self();
375 /* Go to that function to follow the code flow through the simcall barrier */
376 if (0) SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
377 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
379 self->simcall.call = SIMCALL_EXECUTION_PARALLEL_START;
380 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
381 memset(self->simcall.args, 0, sizeof(self->simcall.args));
382 self->simcall.args[0].cc = (const char*) name;
383 self->simcall.args[1].i = (int) host_nb;
384 self->simcall.args[2].dp = (void*) host_list;
385 self->simcall.args[3].dp = (void*) flops_amount;
386 self->simcall.args[4].dp = (void*) bytes_amount;
387 self->simcall.args[5].d = (double) amount;
388 self->simcall.args[6].d = (double) rate;
389 if (self != simix_global->maestro_process) {
390 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
391 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
392 SIMIX_process_yield(self);
394 SIMIX_simcall_handle(&self->simcall, 0);
396 return (smx_synchro_t) self->simcall.result.dp;
399 inline static void simcall_BODY_execution_cancel(smx_synchro_t execution) {
400 smx_process_t self = SIMIX_process_self();
402 /* Go to that function to follow the code flow through the simcall barrier */
403 if (0) SIMIX_execution_cancel(execution);
404 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
406 self->simcall.call = SIMCALL_EXECUTION_CANCEL;
407 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
408 memset(self->simcall.args, 0, sizeof(self->simcall.args));
409 self->simcall.args[0].dp = (void*) execution;
410 if (self != simix_global->maestro_process) {
411 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
412 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
413 SIMIX_process_yield(self);
415 SIMIX_simcall_handle(&self->simcall, 0);
420 inline static void simcall_BODY_execution_set_priority(smx_synchro_t execution, double priority) {
421 smx_process_t self = SIMIX_process_self();
423 /* Go to that function to follow the code flow through the simcall barrier */
424 if (0) SIMIX_execution_set_priority(execution, priority);
425 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
427 self->simcall.call = SIMCALL_EXECUTION_SET_PRIORITY;
428 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
429 memset(self->simcall.args, 0, sizeof(self->simcall.args));
430 self->simcall.args[0].dp = (void*) execution;
431 self->simcall.args[1].d = (double) priority;
432 if (self != simix_global->maestro_process) {
433 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
434 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
435 SIMIX_process_yield(self);
437 SIMIX_simcall_handle(&self->simcall, 0);
442 inline static void simcall_BODY_execution_set_bound(smx_synchro_t execution, double bound) {
443 smx_process_t self = SIMIX_process_self();
445 /* Go to that function to follow the code flow through the simcall barrier */
446 if (0) SIMIX_execution_set_bound(execution, bound);
447 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
449 self->simcall.call = SIMCALL_EXECUTION_SET_BOUND;
450 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
451 memset(self->simcall.args, 0, sizeof(self->simcall.args));
452 self->simcall.args[0].dp = (void*) execution;
453 self->simcall.args[1].d = (double) bound;
454 if (self != simix_global->maestro_process) {
455 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
456 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
457 SIMIX_process_yield(self);
459 SIMIX_simcall_handle(&self->simcall, 0);
464 inline static void simcall_BODY_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
465 smx_process_t self = SIMIX_process_self();
467 /* Go to that function to follow the code flow through the simcall barrier */
468 if (0) SIMIX_execution_set_affinity(execution, ws, mask);
469 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
471 self->simcall.call = SIMCALL_EXECUTION_SET_AFFINITY;
472 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
473 memset(self->simcall.args, 0, sizeof(self->simcall.args));
474 self->simcall.args[0].dp = (void*) execution;
475 self->simcall.args[1].dp = (void*) ws;
476 self->simcall.args[2].ul = (unsigned long) mask;
477 if (self != simix_global->maestro_process) {
478 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
479 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
480 SIMIX_process_yield(self);
482 SIMIX_simcall_handle(&self->simcall, 0);
487 inline static int simcall_BODY_execution_wait(smx_synchro_t execution) {
488 smx_process_t self = SIMIX_process_self();
490 /* Go to that function to follow the code flow through the simcall barrier */
491 if (0) simcall_HANDLER_execution_wait(&self->simcall, execution);
492 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
494 self->simcall.call = SIMCALL_EXECUTION_WAIT;
495 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
496 memset(self->simcall.args, 0, sizeof(self->simcall.args));
497 self->simcall.args[0].dp = (void*) execution;
498 if (self != simix_global->maestro_process) {
499 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
500 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
501 SIMIX_process_yield(self);
503 SIMIX_simcall_handle(&self->simcall, 0);
505 return (int) self->simcall.result.i;
508 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
509 smx_process_t self = SIMIX_process_self();
511 /* Go to that function to follow the code flow through the simcall barrier */
512 if (0) SIMIX_process_on_exit(process, fun, data);
513 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
515 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
516 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
517 memset(self->simcall.args, 0, sizeof(self->simcall.args));
518 self->simcall.args[0].dp = (void*) process;
519 self->simcall.args[1].fp = (FPtr) fun;
520 self->simcall.args[2].dp = (void*) data;
521 if (self != simix_global->maestro_process) {
522 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
523 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
524 SIMIX_process_yield(self);
526 SIMIX_simcall_handle(&self->simcall, 0);
531 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
532 smx_process_t self = SIMIX_process_self();
534 /* Go to that function to follow the code flow through the simcall barrier */
535 if (0) SIMIX_process_auto_restart_set(process, auto_restart);
536 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
538 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
539 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
540 memset(self->simcall.args, 0, sizeof(self->simcall.args));
541 self->simcall.args[0].dp = (void*) process;
542 self->simcall.args[1].i = (int) auto_restart;
543 if (self != simix_global->maestro_process) {
544 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
545 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
546 SIMIX_process_yield(self);
548 SIMIX_simcall_handle(&self->simcall, 0);
553 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
554 smx_process_t self = SIMIX_process_self();
556 /* Go to that function to follow the code flow through the simcall barrier */
557 if (0) simcall_HANDLER_process_restart(&self->simcall, process);
558 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
560 self->simcall.call = SIMCALL_PROCESS_RESTART;
561 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
562 memset(self->simcall.args, 0, sizeof(self->simcall.args));
563 self->simcall.args[0].dp = (void*) process;
564 if (self != simix_global->maestro_process) {
565 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
566 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
567 SIMIX_process_yield(self);
569 SIMIX_simcall_handle(&self->simcall, 0);
571 return (smx_process_t) self->simcall.result.dp;
574 inline static smx_mailbox_t simcall_BODY_mbox_create(const char* name) {
575 smx_process_t self = SIMIX_process_self();
577 /* Go to that function to follow the code flow through the simcall barrier */
578 if (0) SIMIX_mbox_create(name);
579 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
581 self->simcall.call = SIMCALL_MBOX_CREATE;
582 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
583 memset(self->simcall.args, 0, sizeof(self->simcall.args));
584 self->simcall.args[0].cc = (const char*) name;
585 if (self != simix_global->maestro_process) {
586 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
587 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
588 SIMIX_process_yield(self);
590 SIMIX_simcall_handle(&self->simcall, 0);
592 return (smx_mailbox_t) self->simcall.result.dp;
595 inline static void simcall_BODY_mbox_set_receiver(smx_mailbox_t mbox, smx_process_t receiver) {
596 smx_process_t self = SIMIX_process_self();
598 /* Go to that function to follow the code flow through the simcall barrier */
599 if (0) SIMIX_mbox_set_receiver(mbox, receiver);
600 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
602 self->simcall.call = SIMCALL_MBOX_SET_RECEIVER;
603 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
604 memset(self->simcall.args, 0, sizeof(self->simcall.args));
605 self->simcall.args[0].dp = (void*) mbox;
606 self->simcall.args[1].dp = (void*) receiver;
607 if (self != simix_global->maestro_process) {
608 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
609 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
610 SIMIX_process_yield(self);
612 SIMIX_simcall_handle(&self->simcall, 0);
617 inline static smx_synchro_t simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
618 smx_process_t self = SIMIX_process_self();
620 /* Go to that function to follow the code flow through the simcall barrier */
621 if (0) simcall_HANDLER_comm_iprobe(&self->simcall, mbox, type, src, tag, match_fun, data);
622 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
624 self->simcall.call = SIMCALL_COMM_IPROBE;
625 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
626 memset(self->simcall.args, 0, sizeof(self->simcall.args));
627 self->simcall.args[0].dp = (void*) mbox;
628 self->simcall.args[1].i = (int) type;
629 self->simcall.args[2].i = (int) src;
630 self->simcall.args[3].i = (int) tag;
631 self->simcall.args[4].fp = (FPtr) match_fun;
632 self->simcall.args[5].dp = (void*) data;
633 if (self != simix_global->maestro_process) {
634 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
635 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
636 SIMIX_process_yield(self);
638 SIMIX_simcall_handle(&self->simcall, 0);
640 return (smx_synchro_t) self->simcall.result.dp;
643 inline static void simcall_BODY_comm_send(smx_process_t sender, smx_mailbox_t mbox, 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) {
644 smx_process_t self = SIMIX_process_self();
646 /* Go to that function to follow the code flow through the simcall barrier */
647 if (0) simcall_HANDLER_comm_send(&self->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
648 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
650 self->simcall.call = SIMCALL_COMM_SEND;
651 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
652 memset(self->simcall.args, 0, sizeof(self->simcall.args));
653 self->simcall.args[0].dp = (void*) sender;
654 self->simcall.args[1].dp = (void*) mbox;
655 self->simcall.args[2].d = (double) task_size;
656 self->simcall.args[3].d = (double) rate;
657 self->simcall.args[4].dp = (void*) src_buff;
658 self->simcall.args[5].sz = (size_t) src_buff_size;
659 self->simcall.args[6].fp = (FPtr) match_fun;
660 self->simcall.args[7].fp = (FPtr) copy_data_fun;
661 self->simcall.args[8].dp = (void*) data;
662 self->simcall.args[9].d = (double) timeout;
663 if (self != simix_global->maestro_process) {
664 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
665 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
666 SIMIX_process_yield(self);
668 SIMIX_simcall_handle(&self->simcall, 0);
673 inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t sender, smx_mailbox_t mbox, 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) {
674 smx_process_t self = SIMIX_process_self();
676 /* Go to that function to follow the code flow through the simcall barrier */
677 if (0) simcall_HANDLER_comm_isend(&self->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
678 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
680 self->simcall.call = SIMCALL_COMM_ISEND;
681 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
682 memset(self->simcall.args, 0, sizeof(self->simcall.args));
683 self->simcall.args[0].dp = (void*) sender;
684 self->simcall.args[1].dp = (void*) mbox;
685 self->simcall.args[2].d = (double) task_size;
686 self->simcall.args[3].d = (double) rate;
687 self->simcall.args[4].dp = (void*) src_buff;
688 self->simcall.args[5].sz = (size_t) src_buff_size;
689 self->simcall.args[6].fp = (FPtr) match_fun;
690 self->simcall.args[7].fp = (FPtr) clean_fun;
691 self->simcall.args[8].fp = (FPtr) copy_data_fun;
692 self->simcall.args[9].dp = (void*) data;
693 self->simcall.args[10].i = (int) detached;
694 if (self != simix_global->maestro_process) {
695 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
696 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
697 SIMIX_process_yield(self);
699 SIMIX_simcall_handle(&self->simcall, 0);
701 return (smx_synchro_t) self->simcall.result.dp;
704 inline static void simcall_BODY_comm_recv(smx_process_t receiver, smx_mailbox_t mbox, 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) {
705 smx_process_t self = SIMIX_process_self();
707 /* Go to that function to follow the code flow through the simcall barrier */
708 if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
709 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
711 self->simcall.call = SIMCALL_COMM_RECV;
712 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
713 memset(self->simcall.args, 0, sizeof(self->simcall.args));
714 self->simcall.args[0].dp = (void*) receiver;
715 self->simcall.args[1].dp = (void*) mbox;
716 self->simcall.args[2].dp = (void*) dst_buff;
717 self->simcall.args[3].dp = (void*) dst_buff_size;
718 self->simcall.args[4].fp = (FPtr) match_fun;
719 self->simcall.args[5].fp = (FPtr) copy_data_fun;
720 self->simcall.args[6].dp = (void*) data;
721 self->simcall.args[7].d = (double) timeout;
722 self->simcall.args[8].d = (double) rate;
723 if (self != simix_global->maestro_process) {
724 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
725 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
726 SIMIX_process_yield(self);
728 SIMIX_simcall_handle(&self->simcall, 0);
733 inline static smx_synchro_t simcall_BODY_comm_irecv(smx_process_t receiver, smx_mailbox_t mbox, 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) {
734 smx_process_t self = SIMIX_process_self();
736 /* Go to that function to follow the code flow through the simcall barrier */
737 if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
738 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
740 self->simcall.call = SIMCALL_COMM_IRECV;
741 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
742 memset(self->simcall.args, 0, sizeof(self->simcall.args));
743 self->simcall.args[0].dp = (void*) receiver;
744 self->simcall.args[1].dp = (void*) mbox;
745 self->simcall.args[2].dp = (void*) dst_buff;
746 self->simcall.args[3].dp = (void*) dst_buff_size;
747 self->simcall.args[4].fp = (FPtr) match_fun;
748 self->simcall.args[5].fp = (FPtr) copy_data_fun;
749 self->simcall.args[6].dp = (void*) data;
750 self->simcall.args[7].d = (double) rate;
751 if (self != simix_global->maestro_process) {
752 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
753 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
754 SIMIX_process_yield(self);
756 SIMIX_simcall_handle(&self->simcall, 0);
758 return (smx_synchro_t) self->simcall.result.dp;
761 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
762 smx_process_t self = SIMIX_process_self();
764 /* Go to that function to follow the code flow through the simcall barrier */
765 if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
766 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
768 self->simcall.call = SIMCALL_COMM_WAITANY;
769 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
770 memset(self->simcall.args, 0, sizeof(self->simcall.args));
771 self->simcall.args[0].dp = (void*) comms;
772 if (self != simix_global->maestro_process) {
773 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
774 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
775 SIMIX_process_yield(self);
777 SIMIX_simcall_handle(&self->simcall, 0);
779 return (int) self->simcall.result.i;
782 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
783 smx_process_t self = SIMIX_process_self();
785 /* Go to that function to follow the code flow through the simcall barrier */
786 if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
787 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
789 self->simcall.call = SIMCALL_COMM_WAIT;
790 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
791 memset(self->simcall.args, 0, sizeof(self->simcall.args));
792 self->simcall.args[0].dp = (void*) comm;
793 self->simcall.args[1].d = (double) timeout;
794 if (self != simix_global->maestro_process) {
795 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
796 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
797 SIMIX_process_yield(self);
799 SIMIX_simcall_handle(&self->simcall, 0);
804 inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
805 smx_process_t self = SIMIX_process_self();
807 /* Go to that function to follow the code flow through the simcall barrier */
808 if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
809 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
811 self->simcall.call = SIMCALL_COMM_TEST;
812 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
813 memset(self->simcall.args, 0, sizeof(self->simcall.args));
814 self->simcall.args[0].dp = (void*) comm;
815 if (self != simix_global->maestro_process) {
816 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
817 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
818 SIMIX_process_yield(self);
820 SIMIX_simcall_handle(&self->simcall, 0);
822 return (int) self->simcall.result.i;
825 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
826 smx_process_t self = SIMIX_process_self();
828 /* Go to that function to follow the code flow through the simcall barrier */
829 if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
830 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
832 self->simcall.call = SIMCALL_COMM_TESTANY;
833 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
834 memset(self->simcall.args, 0, sizeof(self->simcall.args));
835 self->simcall.args[0].dp = (void*) comms;
836 if (self != simix_global->maestro_process) {
837 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
838 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
839 SIMIX_process_yield(self);
841 SIMIX_simcall_handle(&self->simcall, 0);
843 return (int) self->simcall.result.i;
846 inline static smx_mutex_t simcall_BODY_mutex_init() {
847 smx_process_t self = SIMIX_process_self();
849 /* Go to that function to follow the code flow through the simcall barrier */
850 if (0) simcall_HANDLER_mutex_init(&self->simcall);
851 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
853 self->simcall.call = SIMCALL_MUTEX_INIT;
854 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
855 memset(self->simcall.args, 0, sizeof(self->simcall.args));
857 if (self != simix_global->maestro_process) {
858 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
859 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
860 SIMIX_process_yield(self);
862 SIMIX_simcall_handle(&self->simcall, 0);
864 return (smx_mutex_t) self->simcall.result.dp;
867 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
868 smx_process_t self = SIMIX_process_self();
870 /* Go to that function to follow the code flow through the simcall barrier */
871 if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
872 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
874 self->simcall.call = SIMCALL_MUTEX_LOCK;
875 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
876 memset(self->simcall.args, 0, sizeof(self->simcall.args));
877 self->simcall.args[0].dp = (void*) mutex;
878 if (self != simix_global->maestro_process) {
879 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
880 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
881 SIMIX_process_yield(self);
883 SIMIX_simcall_handle(&self->simcall, 0);
888 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
889 smx_process_t self = SIMIX_process_self();
891 /* Go to that function to follow the code flow through the simcall barrier */
892 if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
893 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
895 self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
896 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
897 memset(self->simcall.args, 0, sizeof(self->simcall.args));
898 self->simcall.args[0].dp = (void*) mutex;
899 if (self != simix_global->maestro_process) {
900 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
901 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
902 SIMIX_process_yield(self);
904 SIMIX_simcall_handle(&self->simcall, 0);
906 return (int) self->simcall.result.i;
909 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
910 smx_process_t self = SIMIX_process_self();
912 /* Go to that function to follow the code flow through the simcall barrier */
913 if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
914 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
916 self->simcall.call = SIMCALL_MUTEX_UNLOCK;
917 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
918 memset(self->simcall.args, 0, sizeof(self->simcall.args));
919 self->simcall.args[0].dp = (void*) mutex;
920 if (self != simix_global->maestro_process) {
921 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
922 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
923 SIMIX_process_yield(self);
925 SIMIX_simcall_handle(&self->simcall, 0);
930 inline static smx_cond_t simcall_BODY_cond_init() {
931 smx_process_t self = SIMIX_process_self();
933 /* Go to that function to follow the code flow through the simcall barrier */
934 if (0) SIMIX_cond_init();
935 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
937 self->simcall.call = SIMCALL_COND_INIT;
938 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
939 memset(self->simcall.args, 0, sizeof(self->simcall.args));
941 if (self != simix_global->maestro_process) {
942 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
943 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
944 SIMIX_process_yield(self);
946 SIMIX_simcall_handle(&self->simcall, 0);
948 return (smx_cond_t) self->simcall.result.dp;
951 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
952 smx_process_t self = SIMIX_process_self();
954 /* Go to that function to follow the code flow through the simcall barrier */
955 if (0) SIMIX_cond_signal(cond);
956 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
958 self->simcall.call = SIMCALL_COND_SIGNAL;
959 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
960 memset(self->simcall.args, 0, sizeof(self->simcall.args));
961 self->simcall.args[0].dp = (void*) cond;
962 if (self != simix_global->maestro_process) {
963 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
964 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
965 SIMIX_process_yield(self);
967 SIMIX_simcall_handle(&self->simcall, 0);
972 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
973 smx_process_t self = SIMIX_process_self();
975 /* Go to that function to follow the code flow through the simcall barrier */
976 if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
977 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
979 self->simcall.call = SIMCALL_COND_WAIT;
980 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
981 memset(self->simcall.args, 0, sizeof(self->simcall.args));
982 self->simcall.args[0].dp = (void*) cond;
983 self->simcall.args[1].dp = (void*) mutex;
984 if (self != simix_global->maestro_process) {
985 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
986 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
987 SIMIX_process_yield(self);
989 SIMIX_simcall_handle(&self->simcall, 0);
994 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
995 smx_process_t self = SIMIX_process_self();
997 /* Go to that function to follow the code flow through the simcall barrier */
998 if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
999 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1001 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
1002 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1003 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1004 self->simcall.args[0].dp = (void*) cond;
1005 self->simcall.args[1].dp = (void*) mutex;
1006 self->simcall.args[2].d = (double) timeout;
1007 if (self != simix_global->maestro_process) {
1008 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1009 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1010 SIMIX_process_yield(self);
1012 SIMIX_simcall_handle(&self->simcall, 0);
1017 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
1018 smx_process_t self = SIMIX_process_self();
1020 /* Go to that function to follow the code flow through the simcall barrier */
1021 if (0) SIMIX_cond_broadcast(cond);
1022 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1024 self->simcall.call = SIMCALL_COND_BROADCAST;
1025 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1026 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1027 self->simcall.args[0].dp = (void*) cond;
1028 if (self != simix_global->maestro_process) {
1029 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1030 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1031 SIMIX_process_yield(self);
1033 SIMIX_simcall_handle(&self->simcall, 0);
1038 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
1039 smx_process_t self = SIMIX_process_self();
1041 /* Go to that function to follow the code flow through the simcall barrier */
1042 if (0) SIMIX_sem_init(capacity);
1043 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1045 self->simcall.call = SIMCALL_SEM_INIT;
1046 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1047 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1048 self->simcall.args[0].ui = (unsigned int) capacity;
1049 if (self != simix_global->maestro_process) {
1050 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1051 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1052 SIMIX_process_yield(self);
1054 SIMIX_simcall_handle(&self->simcall, 0);
1056 return (smx_sem_t) self->simcall.result.dp;
1059 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
1060 smx_process_t self = SIMIX_process_self();
1062 /* Go to that function to follow the code flow through the simcall barrier */
1063 if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
1064 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1066 self->simcall.call = SIMCALL_SEM_RELEASE;
1067 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1068 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1069 self->simcall.args[0].dp = (void*) sem;
1070 if (self != simix_global->maestro_process) {
1071 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1072 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1073 SIMIX_process_yield(self);
1075 SIMIX_simcall_handle(&self->simcall, 0);
1080 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
1081 smx_process_t self = SIMIX_process_self();
1083 /* Go to that function to follow the code flow through the simcall barrier */
1084 if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
1085 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1087 self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
1088 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1089 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1090 self->simcall.args[0].dp = (void*) sem;
1091 if (self != simix_global->maestro_process) {
1092 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1093 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1094 SIMIX_process_yield(self);
1096 SIMIX_simcall_handle(&self->simcall, 0);
1098 return (int) self->simcall.result.i;
1101 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
1102 smx_process_t self = SIMIX_process_self();
1104 /* Go to that function to follow the code flow through the simcall barrier */
1105 if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
1106 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1108 self->simcall.call = SIMCALL_SEM_ACQUIRE;
1109 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1110 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1111 self->simcall.args[0].dp = (void*) sem;
1112 if (self != simix_global->maestro_process) {
1113 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1114 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1115 SIMIX_process_yield(self);
1117 SIMIX_simcall_handle(&self->simcall, 0);
1122 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
1123 smx_process_t self = SIMIX_process_self();
1125 /* Go to that function to follow the code flow through the simcall barrier */
1126 if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
1127 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1129 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
1130 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1131 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1132 self->simcall.args[0].dp = (void*) sem;
1133 self->simcall.args[1].d = (double) timeout;
1134 if (self != simix_global->maestro_process) {
1135 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1136 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1137 SIMIX_process_yield(self);
1139 SIMIX_simcall_handle(&self->simcall, 0);
1144 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
1145 smx_process_t self = SIMIX_process_self();
1147 /* Go to that function to follow the code flow through the simcall barrier */
1148 if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
1149 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1151 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
1152 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1153 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1154 self->simcall.args[0].dp = (void*) sem;
1155 if (self != simix_global->maestro_process) {
1156 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1157 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1158 SIMIX_process_yield(self);
1160 SIMIX_simcall_handle(&self->simcall, 0);
1162 return (int) self->simcall.result.i;
1165 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
1166 smx_process_t self = SIMIX_process_self();
1168 /* Go to that function to follow the code flow through the simcall barrier */
1169 if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
1170 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1172 self->simcall.call = SIMCALL_FILE_READ;
1173 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1174 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1175 self->simcall.args[0].dp = (void*) fd;
1176 self->simcall.args[1].sgsz = (sg_size_t) size;
1177 self->simcall.args[2].dp = (void*) host;
1178 if (self != simix_global->maestro_process) {
1179 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1180 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1181 SIMIX_process_yield(self);
1183 SIMIX_simcall_handle(&self->simcall, 0);
1185 return (sg_size_t) self->simcall.result.sgsz;
1188 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
1189 smx_process_t self = SIMIX_process_self();
1191 /* Go to that function to follow the code flow through the simcall barrier */
1192 if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
1193 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1195 self->simcall.call = SIMCALL_FILE_WRITE;
1196 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1197 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1198 self->simcall.args[0].dp = (void*) fd;
1199 self->simcall.args[1].sgsz = (sg_size_t) size;
1200 self->simcall.args[2].dp = (void*) host;
1201 if (self != simix_global->maestro_process) {
1202 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1203 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1204 SIMIX_process_yield(self);
1206 SIMIX_simcall_handle(&self->simcall, 0);
1208 return (sg_size_t) self->simcall.result.sgsz;
1211 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
1212 smx_process_t self = SIMIX_process_self();
1214 /* Go to that function to follow the code flow through the simcall barrier */
1215 if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
1216 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1218 self->simcall.call = SIMCALL_FILE_OPEN;
1219 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1220 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1221 self->simcall.args[0].cc = (const char*) fullpath;
1222 self->simcall.args[1].dp = (void*) host;
1223 if (self != simix_global->maestro_process) {
1224 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1225 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1226 SIMIX_process_yield(self);
1228 SIMIX_simcall_handle(&self->simcall, 0);
1230 return (smx_file_t) self->simcall.result.dp;
1233 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
1234 smx_process_t self = SIMIX_process_self();
1236 /* Go to that function to follow the code flow through the simcall barrier */
1237 if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
1238 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1240 self->simcall.call = SIMCALL_FILE_CLOSE;
1241 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1242 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1243 self->simcall.args[0].dp = (void*) fd;
1244 self->simcall.args[1].dp = (void*) host;
1245 if (self != simix_global->maestro_process) {
1246 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1247 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1248 SIMIX_process_yield(self);
1250 SIMIX_simcall_handle(&self->simcall, 0);
1252 return (int) self->simcall.result.i;
1255 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
1256 smx_process_t self = SIMIX_process_self();
1258 /* Go to that function to follow the code flow through the simcall barrier */
1259 if (0) SIMIX_file_unlink(fd, host);
1260 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1262 self->simcall.call = SIMCALL_FILE_UNLINK;
1263 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1264 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1265 self->simcall.args[0].dp = (void*) fd;
1266 self->simcall.args[1].dp = (void*) host;
1267 if (self != simix_global->maestro_process) {
1268 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1269 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1270 SIMIX_process_yield(self);
1272 SIMIX_simcall_handle(&self->simcall, 0);
1274 return (int) self->simcall.result.i;
1277 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
1278 smx_process_t self = SIMIX_process_self();
1280 /* Go to that function to follow the code flow through the simcall barrier */
1281 if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
1282 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1284 self->simcall.call = SIMCALL_FILE_GET_SIZE;
1285 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1286 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1287 self->simcall.args[0].dp = (void*) fd;
1288 if (self != simix_global->maestro_process) {
1289 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1290 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1291 SIMIX_process_yield(self);
1293 SIMIX_simcall_handle(&self->simcall, 0);
1295 return (sg_size_t) self->simcall.result.sgsz;
1298 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
1299 smx_process_t self = SIMIX_process_self();
1301 /* Go to that function to follow the code flow through the simcall barrier */
1302 if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
1303 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1305 self->simcall.call = SIMCALL_FILE_TELL;
1306 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1307 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1308 self->simcall.args[0].dp = (void*) fd;
1309 if (self != simix_global->maestro_process) {
1310 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1311 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1312 SIMIX_process_yield(self);
1314 SIMIX_simcall_handle(&self->simcall, 0);
1316 return (sg_size_t) self->simcall.result.sgsz;
1319 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
1320 smx_process_t self = SIMIX_process_self();
1322 /* Go to that function to follow the code flow through the simcall barrier */
1323 if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
1324 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1326 self->simcall.call = SIMCALL_FILE_SEEK;
1327 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1328 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1329 self->simcall.args[0].dp = (void*) fd;
1330 self->simcall.args[1].sgoff = (sg_offset_t) offset;
1331 self->simcall.args[2].i = (int) origin;
1332 if (self != simix_global->maestro_process) {
1333 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1334 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1335 SIMIX_process_yield(self);
1337 SIMIX_simcall_handle(&self->simcall, 0);
1339 return (int) self->simcall.result.i;
1342 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
1343 smx_process_t self = SIMIX_process_self();
1345 /* Go to that function to follow the code flow through the simcall barrier */
1346 if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
1347 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1349 self->simcall.call = SIMCALL_FILE_GET_INFO;
1350 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1351 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1352 self->simcall.args[0].dp = (void*) fd;
1353 if (self != simix_global->maestro_process) {
1354 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1355 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1356 SIMIX_process_yield(self);
1358 SIMIX_simcall_handle(&self->simcall, 0);
1360 return (xbt_dynar_t) self->simcall.result.dp;
1363 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
1364 smx_process_t self = SIMIX_process_self();
1366 /* Go to that function to follow the code flow through the simcall barrier */
1367 if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
1368 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1370 self->simcall.call = SIMCALL_FILE_MOVE;
1371 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1372 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1373 self->simcall.args[0].dp = (void*) fd;
1374 self->simcall.args[1].cc = (const char*) fullpath;
1375 if (self != simix_global->maestro_process) {
1376 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1377 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1378 SIMIX_process_yield(self);
1380 SIMIX_simcall_handle(&self->simcall, 0);
1382 return (int) self->simcall.result.i;
1385 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
1386 smx_process_t self = SIMIX_process_self();
1388 /* Go to that function to follow the code flow through the simcall barrier */
1389 if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
1390 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1392 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
1393 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1394 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1395 self->simcall.args[0].dp = (void*) storage;
1396 if (self != simix_global->maestro_process) {
1397 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1398 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1399 SIMIX_process_yield(self);
1401 SIMIX_simcall_handle(&self->simcall, 0);
1403 return (sg_size_t) self->simcall.result.sgsz;
1406 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
1407 smx_process_t self = SIMIX_process_self();
1409 /* Go to that function to follow the code flow through the simcall barrier */
1410 if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
1411 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1413 self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
1414 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1415 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1416 self->simcall.args[0].dp = (void*) name;
1417 if (self != simix_global->maestro_process) {
1418 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1419 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1420 SIMIX_process_yield(self);
1422 SIMIX_simcall_handle(&self->simcall, 0);
1424 return (sg_size_t) self->simcall.result.sgsz;
1427 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
1428 smx_process_t self = SIMIX_process_self();
1430 /* Go to that function to follow the code flow through the simcall barrier */
1431 if (0) SIMIX_storage_get_properties(storage);
1432 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1434 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
1435 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1436 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1437 self->simcall.args[0].dp = (void*) storage;
1438 if (self != simix_global->maestro_process) {
1439 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1440 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1441 SIMIX_process_yield(self);
1443 SIMIX_simcall_handle(&self->simcall, 0);
1445 return (xbt_dict_t) self->simcall.result.dp;
1448 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
1449 smx_process_t self = SIMIX_process_self();
1451 /* Go to that function to follow the code flow through the simcall barrier */
1452 if (0) SIMIX_storage_get_content(storage);
1453 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1455 self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
1456 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1457 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1458 self->simcall.args[0].dp = (void*) storage;
1459 if (self != simix_global->maestro_process) {
1460 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1461 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1462 SIMIX_process_yield(self);
1464 SIMIX_simcall_handle(&self->simcall, 0);
1466 return (xbt_dict_t) self->simcall.result.dp;
1469 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
1470 smx_process_t self = SIMIX_process_self();
1472 /* Go to that function to follow the code flow through the simcall barrier */
1473 if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
1474 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1476 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
1477 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1478 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1479 self->simcall.args[0].cc = (const char*) name;
1480 if (self != simix_global->maestro_process) {
1481 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1482 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1483 SIMIX_process_yield(self);
1485 SIMIX_simcall_handle(&self->simcall, 0);
1487 return (xbt_dict_t) self->simcall.result.dp;
1490 inline static int simcall_BODY_mc_random(int min, int max) {
1491 smx_process_t self = SIMIX_process_self();
1493 /* Go to that function to follow the code flow through the simcall barrier */
1494 if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
1495 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1497 self->simcall.call = SIMCALL_MC_RANDOM;
1498 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1499 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1500 self->simcall.args[0].i = (int) min;
1501 self->simcall.args[1].i = (int) max;
1502 if (self != simix_global->maestro_process) {
1503 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1504 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1505 SIMIX_process_yield(self);
1507 SIMIX_simcall_handle(&self->simcall, 0);
1509 return (int) self->simcall.result.i;
1512 inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
1513 smx_process_t self = SIMIX_process_self();
1515 /* Go to that function to follow the code flow through the simcall barrier */
1516 if (0) SIMIX_set_category(synchro, category);
1517 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1519 self->simcall.call = SIMCALL_SET_CATEGORY;
1520 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1521 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1522 self->simcall.args[0].dp = (void*) synchro;
1523 self->simcall.args[1].cc = (const char*) category;
1524 if (self != simix_global->maestro_process) {
1525 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1526 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1527 SIMIX_process_yield(self);
1529 SIMIX_simcall_handle(&self->simcall, 0);
1534 inline static void simcall_BODY_run_kernel(void* code) {
1535 smx_process_t self = SIMIX_process_self();
1537 /* Go to that function to follow the code flow through the simcall barrier */
1538 if (0) SIMIX_run_kernel(code);
1539 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1541 self->simcall.call = SIMCALL_RUN_KERNEL;
1542 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1543 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1544 self->simcall.args[0].dp = (void*) code;
1545 if (self != simix_global->maestro_process) {
1546 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1547 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1548 SIMIX_process_yield(self);
1550 SIMIX_simcall_handle(&self->simcall, 0);