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 inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
11 smx_process_t self = SIMIX_process_self();
13 /* Go to that function to follow the code flow through the simcall barrier */
14 if (0) SIMIX_pre_host_get_by_name(&self->simcall, name);
15 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
17 self->simcall.call = SIMCALL_HOST_GET_BY_NAME;
18 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
19 memset(self->simcall.args, 0, sizeof(self->simcall.args));
20 self->simcall.args[0].cc = (const char*) name;
21 if (self != simix_global->maestro_process) {
22 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
23 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
24 SIMIX_process_yield(self);
26 SIMIX_simcall_enter(&self->simcall, 0);
28 return self->simcall.result.dp;
31 inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
32 smx_process_t self = SIMIX_process_self();
34 /* Go to that function to follow the code flow through the simcall barrier */
35 if (0) SIMIX_pre_host_get_name(&self->simcall, host);
36 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
38 self->simcall.call = SIMCALL_HOST_GET_NAME;
39 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
40 memset(self->simcall.args, 0, sizeof(self->simcall.args));
41 self->simcall.args[0].dp = (void*) host;
42 if (self != simix_global->maestro_process) {
43 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
44 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
45 SIMIX_process_yield(self);
47 SIMIX_simcall_enter(&self->simcall, 0);
49 return self->simcall.result.cc;
52 inline static void simcall_BODY_host_on(smx_host_t host) {
53 smx_process_t self = SIMIX_process_self();
55 /* Go to that function to follow the code flow through the simcall barrier */
56 if (0) SIMIX_pre_host_on(&self->simcall, host);
57 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
59 self->simcall.call = SIMCALL_HOST_ON;
60 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
61 memset(self->simcall.args, 0, sizeof(self->simcall.args));
62 self->simcall.args[0].dp = (void*) host;
63 if (self != simix_global->maestro_process) {
64 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
65 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
66 SIMIX_process_yield(self);
68 SIMIX_simcall_enter(&self->simcall, 0);
73 inline static void simcall_BODY_host_off(smx_host_t host) {
74 smx_process_t self = SIMIX_process_self();
76 /* Go to that function to follow the code flow through the simcall barrier */
77 if (0) SIMIX_pre_host_off(&self->simcall, host);
78 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
80 self->simcall.call = SIMCALL_HOST_OFF;
81 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
82 memset(self->simcall.args, 0, sizeof(self->simcall.args));
83 self->simcall.args[0].dp = (void*) host;
84 if (self != simix_global->maestro_process) {
85 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
86 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
87 SIMIX_process_yield(self);
89 SIMIX_simcall_enter(&self->simcall, 0);
94 inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
95 smx_process_t self = SIMIX_process_self();
97 /* Go to that function to follow the code flow through the simcall barrier */
98 if (0) SIMIX_pre_host_get_properties(&self->simcall, host);
99 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
101 self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
102 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
103 memset(self->simcall.args, 0, sizeof(self->simcall.args));
104 self->simcall.args[0].dp = (void*) host;
105 if (self != simix_global->maestro_process) {
106 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
107 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
108 SIMIX_process_yield(self);
110 SIMIX_simcall_enter(&self->simcall, 0);
112 return self->simcall.result.dp;
115 inline static int simcall_BODY_host_get_core(smx_host_t host) {
116 smx_process_t self = SIMIX_process_self();
118 /* Go to that function to follow the code flow through the simcall barrier */
119 if (0) SIMIX_pre_host_get_core(&self->simcall, host);
120 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
122 self->simcall.call = SIMCALL_HOST_GET_CORE;
123 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
124 memset(self->simcall.args, 0, sizeof(self->simcall.args));
125 self->simcall.args[0].dp = (void*) host;
126 if (self != simix_global->maestro_process) {
127 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
128 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
129 SIMIX_process_yield(self);
131 SIMIX_simcall_enter(&self->simcall, 0);
133 return self->simcall.result.i;
136 inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
137 smx_process_t self = SIMIX_process_self();
139 /* Go to that function to follow the code flow through the simcall barrier */
140 if (0) SIMIX_pre_host_get_process_list(&self->simcall, host);
141 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
143 self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
144 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
145 memset(self->simcall.args, 0, sizeof(self->simcall.args));
146 self->simcall.args[0].dp = (void*) host;
147 if (self != simix_global->maestro_process) {
148 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
149 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
150 SIMIX_process_yield(self);
152 SIMIX_simcall_enter(&self->simcall, 0);
154 return self->simcall.result.dp;
157 inline static double simcall_BODY_host_get_speed(smx_host_t host) {
158 smx_process_t self = SIMIX_process_self();
160 /* Go to that function to follow the code flow through the simcall barrier */
161 if (0) SIMIX_pre_host_get_speed(&self->simcall, host);
162 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
164 self->simcall.call = SIMCALL_HOST_GET_SPEED;
165 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
166 memset(self->simcall.args, 0, sizeof(self->simcall.args));
167 self->simcall.args[0].dp = (void*) host;
168 if (self != simix_global->maestro_process) {
169 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
170 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
171 SIMIX_process_yield(self);
173 SIMIX_simcall_enter(&self->simcall, 0);
175 return self->simcall.result.d;
178 inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
179 smx_process_t self = SIMIX_process_self();
181 /* Go to that function to follow the code flow through the simcall barrier */
182 if (0) SIMIX_pre_host_get_available_speed(&self->simcall, host);
183 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
185 self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
186 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
187 memset(self->simcall.args, 0, sizeof(self->simcall.args));
188 self->simcall.args[0].dp = (void*) host;
189 if (self != simix_global->maestro_process) {
190 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
191 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
192 SIMIX_process_yield(self);
194 SIMIX_simcall_enter(&self->simcall, 0);
196 return self->simcall.result.d;
199 inline static int simcall_BODY_host_get_state(smx_host_t host) {
200 smx_process_t self = SIMIX_process_self();
202 /* Go to that function to follow the code flow through the simcall barrier */
203 if (0) SIMIX_pre_host_get_state(&self->simcall, host);
204 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
206 self->simcall.call = SIMCALL_HOST_GET_STATE;
207 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
208 memset(self->simcall.args, 0, sizeof(self->simcall.args));
209 self->simcall.args[0].dp = (void*) host;
210 if (self != simix_global->maestro_process) {
211 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
212 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
213 SIMIX_process_yield(self);
215 SIMIX_simcall_enter(&self->simcall, 0);
217 return self->simcall.result.i;
220 inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
221 smx_process_t self = SIMIX_process_self();
223 /* Go to that function to follow the code flow through the simcall barrier */
224 if (0) SIMIX_pre_host_get_current_power_peak(&self->simcall, host);
225 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
227 self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
228 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
229 memset(self->simcall.args, 0, sizeof(self->simcall.args));
230 self->simcall.args[0].dp = (void*) host;
231 if (self != simix_global->maestro_process) {
232 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
233 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
234 SIMIX_process_yield(self);
236 SIMIX_simcall_enter(&self->simcall, 0);
238 return self->simcall.result.d;
241 inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
242 smx_process_t self = SIMIX_process_self();
244 /* Go to that function to follow the code flow through the simcall barrier */
245 if (0) SIMIX_pre_host_get_power_peak_at(&self->simcall, host, pstate_index);
246 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
248 self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
249 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
250 memset(self->simcall.args, 0, sizeof(self->simcall.args));
251 self->simcall.args[0].dp = (void*) host;
252 self->simcall.args[1].i = (int) pstate_index;
253 if (self != simix_global->maestro_process) {
254 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
255 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
256 SIMIX_process_yield(self);
258 SIMIX_simcall_enter(&self->simcall, 0);
260 return self->simcall.result.d;
263 inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
264 smx_process_t self = SIMIX_process_self();
266 /* Go to that function to follow the code flow through the simcall barrier */
267 if (0) SIMIX_pre_host_get_nb_pstates(&self->simcall, host);
268 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
270 self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
271 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
272 memset(self->simcall.args, 0, sizeof(self->simcall.args));
273 self->simcall.args[0].dp = (void*) host;
274 if (self != simix_global->maestro_process) {
275 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
276 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
277 SIMIX_process_yield(self);
279 SIMIX_simcall_enter(&self->simcall, 0);
281 return self->simcall.result.i;
284 inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
285 smx_process_t self = SIMIX_process_self();
287 /* Go to that function to follow the code flow through the simcall barrier */
288 if (0) SIMIX_pre_host_set_power_peak_at(&self->simcall, host, pstate_index);
289 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
291 self->simcall.call = SIMCALL_HOST_SET_POWER_PEAK_AT;
292 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
293 memset(self->simcall.args, 0, sizeof(self->simcall.args));
294 self->simcall.args[0].dp = (void*) host;
295 self->simcall.args[1].i = (int) pstate_index;
296 if (self != simix_global->maestro_process) {
297 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
298 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
299 SIMIX_process_yield(self);
301 SIMIX_simcall_enter(&self->simcall, 0);
306 inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
307 smx_process_t self = SIMIX_process_self();
309 /* Go to that function to follow the code flow through the simcall barrier */
310 if (0) SIMIX_pre_host_get_consumed_energy(&self->simcall, host);
311 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
313 self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
314 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
315 memset(self->simcall.args, 0, sizeof(self->simcall.args));
316 self->simcall.args[0].dp = (void*) host;
317 if (self != simix_global->maestro_process) {
318 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
319 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
320 SIMIX_process_yield(self);
322 SIMIX_simcall_enter(&self->simcall, 0);
324 return self->simcall.result.d;
327 inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
328 smx_process_t self = SIMIX_process_self();
330 /* Go to that function to follow the code flow through the simcall barrier */
331 if (0) SIMIX_pre_host_execute(&self->simcall, name, host, computation_amount, priority, bound, affinity_mask);
332 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
334 self->simcall.call = SIMCALL_HOST_EXECUTE;
335 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
336 memset(self->simcall.args, 0, sizeof(self->simcall.args));
337 self->simcall.args[0].cc = (const char*) name;
338 self->simcall.args[1].dp = (void*) host;
339 self->simcall.args[2].d = (double) computation_amount;
340 self->simcall.args[3].d = (double) priority;
341 self->simcall.args[4].d = (double) bound;
342 self->simcall.args[5].ul = (unsigned long) affinity_mask;
343 if (self != simix_global->maestro_process) {
344 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
345 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
346 SIMIX_process_yield(self);
348 SIMIX_simcall_enter(&self->simcall, 0);
350 return self->simcall.result.dp;
353 inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
354 smx_process_t self = SIMIX_process_self();
356 /* Go to that function to follow the code flow through the simcall barrier */
357 if (0) SIMIX_pre_host_parallel_execute(&self->simcall, name, host_nb, host_list, computation_amount, communication_amount, amount, rate);
358 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
360 self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
361 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
362 memset(self->simcall.args, 0, sizeof(self->simcall.args));
363 self->simcall.args[0].cc = (const char*) name;
364 self->simcall.args[1].i = (int) host_nb;
365 self->simcall.args[2].dp = (void*) host_list;
366 self->simcall.args[3].dp = (void*) computation_amount;
367 self->simcall.args[4].dp = (void*) communication_amount;
368 self->simcall.args[5].d = (double) amount;
369 self->simcall.args[6].d = (double) rate;
370 if (self != simix_global->maestro_process) {
371 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
372 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
373 SIMIX_process_yield(self);
375 SIMIX_simcall_enter(&self->simcall, 0);
377 return self->simcall.result.dp;
380 inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) {
381 smx_process_t self = SIMIX_process_self();
383 /* Go to that function to follow the code flow through the simcall barrier */
384 if (0) SIMIX_pre_host_execution_destroy(&self->simcall, execution);
385 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
387 self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY;
388 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
389 memset(self->simcall.args, 0, sizeof(self->simcall.args));
390 self->simcall.args[0].dp = (void*) execution;
391 if (self != simix_global->maestro_process) {
392 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
393 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
394 SIMIX_process_yield(self);
396 SIMIX_simcall_enter(&self->simcall, 0);
401 inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) {
402 smx_process_t self = SIMIX_process_self();
404 /* Go to that function to follow the code flow through the simcall barrier */
405 if (0) SIMIX_pre_host_execution_cancel(&self->simcall, execution);
406 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
408 self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL;
409 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
410 memset(self->simcall.args, 0, sizeof(self->simcall.args));
411 self->simcall.args[0].dp = (void*) execution;
412 if (self != simix_global->maestro_process) {
413 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
414 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
415 SIMIX_process_yield(self);
417 SIMIX_simcall_enter(&self->simcall, 0);
422 inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) {
423 smx_process_t self = SIMIX_process_self();
425 /* Go to that function to follow the code flow through the simcall barrier */
426 if (0) SIMIX_pre_host_execution_get_remains(&self->simcall, execution);
427 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
429 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
430 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
431 memset(self->simcall.args, 0, sizeof(self->simcall.args));
432 self->simcall.args[0].dp = (void*) execution;
433 if (self != simix_global->maestro_process) {
434 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
435 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
436 SIMIX_process_yield(self);
438 SIMIX_simcall_enter(&self->simcall, 0);
440 return self->simcall.result.d;
443 inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
444 smx_process_t self = SIMIX_process_self();
446 /* Go to that function to follow the code flow through the simcall barrier */
447 if (0) SIMIX_pre_host_execution_get_state(&self->simcall, execution);
448 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
450 self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE;
451 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
452 memset(self->simcall.args, 0, sizeof(self->simcall.args));
453 self->simcall.args[0].dp = (void*) execution;
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_enter(&self->simcall, 0);
461 return self->simcall.result.i;
464 inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) {
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_pre_host_execution_set_priority(&self->simcall, execution, priority);
469 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
471 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
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].d = (double) priority;
476 if (self != simix_global->maestro_process) {
477 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
478 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
479 SIMIX_process_yield(self);
481 SIMIX_simcall_enter(&self->simcall, 0);
486 inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) {
487 smx_process_t self = SIMIX_process_self();
489 /* Go to that function to follow the code flow through the simcall barrier */
490 if (0) SIMIX_pre_host_execution_set_bound(&self->simcall, execution, bound);
491 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
493 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND;
494 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
495 memset(self->simcall.args, 0, sizeof(self->simcall.args));
496 self->simcall.args[0].dp = (void*) execution;
497 self->simcall.args[1].d = (double) bound;
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_enter(&self->simcall, 0);
508 inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) {
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_pre_host_execution_set_affinity(&self->simcall, execution, ws, mask);
513 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
515 self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY;
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*) execution;
519 self->simcall.args[1].dp = (void*) ws;
520 self->simcall.args[2].ul = (unsigned long) mask;
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_enter(&self->simcall, 0);
531 inline static int simcall_BODY_host_execution_wait(smx_action_t execution) {
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_pre_host_execution_wait(&self->simcall, execution);
536 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
538 self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT;
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*) execution;
542 if (self != simix_global->maestro_process) {
543 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
544 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
545 SIMIX_process_yield(self);
547 SIMIX_simcall_enter(&self->simcall, 0);
549 return self->simcall.result.i;
552 inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
553 smx_process_t self = SIMIX_process_self();
555 /* Go to that function to follow the code flow through the simcall barrier */
556 if (0) SIMIX_pre_host_get_mounted_storage_list(&self->simcall, host);
557 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
559 self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
560 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
561 memset(self->simcall.args, 0, sizeof(self->simcall.args));
562 self->simcall.args[0].dp = (void*) host;
563 if (self != simix_global->maestro_process) {
564 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
565 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
566 SIMIX_process_yield(self);
568 SIMIX_simcall_enter(&self->simcall, 0);
570 return self->simcall.result.dp;
573 inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
574 smx_process_t self = SIMIX_process_self();
576 /* Go to that function to follow the code flow through the simcall barrier */
577 if (0) SIMIX_pre_host_get_attached_storage_list(&self->simcall, host);
578 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
580 self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
581 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
582 memset(self->simcall.args, 0, sizeof(self->simcall.args));
583 self->simcall.args[0].dp = (void*) host;
584 if (self != simix_global->maestro_process) {
585 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
586 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
587 SIMIX_process_yield(self);
589 SIMIX_simcall_enter(&self->simcall, 0);
591 return self->simcall.result.dp;
594 inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
595 smx_process_t self = SIMIX_process_self();
597 /* Go to that function to follow the code flow through the simcall barrier */
598 if (0) SIMIX_pre_host_get_params(&self->simcall, ind_vm, params);
599 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
601 self->simcall.call = SIMCALL_HOST_GET_PARAMS;
602 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
603 memset(self->simcall.args, 0, sizeof(self->simcall.args));
604 self->simcall.args[0].dp = (void*) ind_vm;
605 self->simcall.args[1].dp = (void*) params;
606 if (self != simix_global->maestro_process) {
607 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
608 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
609 SIMIX_process_yield(self);
611 SIMIX_simcall_enter(&self->simcall, 0);
616 inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
617 smx_process_t self = SIMIX_process_self();
619 /* Go to that function to follow the code flow through the simcall barrier */
620 if (0) SIMIX_pre_host_set_params(&self->simcall, ind_vm, params);
621 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
623 self->simcall.call = SIMCALL_HOST_SET_PARAMS;
624 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
625 memset(self->simcall.args, 0, sizeof(self->simcall.args));
626 self->simcall.args[0].dp = (void*) ind_vm;
627 self->simcall.args[1].dp = (void*) params;
628 if (self != simix_global->maestro_process) {
629 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
630 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
631 SIMIX_process_yield(self);
633 SIMIX_simcall_enter(&self->simcall, 0);
638 inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
639 smx_process_t self = SIMIX_process_self();
641 /* Go to that function to follow the code flow through the simcall barrier */
642 if (0) SIMIX_pre_vm_create(&self->simcall, name, ind_pm);
643 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
645 self->simcall.call = SIMCALL_VM_CREATE;
646 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
647 memset(self->simcall.args, 0, sizeof(self->simcall.args));
648 self->simcall.args[0].cc = (const char*) name;
649 self->simcall.args[1].dp = (void*) ind_pm;
650 if (self != simix_global->maestro_process) {
651 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
652 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
653 SIMIX_process_yield(self);
655 SIMIX_simcall_enter(&self->simcall, 0);
657 return self->simcall.result.dp;
660 inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
661 smx_process_t self = SIMIX_process_self();
663 /* Go to that function to follow the code flow through the simcall barrier */
664 if (0) SIMIX_pre_vm_start(&self->simcall, ind_vm);
665 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
667 self->simcall.call = SIMCALL_VM_START;
668 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
669 memset(self->simcall.args, 0, sizeof(self->simcall.args));
670 self->simcall.args[0].dp = (void*) ind_vm;
671 if (self != simix_global->maestro_process) {
672 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
673 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
674 SIMIX_process_yield(self);
676 SIMIX_simcall_enter(&self->simcall, 0);
681 inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
682 smx_process_t self = SIMIX_process_self();
684 /* Go to that function to follow the code flow through the simcall barrier */
685 if (0) SIMIX_pre_vm_get_state(&self->simcall, ind_vm);
686 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
688 self->simcall.call = SIMCALL_VM_GET_STATE;
689 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
690 memset(self->simcall.args, 0, sizeof(self->simcall.args));
691 self->simcall.args[0].dp = (void*) ind_vm;
692 if (self != simix_global->maestro_process) {
693 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
694 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
695 SIMIX_process_yield(self);
697 SIMIX_simcall_enter(&self->simcall, 0);
699 return self->simcall.result.i;
702 inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
703 smx_process_t self = SIMIX_process_self();
705 /* Go to that function to follow the code flow through the simcall barrier */
706 if (0) SIMIX_pre_vm_migrate(&self->simcall, ind_vm, ind_dst_pm);
707 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
709 self->simcall.call = SIMCALL_VM_MIGRATE;
710 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
711 memset(self->simcall.args, 0, sizeof(self->simcall.args));
712 self->simcall.args[0].dp = (void*) ind_vm;
713 self->simcall.args[1].dp = (void*) ind_dst_pm;
714 if (self != simix_global->maestro_process) {
715 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
716 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
717 SIMIX_process_yield(self);
719 SIMIX_simcall_enter(&self->simcall, 0);
724 inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
725 smx_process_t self = SIMIX_process_self();
727 /* Go to that function to follow the code flow through the simcall barrier */
728 if (0) SIMIX_pre_vm_get_pm(&self->simcall, ind_vm);
729 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
731 self->simcall.call = SIMCALL_VM_GET_PM;
732 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
733 memset(self->simcall.args, 0, sizeof(self->simcall.args));
734 self->simcall.args[0].dp = (void*) ind_vm;
735 if (self != simix_global->maestro_process) {
736 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
737 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
738 SIMIX_process_yield(self);
740 SIMIX_simcall_enter(&self->simcall, 0);
742 return self->simcall.result.dp;
745 inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
746 smx_process_t self = SIMIX_process_self();
748 /* Go to that function to follow the code flow through the simcall barrier */
749 if (0) SIMIX_pre_vm_set_bound(&self->simcall, ind_vm, bound);
750 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
752 self->simcall.call = SIMCALL_VM_SET_BOUND;
753 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
754 memset(self->simcall.args, 0, sizeof(self->simcall.args));
755 self->simcall.args[0].dp = (void*) ind_vm;
756 self->simcall.args[1].d = (double) bound;
757 if (self != simix_global->maestro_process) {
758 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
759 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
760 SIMIX_process_yield(self);
762 SIMIX_simcall_enter(&self->simcall, 0);
767 inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
768 smx_process_t self = SIMIX_process_self();
770 /* Go to that function to follow the code flow through the simcall barrier */
771 if (0) SIMIX_pre_vm_set_affinity(&self->simcall, ind_vm, ind_pm, mask);
772 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
774 self->simcall.call = SIMCALL_VM_SET_AFFINITY;
775 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
776 memset(self->simcall.args, 0, sizeof(self->simcall.args));
777 self->simcall.args[0].dp = (void*) ind_vm;
778 self->simcall.args[1].dp = (void*) ind_pm;
779 self->simcall.args[2].ul = (unsigned long) mask;
780 if (self != simix_global->maestro_process) {
781 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
782 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
783 SIMIX_process_yield(self);
785 SIMIX_simcall_enter(&self->simcall, 0);
790 inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
791 smx_process_t self = SIMIX_process_self();
793 /* Go to that function to follow the code flow through the simcall barrier */
794 if (0) SIMIX_pre_vm_destroy(&self->simcall, ind_vm);
795 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
797 self->simcall.call = SIMCALL_VM_DESTROY;
798 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
799 memset(self->simcall.args, 0, sizeof(self->simcall.args));
800 self->simcall.args[0].dp = (void*) ind_vm;
801 if (self != simix_global->maestro_process) {
802 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
803 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
804 SIMIX_process_yield(self);
806 SIMIX_simcall_enter(&self->simcall, 0);
811 inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
812 smx_process_t self = SIMIX_process_self();
814 /* Go to that function to follow the code flow through the simcall barrier */
815 if (0) SIMIX_pre_vm_suspend(&self->simcall, ind_vm);
816 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
818 self->simcall.call = SIMCALL_VM_SUSPEND;
819 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
820 memset(self->simcall.args, 0, sizeof(self->simcall.args));
821 self->simcall.args[0].dp = (void*) ind_vm;
822 if (self != simix_global->maestro_process) {
823 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
824 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
825 SIMIX_process_yield(self);
827 SIMIX_simcall_enter(&self->simcall, 0);
832 inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
833 smx_process_t self = SIMIX_process_self();
835 /* Go to that function to follow the code flow through the simcall barrier */
836 if (0) SIMIX_pre_vm_resume(&self->simcall, ind_vm);
837 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
839 self->simcall.call = SIMCALL_VM_RESUME;
840 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
841 memset(self->simcall.args, 0, sizeof(self->simcall.args));
842 self->simcall.args[0].dp = (void*) ind_vm;
843 if (self != simix_global->maestro_process) {
844 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
845 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
846 SIMIX_process_yield(self);
848 SIMIX_simcall_enter(&self->simcall, 0);
853 inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
854 smx_process_t self = SIMIX_process_self();
856 /* Go to that function to follow the code flow through the simcall barrier */
857 if (0) SIMIX_pre_vm_shutdown(&self->simcall, ind_vm);
858 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
860 self->simcall.call = SIMCALL_VM_SHUTDOWN;
861 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
862 memset(self->simcall.args, 0, sizeof(self->simcall.args));
863 self->simcall.args[0].dp = (void*) ind_vm;
864 if (self != simix_global->maestro_process) {
865 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
866 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
867 SIMIX_process_yield(self);
869 SIMIX_simcall_enter(&self->simcall, 0);
874 inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
875 smx_process_t self = SIMIX_process_self();
877 /* Go to that function to follow the code flow through the simcall barrier */
878 if (0) SIMIX_pre_vm_save(&self->simcall, ind_vm);
879 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
881 self->simcall.call = SIMCALL_VM_SAVE;
882 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
883 memset(self->simcall.args, 0, sizeof(self->simcall.args));
884 self->simcall.args[0].dp = (void*) ind_vm;
885 if (self != simix_global->maestro_process) {
886 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
887 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
888 SIMIX_process_yield(self);
890 SIMIX_simcall_enter(&self->simcall, 0);
895 inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
896 smx_process_t self = SIMIX_process_self();
898 /* Go to that function to follow the code flow through the simcall barrier */
899 if (0) SIMIX_pre_vm_restore(&self->simcall, ind_vm);
900 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
902 self->simcall.call = SIMCALL_VM_RESTORE;
903 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
904 memset(self->simcall.args, 0, sizeof(self->simcall.args));
905 self->simcall.args[0].dp = (void*) ind_vm;
906 if (self != simix_global->maestro_process) {
907 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
908 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
909 SIMIX_process_yield(self);
911 SIMIX_simcall_enter(&self->simcall, 0);
916 inline static void simcall_BODY_process_create(smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart) {
917 smx_process_t self = SIMIX_process_self();
919 /* Go to that function to follow the code flow through the simcall barrier */
920 if (0) SIMIX_pre_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
921 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
923 self->simcall.call = SIMCALL_PROCESS_CREATE;
924 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
925 memset(self->simcall.args, 0, sizeof(self->simcall.args));
926 self->simcall.args[0].dp = (void*) process;
927 self->simcall.args[1].cc = (const char*) name;
928 self->simcall.args[2].fp = (FPtr) code;
929 self->simcall.args[3].dp = (void*) data;
930 self->simcall.args[4].cc = (const char*) hostname;
931 self->simcall.args[5].d = (double) kill_time;
932 self->simcall.args[6].i = (int) argc;
933 self->simcall.args[7].dp = (void*) argv;
934 self->simcall.args[8].dp = (void*) properties;
935 self->simcall.args[9].i = (int) auto_restart;
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_enter(&self->simcall, 0);
946 inline static void simcall_BODY_process_kill(smx_process_t process) {
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) SIMIX_pre_process_kill(&self->simcall, process);
951 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
953 self->simcall.call = SIMCALL_PROCESS_KILL;
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 if (self != simix_global->maestro_process) {
958 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
959 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
960 SIMIX_process_yield(self);
962 SIMIX_simcall_enter(&self->simcall, 0);
967 inline static void simcall_BODY_process_killall(int reset_pid) {
968 smx_process_t self = SIMIX_process_self();
970 /* Go to that function to follow the code flow through the simcall barrier */
971 if (0) SIMIX_pre_process_killall(&self->simcall, reset_pid);
972 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
974 self->simcall.call = SIMCALL_PROCESS_KILLALL;
975 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
976 memset(self->simcall.args, 0, sizeof(self->simcall.args));
977 self->simcall.args[0].i = (int) reset_pid;
978 if (self != simix_global->maestro_process) {
979 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
980 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
981 SIMIX_process_yield(self);
983 SIMIX_simcall_enter(&self->simcall, 0);
988 inline static void simcall_BODY_process_cleanup(smx_process_t process) {
989 smx_process_t self = SIMIX_process_self();
991 /* Go to that function to follow the code flow through the simcall barrier */
992 if (0) SIMIX_pre_process_cleanup(&self->simcall, process);
993 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
995 self->simcall.call = SIMCALL_PROCESS_CLEANUP;
996 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
997 memset(self->simcall.args, 0, sizeof(self->simcall.args));
998 self->simcall.args[0].dp = (void*) process;
999 if (self != simix_global->maestro_process) {
1000 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1001 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1002 SIMIX_process_yield(self);
1004 SIMIX_simcall_enter(&self->simcall, 0);
1009 inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
1010 smx_process_t self = SIMIX_process_self();
1012 /* Go to that function to follow the code flow through the simcall barrier */
1013 if (0) SIMIX_pre_process_change_host(&self->simcall, process, dest);
1014 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1016 self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
1017 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1018 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1019 self->simcall.args[0].dp = (void*) process;
1020 self->simcall.args[1].dp = (void*) dest;
1021 if (self != simix_global->maestro_process) {
1022 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1023 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1024 SIMIX_process_yield(self);
1026 SIMIX_simcall_enter(&self->simcall, 0);
1031 inline static void simcall_BODY_process_suspend(smx_process_t process) {
1032 smx_process_t self = SIMIX_process_self();
1034 /* Go to that function to follow the code flow through the simcall barrier */
1035 if (0) SIMIX_pre_process_suspend(&self->simcall, process);
1036 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1038 self->simcall.call = SIMCALL_PROCESS_SUSPEND;
1039 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1040 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1041 self->simcall.args[0].dp = (void*) process;
1042 if (self != simix_global->maestro_process) {
1043 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1044 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1045 SIMIX_process_yield(self);
1047 SIMIX_simcall_enter(&self->simcall, 0);
1052 inline static void simcall_BODY_process_resume(smx_process_t process) {
1053 smx_process_t self = SIMIX_process_self();
1055 /* Go to that function to follow the code flow through the simcall barrier */
1056 if (0) SIMIX_pre_process_resume(&self->simcall, process);
1057 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1059 self->simcall.call = SIMCALL_PROCESS_RESUME;
1060 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1061 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1062 self->simcall.args[0].dp = (void*) process;
1063 if (self != simix_global->maestro_process) {
1064 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1065 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1066 SIMIX_process_yield(self);
1068 SIMIX_simcall_enter(&self->simcall, 0);
1073 inline static int simcall_BODY_process_count() {
1074 smx_process_t self = SIMIX_process_self();
1076 /* Go to that function to follow the code flow through the simcall barrier */
1077 if (0) SIMIX_pre_process_count(&self->simcall);
1078 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1080 self->simcall.call = SIMCALL_PROCESS_COUNT;
1081 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1082 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1084 if (self != simix_global->maestro_process) {
1085 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1086 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1087 SIMIX_process_yield(self);
1089 SIMIX_simcall_enter(&self->simcall, 0);
1091 return self->simcall.result.i;
1094 inline static int simcall_BODY_process_get_PID(smx_process_t process) {
1095 smx_process_t self = SIMIX_process_self();
1097 /* Go to that function to follow the code flow through the simcall barrier */
1098 if (0) SIMIX_pre_process_get_PID(&self->simcall, process);
1099 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1101 self->simcall.call = SIMCALL_PROCESS_GET_PID;
1102 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1103 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1104 self->simcall.args[0].dp = (void*) process;
1105 if (self != simix_global->maestro_process) {
1106 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1107 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1108 SIMIX_process_yield(self);
1110 SIMIX_simcall_enter(&self->simcall, 0);
1112 return self->simcall.result.i;
1115 inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
1116 smx_process_t self = SIMIX_process_self();
1118 /* Go to that function to follow the code flow through the simcall barrier */
1119 if (0) SIMIX_pre_process_get_PPID(&self->simcall, process);
1120 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1122 self->simcall.call = SIMCALL_PROCESS_GET_PPID;
1123 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1124 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1125 self->simcall.args[0].dp = (void*) process;
1126 if (self != simix_global->maestro_process) {
1127 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1128 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1129 SIMIX_process_yield(self);
1131 SIMIX_simcall_enter(&self->simcall, 0);
1133 return self->simcall.result.i;
1136 inline static void* simcall_BODY_process_get_data(smx_process_t process) {
1137 smx_process_t self = SIMIX_process_self();
1139 /* Go to that function to follow the code flow through the simcall barrier */
1140 if (0) SIMIX_pre_process_get_data(&self->simcall, process);
1141 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1143 self->simcall.call = SIMCALL_PROCESS_GET_DATA;
1144 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1145 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1146 self->simcall.args[0].dp = (void*) process;
1147 if (self != simix_global->maestro_process) {
1148 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1149 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1150 SIMIX_process_yield(self);
1152 SIMIX_simcall_enter(&self->simcall, 0);
1154 return self->simcall.result.dp;
1157 inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
1158 smx_process_t self = SIMIX_process_self();
1160 /* Go to that function to follow the code flow through the simcall barrier */
1161 if (0) SIMIX_pre_process_set_data(&self->simcall, process, data);
1162 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1164 self->simcall.call = SIMCALL_PROCESS_SET_DATA;
1165 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1166 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1167 self->simcall.args[0].dp = (void*) process;
1168 self->simcall.args[1].dp = (void*) data;
1169 if (self != simix_global->maestro_process) {
1170 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1171 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1172 SIMIX_process_yield(self);
1174 SIMIX_simcall_enter(&self->simcall, 0);
1179 inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
1180 smx_process_t self = SIMIX_process_self();
1182 /* Go to that function to follow the code flow through the simcall barrier */
1183 if (0) SIMIX_pre_process_get_host(&self->simcall, process);
1184 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1186 self->simcall.call = SIMCALL_PROCESS_GET_HOST;
1187 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1188 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1189 self->simcall.args[0].dp = (void*) process;
1190 if (self != simix_global->maestro_process) {
1191 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1192 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1193 SIMIX_process_yield(self);
1195 SIMIX_simcall_enter(&self->simcall, 0);
1197 return self->simcall.result.dp;
1200 inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
1201 smx_process_t self = SIMIX_process_self();
1203 /* Go to that function to follow the code flow through the simcall barrier */
1204 if (0) SIMIX_pre_process_get_name(&self->simcall, process);
1205 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1207 self->simcall.call = SIMCALL_PROCESS_GET_NAME;
1208 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1209 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1210 self->simcall.args[0].dp = (void*) process;
1211 if (self != simix_global->maestro_process) {
1212 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1213 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1214 SIMIX_process_yield(self);
1216 SIMIX_simcall_enter(&self->simcall, 0);
1218 return self->simcall.result.cc;
1221 inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
1222 smx_process_t self = SIMIX_process_self();
1224 /* Go to that function to follow the code flow through the simcall barrier */
1225 if (0) SIMIX_pre_process_is_suspended(&self->simcall, process);
1226 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1228 self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
1229 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1230 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1231 self->simcall.args[0].dp = (void*) process;
1232 if (self != simix_global->maestro_process) {
1233 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1234 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1235 SIMIX_process_yield(self);
1237 SIMIX_simcall_enter(&self->simcall, 0);
1239 return self->simcall.result.i;
1242 inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
1243 smx_process_t self = SIMIX_process_self();
1245 /* Go to that function to follow the code flow through the simcall barrier */
1246 if (0) SIMIX_pre_process_get_properties(&self->simcall, process);
1247 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1249 self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
1250 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1251 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1252 self->simcall.args[0].dp = (void*) process;
1253 if (self != simix_global->maestro_process) {
1254 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1255 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1256 SIMIX_process_yield(self);
1258 SIMIX_simcall_enter(&self->simcall, 0);
1260 return self->simcall.result.dp;
1263 inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
1264 smx_process_t self = SIMIX_process_self();
1266 /* Go to that function to follow the code flow through the simcall barrier */
1267 if (0) SIMIX_pre_process_join(&self->simcall, process, timeout);
1268 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1270 self->simcall.call = SIMCALL_PROCESS_JOIN;
1271 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1272 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1273 self->simcall.args[0].dp = (void*) process;
1274 self->simcall.args[1].d = (double) timeout;
1275 if (self != simix_global->maestro_process) {
1276 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1277 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1278 SIMIX_process_yield(self);
1280 SIMIX_simcall_enter(&self->simcall, 0);
1282 return self->simcall.result.i;
1285 inline static int simcall_BODY_process_sleep(double duration) {
1286 smx_process_t self = SIMIX_process_self();
1288 /* Go to that function to follow the code flow through the simcall barrier */
1289 if (0) SIMIX_pre_process_sleep(&self->simcall, duration);
1290 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1292 self->simcall.call = SIMCALL_PROCESS_SLEEP;
1293 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1294 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1295 self->simcall.args[0].d = (double) duration;
1296 if (self != simix_global->maestro_process) {
1297 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1298 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1299 SIMIX_process_yield(self);
1301 SIMIX_simcall_enter(&self->simcall, 0);
1303 return self->simcall.result.i;
1306 inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
1307 smx_process_t self = SIMIX_process_self();
1309 /* Go to that function to follow the code flow through the simcall barrier */
1310 if (0) SIMIX_pre_process_on_exit(&self->simcall, process, fun, data);
1311 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1313 self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
1314 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1315 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1316 self->simcall.args[0].dp = (void*) process;
1317 self->simcall.args[1].fp = (FPtr) fun;
1318 self->simcall.args[2].dp = (void*) data;
1319 if (self != simix_global->maestro_process) {
1320 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1321 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1322 SIMIX_process_yield(self);
1324 SIMIX_simcall_enter(&self->simcall, 0);
1329 inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
1330 smx_process_t self = SIMIX_process_self();
1332 /* Go to that function to follow the code flow through the simcall barrier */
1333 if (0) SIMIX_pre_process_auto_restart_set(&self->simcall, process, auto_restart);
1334 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1336 self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
1337 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1338 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1339 self->simcall.args[0].dp = (void*) process;
1340 self->simcall.args[1].i = (int) auto_restart;
1341 if (self != simix_global->maestro_process) {
1342 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1343 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1344 SIMIX_process_yield(self);
1346 SIMIX_simcall_enter(&self->simcall, 0);
1351 inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
1352 smx_process_t self = SIMIX_process_self();
1354 /* Go to that function to follow the code flow through the simcall barrier */
1355 if (0) SIMIX_pre_process_restart(&self->simcall, process);
1356 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1358 self->simcall.call = SIMCALL_PROCESS_RESTART;
1359 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1360 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1361 self->simcall.args[0].dp = (void*) process;
1362 if (self != simix_global->maestro_process) {
1363 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1364 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1365 SIMIX_process_yield(self);
1367 SIMIX_simcall_enter(&self->simcall, 0);
1369 return self->simcall.result.dp;
1372 inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
1373 smx_process_t self = SIMIX_process_self();
1375 /* Go to that function to follow the code flow through the simcall barrier */
1376 if (0) SIMIX_pre_rdv_create(&self->simcall, name);
1377 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1379 self->simcall.call = SIMCALL_RDV_CREATE;
1380 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1381 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1382 self->simcall.args[0].cc = (const char*) name;
1383 if (self != simix_global->maestro_process) {
1384 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1385 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1386 SIMIX_process_yield(self);
1388 SIMIX_simcall_enter(&self->simcall, 0);
1390 return self->simcall.result.dp;
1393 inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
1394 smx_process_t self = SIMIX_process_self();
1396 /* Go to that function to follow the code flow through the simcall barrier */
1397 if (0) SIMIX_pre_rdv_destroy(&self->simcall, rdv);
1398 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1400 self->simcall.call = SIMCALL_RDV_DESTROY;
1401 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1402 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1403 self->simcall.args[0].dp = (void*) rdv;
1404 if (self != simix_global->maestro_process) {
1405 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1406 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1407 SIMIX_process_yield(self);
1409 SIMIX_simcall_enter(&self->simcall, 0);
1414 inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
1415 smx_process_t self = SIMIX_process_self();
1417 /* Go to that function to follow the code flow through the simcall barrier */
1418 if (0) SIMIX_pre_rdv_comm_count_by_host(&self->simcall, rdv, host);
1419 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1421 self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
1422 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1423 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1424 self->simcall.args[0].dp = (void*) rdv;
1425 self->simcall.args[1].dp = (void*) host;
1426 if (self != simix_global->maestro_process) {
1427 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1428 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1429 SIMIX_process_yield(self);
1431 SIMIX_simcall_enter(&self->simcall, 0);
1433 return self->simcall.result.ui;
1436 inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
1437 smx_process_t self = SIMIX_process_self();
1439 /* Go to that function to follow the code flow through the simcall barrier */
1440 if (0) SIMIX_pre_rdv_get_head(&self->simcall, rdv);
1441 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1443 self->simcall.call = SIMCALL_RDV_GET_HEAD;
1444 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1445 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1446 self->simcall.args[0].dp = (void*) rdv;
1447 if (self != simix_global->maestro_process) {
1448 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1449 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1450 SIMIX_process_yield(self);
1452 SIMIX_simcall_enter(&self->simcall, 0);
1454 return self->simcall.result.dp;
1457 inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
1458 smx_process_t self = SIMIX_process_self();
1460 /* Go to that function to follow the code flow through the simcall barrier */
1461 if (0) SIMIX_pre_rdv_set_receiver(&self->simcall, rdv, receiver);
1462 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1464 self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
1465 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1466 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1467 self->simcall.args[0].dp = (void*) rdv;
1468 self->simcall.args[1].dp = (void*) receiver;
1469 if (self != simix_global->maestro_process) {
1470 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1471 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1472 SIMIX_process_yield(self);
1474 SIMIX_simcall_enter(&self->simcall, 0);
1479 inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
1480 smx_process_t self = SIMIX_process_self();
1482 /* Go to that function to follow the code flow through the simcall barrier */
1483 if (0) SIMIX_pre_rdv_get_receiver(&self->simcall, rdv);
1484 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1486 self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
1487 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1488 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1489 self->simcall.args[0].dp = (void*) rdv;
1490 if (self != simix_global->maestro_process) {
1491 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1492 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1493 SIMIX_process_yield(self);
1495 SIMIX_simcall_enter(&self->simcall, 0);
1497 return self->simcall.result.dp;
1500 inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
1501 smx_process_t self = SIMIX_process_self();
1503 /* Go to that function to follow the code flow through the simcall barrier */
1504 if (0) SIMIX_pre_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
1505 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1507 self->simcall.call = SIMCALL_COMM_IPROBE;
1508 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1509 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1510 self->simcall.args[0].dp = (void*) rdv;
1511 self->simcall.args[1].i = (int) type;
1512 self->simcall.args[2].i = (int) src;
1513 self->simcall.args[3].i = (int) tag;
1514 self->simcall.args[4].fp = (FPtr) match_fun;
1515 self->simcall.args[5].dp = (void*) data;
1516 if (self != simix_global->maestro_process) {
1517 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1518 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1519 SIMIX_process_yield(self);
1521 SIMIX_simcall_enter(&self->simcall, 0);
1523 return self->simcall.result.dp;
1526 inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
1527 smx_process_t self = SIMIX_process_self();
1529 /* Go to that function to follow the code flow through the simcall barrier */
1530 if (0) SIMIX_pre_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
1531 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1533 self->simcall.call = SIMCALL_COMM_SEND;
1534 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1535 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1536 self->simcall.args[0].dp = (void*) src;
1537 self->simcall.args[1].dp = (void*) rdv;
1538 self->simcall.args[2].d = (double) task_size;
1539 self->simcall.args[3].d = (double) rate;
1540 self->simcall.args[4].dp = (void*) src_buff;
1541 self->simcall.args[5].sz = (size_t) src_buff_size;
1542 self->simcall.args[6].fp = (FPtr) match_fun;
1543 self->simcall.args[7].fp = (FPtr) copy_data_fun;
1544 self->simcall.args[8].dp = (void*) data;
1545 self->simcall.args[9].d = (double) timeout;
1546 if (self != simix_global->maestro_process) {
1547 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1548 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1549 SIMIX_process_yield(self);
1551 SIMIX_simcall_enter(&self->simcall, 0);
1556 inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
1557 smx_process_t self = SIMIX_process_self();
1559 /* Go to that function to follow the code flow through the simcall barrier */
1560 if (0) SIMIX_pre_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
1561 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1563 self->simcall.call = SIMCALL_COMM_ISEND;
1564 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1565 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1566 self->simcall.args[0].dp = (void*) src;
1567 self->simcall.args[1].dp = (void*) rdv;
1568 self->simcall.args[2].d = (double) task_size;
1569 self->simcall.args[3].d = (double) rate;
1570 self->simcall.args[4].dp = (void*) src_buff;
1571 self->simcall.args[5].sz = (size_t) src_buff_size;
1572 self->simcall.args[6].fp = (FPtr) match_fun;
1573 self->simcall.args[7].fp = (FPtr) clean_fun;
1574 self->simcall.args[8].fp = (FPtr) copy_data_fun;
1575 self->simcall.args[9].dp = (void*) data;
1576 self->simcall.args[10].i = (int) detached;
1577 if (self != simix_global->maestro_process) {
1578 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1579 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1580 SIMIX_process_yield(self);
1582 SIMIX_simcall_enter(&self->simcall, 0);
1584 return self->simcall.result.dp;
1587 inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
1588 smx_process_t self = SIMIX_process_self();
1590 /* Go to that function to follow the code flow through the simcall barrier */
1591 if (0) SIMIX_pre_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
1592 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1594 self->simcall.call = SIMCALL_COMM_RECV;
1595 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1596 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1597 self->simcall.args[0].dp = (void*) rdv;
1598 self->simcall.args[1].dp = (void*) dst_buff;
1599 self->simcall.args[2].dp = (void*) dst_buff_size;
1600 self->simcall.args[3].fp = (FPtr) match_fun;
1601 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1602 self->simcall.args[5].dp = (void*) data;
1603 self->simcall.args[6].d = (double) timeout;
1604 self->simcall.args[7].d = (double) rate;
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_enter(&self->simcall, 0);
1615 inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
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) SIMIX_pre_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
1620 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1622 self->simcall.call = SIMCALL_COMM_IRECV;
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*) rdv;
1626 self->simcall.args[1].dp = (void*) dst_buff;
1627 self->simcall.args[2].dp = (void*) dst_buff_size;
1628 self->simcall.args[3].fp = (FPtr) match_fun;
1629 self->simcall.args[4].fp = (FPtr) copy_data_fun;
1630 self->simcall.args[5].dp = (void*) data;
1631 self->simcall.args[6].d = (double) rate;
1632 if (self != simix_global->maestro_process) {
1633 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1634 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1635 SIMIX_process_yield(self);
1637 SIMIX_simcall_enter(&self->simcall, 0);
1639 return self->simcall.result.dp;
1642 inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
1643 smx_process_t self = SIMIX_process_self();
1645 /* Go to that function to follow the code flow through the simcall barrier */
1646 if (0) SIMIX_pre_comm_cancel(&self->simcall, comm);
1647 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1649 self->simcall.call = SIMCALL_COMM_CANCEL;
1650 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1651 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1652 self->simcall.args[0].dp = (void*) comm;
1653 if (self != simix_global->maestro_process) {
1654 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1655 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1656 SIMIX_process_yield(self);
1658 SIMIX_simcall_enter(&self->simcall, 0);
1663 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
1664 smx_process_t self = SIMIX_process_self();
1666 /* Go to that function to follow the code flow through the simcall barrier */
1667 if (0) SIMIX_pre_comm_waitany(&self->simcall, comms);
1668 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1670 self->simcall.call = SIMCALL_COMM_WAITANY;
1671 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1672 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1673 self->simcall.args[0].dp = (void*) comms;
1674 if (self != simix_global->maestro_process) {
1675 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1676 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1677 SIMIX_process_yield(self);
1679 SIMIX_simcall_enter(&self->simcall, 0);
1681 return self->simcall.result.i;
1684 inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
1685 smx_process_t self = SIMIX_process_self();
1687 /* Go to that function to follow the code flow through the simcall barrier */
1688 if (0) SIMIX_pre_comm_wait(&self->simcall, comm, timeout);
1689 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1691 self->simcall.call = SIMCALL_COMM_WAIT;
1692 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1693 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1694 self->simcall.args[0].dp = (void*) comm;
1695 self->simcall.args[1].d = (double) timeout;
1696 if (self != simix_global->maestro_process) {
1697 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1698 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1699 SIMIX_process_yield(self);
1701 SIMIX_simcall_enter(&self->simcall, 0);
1706 inline static int simcall_BODY_comm_test(smx_action_t comm) {
1707 smx_process_t self = SIMIX_process_self();
1709 /* Go to that function to follow the code flow through the simcall barrier */
1710 if (0) SIMIX_pre_comm_test(&self->simcall, comm);
1711 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1713 self->simcall.call = SIMCALL_COMM_TEST;
1714 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1715 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1716 self->simcall.args[0].dp = (void*) comm;
1717 if (self != simix_global->maestro_process) {
1718 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1719 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1720 SIMIX_process_yield(self);
1722 SIMIX_simcall_enter(&self->simcall, 0);
1724 return self->simcall.result.i;
1727 inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
1728 smx_process_t self = SIMIX_process_self();
1730 /* Go to that function to follow the code flow through the simcall barrier */
1731 if (0) SIMIX_pre_comm_testany(&self->simcall, comms);
1732 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1734 self->simcall.call = SIMCALL_COMM_TESTANY;
1735 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1736 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1737 self->simcall.args[0].dp = (void*) comms;
1738 if (self != simix_global->maestro_process) {
1739 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1740 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1741 SIMIX_process_yield(self);
1743 SIMIX_simcall_enter(&self->simcall, 0);
1745 return self->simcall.result.i;
1748 inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
1749 smx_process_t self = SIMIX_process_self();
1751 /* Go to that function to follow the code flow through the simcall barrier */
1752 if (0) SIMIX_pre_comm_get_remains(&self->simcall, comm);
1753 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1755 self->simcall.call = SIMCALL_COMM_GET_REMAINS;
1756 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1757 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1758 self->simcall.args[0].dp = (void*) comm;
1759 if (self != simix_global->maestro_process) {
1760 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1761 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1762 SIMIX_process_yield(self);
1764 SIMIX_simcall_enter(&self->simcall, 0);
1766 return self->simcall.result.d;
1769 inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
1770 smx_process_t self = SIMIX_process_self();
1772 /* Go to that function to follow the code flow through the simcall barrier */
1773 if (0) SIMIX_pre_comm_get_state(&self->simcall, comm);
1774 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1776 self->simcall.call = SIMCALL_COMM_GET_STATE;
1777 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1778 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1779 self->simcall.args[0].dp = (void*) comm;
1780 if (self != simix_global->maestro_process) {
1781 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1782 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1783 SIMIX_process_yield(self);
1785 SIMIX_simcall_enter(&self->simcall, 0);
1787 return self->simcall.result.i;
1790 inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
1791 smx_process_t self = SIMIX_process_self();
1793 /* Go to that function to follow the code flow through the simcall barrier */
1794 if (0) SIMIX_pre_comm_get_src_data(&self->simcall, comm);
1795 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1797 self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
1798 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1799 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1800 self->simcall.args[0].dp = (void*) comm;
1801 if (self != simix_global->maestro_process) {
1802 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1803 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1804 SIMIX_process_yield(self);
1806 SIMIX_simcall_enter(&self->simcall, 0);
1808 return self->simcall.result.dp;
1811 inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
1812 smx_process_t self = SIMIX_process_self();
1814 /* Go to that function to follow the code flow through the simcall barrier */
1815 if (0) SIMIX_pre_comm_get_dst_data(&self->simcall, comm);
1816 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1818 self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
1819 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1820 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1821 self->simcall.args[0].dp = (void*) comm;
1822 if (self != simix_global->maestro_process) {
1823 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1824 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1825 SIMIX_process_yield(self);
1827 SIMIX_simcall_enter(&self->simcall, 0);
1829 return self->simcall.result.dp;
1832 inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
1833 smx_process_t self = SIMIX_process_self();
1835 /* Go to that function to follow the code flow through the simcall barrier */
1836 if (0) SIMIX_pre_comm_get_src_proc(&self->simcall, comm);
1837 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1839 self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
1840 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1841 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1842 self->simcall.args[0].dp = (void*) comm;
1843 if (self != simix_global->maestro_process) {
1844 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1845 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1846 SIMIX_process_yield(self);
1848 SIMIX_simcall_enter(&self->simcall, 0);
1850 return self->simcall.result.dp;
1853 inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
1854 smx_process_t self = SIMIX_process_self();
1856 /* Go to that function to follow the code flow through the simcall barrier */
1857 if (0) SIMIX_pre_comm_get_dst_proc(&self->simcall, comm);
1858 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1860 self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
1861 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1862 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1863 self->simcall.args[0].dp = (void*) comm;
1864 if (self != simix_global->maestro_process) {
1865 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1866 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1867 SIMIX_process_yield(self);
1869 SIMIX_simcall_enter(&self->simcall, 0);
1871 return self->simcall.result.dp;
1874 inline static smx_mutex_t simcall_BODY_mutex_init() {
1875 smx_process_t self = SIMIX_process_self();
1877 /* Go to that function to follow the code flow through the simcall barrier */
1878 if (0) SIMIX_pre_mutex_init(&self->simcall);
1879 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1881 self->simcall.call = SIMCALL_MUTEX_INIT;
1882 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1883 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1885 if (self != simix_global->maestro_process) {
1886 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1887 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1888 SIMIX_process_yield(self);
1890 SIMIX_simcall_enter(&self->simcall, 0);
1892 return self->simcall.result.dp;
1895 inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
1896 smx_process_t self = SIMIX_process_self();
1898 /* Go to that function to follow the code flow through the simcall barrier */
1899 if (0) SIMIX_pre_mutex_destroy(&self->simcall, mutex);
1900 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1902 self->simcall.call = SIMCALL_MUTEX_DESTROY;
1903 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1904 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1905 self->simcall.args[0].dp = (void*) mutex;
1906 if (self != simix_global->maestro_process) {
1907 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1908 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1909 SIMIX_process_yield(self);
1911 SIMIX_simcall_enter(&self->simcall, 0);
1916 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
1917 smx_process_t self = SIMIX_process_self();
1919 /* Go to that function to follow the code flow through the simcall barrier */
1920 if (0) SIMIX_pre_mutex_lock(&self->simcall, mutex);
1921 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1923 self->simcall.call = SIMCALL_MUTEX_LOCK;
1924 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1925 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1926 self->simcall.args[0].dp = (void*) mutex;
1927 if (self != simix_global->maestro_process) {
1928 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1929 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1930 SIMIX_process_yield(self);
1932 SIMIX_simcall_enter(&self->simcall, 0);
1937 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
1938 smx_process_t self = SIMIX_process_self();
1940 /* Go to that function to follow the code flow through the simcall barrier */
1941 if (0) SIMIX_pre_mutex_trylock(&self->simcall, mutex);
1942 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1944 self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
1945 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1946 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1947 self->simcall.args[0].dp = (void*) mutex;
1948 if (self != simix_global->maestro_process) {
1949 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1950 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1951 SIMIX_process_yield(self);
1953 SIMIX_simcall_enter(&self->simcall, 0);
1955 return self->simcall.result.i;
1958 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
1959 smx_process_t self = SIMIX_process_self();
1961 /* Go to that function to follow the code flow through the simcall barrier */
1962 if (0) SIMIX_pre_mutex_unlock(&self->simcall, mutex);
1963 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1965 self->simcall.call = SIMCALL_MUTEX_UNLOCK;
1966 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1967 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1968 self->simcall.args[0].dp = (void*) mutex;
1969 if (self != simix_global->maestro_process) {
1970 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1971 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1972 SIMIX_process_yield(self);
1974 SIMIX_simcall_enter(&self->simcall, 0);
1979 inline static smx_cond_t simcall_BODY_cond_init() {
1980 smx_process_t self = SIMIX_process_self();
1982 /* Go to that function to follow the code flow through the simcall barrier */
1983 if (0) SIMIX_pre_cond_init(&self->simcall);
1984 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
1986 self->simcall.call = SIMCALL_COND_INIT;
1987 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
1988 memset(self->simcall.args, 0, sizeof(self->simcall.args));
1990 if (self != simix_global->maestro_process) {
1991 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
1992 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
1993 SIMIX_process_yield(self);
1995 SIMIX_simcall_enter(&self->simcall, 0);
1997 return self->simcall.result.dp;
2000 inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
2001 smx_process_t self = SIMIX_process_self();
2003 /* Go to that function to follow the code flow through the simcall barrier */
2004 if (0) SIMIX_pre_cond_destroy(&self->simcall, cond);
2005 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2007 self->simcall.call = SIMCALL_COND_DESTROY;
2008 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2009 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2010 self->simcall.args[0].dp = (void*) cond;
2011 if (self != simix_global->maestro_process) {
2012 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2013 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2014 SIMIX_process_yield(self);
2016 SIMIX_simcall_enter(&self->simcall, 0);
2021 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
2022 smx_process_t self = SIMIX_process_self();
2024 /* Go to that function to follow the code flow through the simcall barrier */
2025 if (0) SIMIX_pre_cond_signal(&self->simcall, cond);
2026 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2028 self->simcall.call = SIMCALL_COND_SIGNAL;
2029 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2030 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2031 self->simcall.args[0].dp = (void*) cond;
2032 if (self != simix_global->maestro_process) {
2033 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2034 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2035 SIMIX_process_yield(self);
2037 SIMIX_simcall_enter(&self->simcall, 0);
2042 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
2043 smx_process_t self = SIMIX_process_self();
2045 /* Go to that function to follow the code flow through the simcall barrier */
2046 if (0) SIMIX_pre_cond_wait(&self->simcall, cond, mutex);
2047 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2049 self->simcall.call = SIMCALL_COND_WAIT;
2050 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2051 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2052 self->simcall.args[0].dp = (void*) cond;
2053 self->simcall.args[1].dp = (void*) mutex;
2054 if (self != simix_global->maestro_process) {
2055 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2056 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2057 SIMIX_process_yield(self);
2059 SIMIX_simcall_enter(&self->simcall, 0);
2064 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
2065 smx_process_t self = SIMIX_process_self();
2067 /* Go to that function to follow the code flow through the simcall barrier */
2068 if (0) SIMIX_pre_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
2069 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2071 self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
2072 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2073 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2074 self->simcall.args[0].dp = (void*) cond;
2075 self->simcall.args[1].dp = (void*) mutex;
2076 self->simcall.args[2].d = (double) timeout;
2077 if (self != simix_global->maestro_process) {
2078 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2079 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2080 SIMIX_process_yield(self);
2082 SIMIX_simcall_enter(&self->simcall, 0);
2087 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
2088 smx_process_t self = SIMIX_process_self();
2090 /* Go to that function to follow the code flow through the simcall barrier */
2091 if (0) SIMIX_pre_cond_broadcast(&self->simcall, cond);
2092 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2094 self->simcall.call = SIMCALL_COND_BROADCAST;
2095 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2096 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2097 self->simcall.args[0].dp = (void*) cond;
2098 if (self != simix_global->maestro_process) {
2099 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2100 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2101 SIMIX_process_yield(self);
2103 SIMIX_simcall_enter(&self->simcall, 0);
2108 inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
2109 smx_process_t self = SIMIX_process_self();
2111 /* Go to that function to follow the code flow through the simcall barrier */
2112 if (0) SIMIX_pre_sem_init(&self->simcall, capacity);
2113 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2115 self->simcall.call = SIMCALL_SEM_INIT;
2116 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2117 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2118 self->simcall.args[0].i = (int) capacity;
2119 if (self != simix_global->maestro_process) {
2120 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2121 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2122 SIMIX_process_yield(self);
2124 SIMIX_simcall_enter(&self->simcall, 0);
2126 return self->simcall.result.dp;
2129 inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
2130 smx_process_t self = SIMIX_process_self();
2132 /* Go to that function to follow the code flow through the simcall barrier */
2133 if (0) SIMIX_pre_sem_destroy(&self->simcall, sem);
2134 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2136 self->simcall.call = SIMCALL_SEM_DESTROY;
2137 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2138 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2139 self->simcall.args[0].dp = (void*) sem;
2140 if (self != simix_global->maestro_process) {
2141 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2142 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2143 SIMIX_process_yield(self);
2145 SIMIX_simcall_enter(&self->simcall, 0);
2150 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
2151 smx_process_t self = SIMIX_process_self();
2153 /* Go to that function to follow the code flow through the simcall barrier */
2154 if (0) SIMIX_pre_sem_release(&self->simcall, sem);
2155 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2157 self->simcall.call = SIMCALL_SEM_RELEASE;
2158 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2159 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2160 self->simcall.args[0].dp = (void*) sem;
2161 if (self != simix_global->maestro_process) {
2162 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2163 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2164 SIMIX_process_yield(self);
2166 SIMIX_simcall_enter(&self->simcall, 0);
2171 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
2172 smx_process_t self = SIMIX_process_self();
2174 /* Go to that function to follow the code flow through the simcall barrier */
2175 if (0) SIMIX_pre_sem_would_block(&self->simcall, sem);
2176 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2178 self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
2179 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2180 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2181 self->simcall.args[0].dp = (void*) sem;
2182 if (self != simix_global->maestro_process) {
2183 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2184 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2185 SIMIX_process_yield(self);
2187 SIMIX_simcall_enter(&self->simcall, 0);
2189 return self->simcall.result.i;
2192 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
2193 smx_process_t self = SIMIX_process_self();
2195 /* Go to that function to follow the code flow through the simcall barrier */
2196 if (0) SIMIX_pre_sem_acquire(&self->simcall, sem);
2197 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2199 self->simcall.call = SIMCALL_SEM_ACQUIRE;
2200 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2201 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2202 self->simcall.args[0].dp = (void*) sem;
2203 if (self != simix_global->maestro_process) {
2204 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2205 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2206 SIMIX_process_yield(self);
2208 SIMIX_simcall_enter(&self->simcall, 0);
2213 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
2214 smx_process_t self = SIMIX_process_self();
2216 /* Go to that function to follow the code flow through the simcall barrier */
2217 if (0) SIMIX_pre_sem_acquire_timeout(&self->simcall, sem, timeout);
2218 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2220 self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
2221 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2222 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2223 self->simcall.args[0].dp = (void*) sem;
2224 self->simcall.args[1].d = (double) timeout;
2225 if (self != simix_global->maestro_process) {
2226 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2227 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2228 SIMIX_process_yield(self);
2230 SIMIX_simcall_enter(&self->simcall, 0);
2235 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
2236 smx_process_t self = SIMIX_process_self();
2238 /* Go to that function to follow the code flow through the simcall barrier */
2239 if (0) SIMIX_pre_sem_get_capacity(&self->simcall, sem);
2240 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2242 self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
2243 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2244 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2245 self->simcall.args[0].dp = (void*) sem;
2246 if (self != simix_global->maestro_process) {
2247 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2248 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2249 SIMIX_process_yield(self);
2251 SIMIX_simcall_enter(&self->simcall, 0);
2253 return self->simcall.result.i;
2256 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
2257 smx_process_t self = SIMIX_process_self();
2259 /* Go to that function to follow the code flow through the simcall barrier */
2260 if (0) SIMIX_pre_file_read(&self->simcall, fd, size, host);
2261 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2263 self->simcall.call = SIMCALL_FILE_READ;
2264 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2265 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2266 self->simcall.args[0].dp = (void*) fd;
2267 self->simcall.args[1].sgsz = (sg_size_t) size;
2268 self->simcall.args[2].dp = (void*) host;
2269 if (self != simix_global->maestro_process) {
2270 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2271 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2272 SIMIX_process_yield(self);
2274 SIMIX_simcall_enter(&self->simcall, 0);
2276 return self->simcall.result.sgsz;
2279 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
2280 smx_process_t self = SIMIX_process_self();
2282 /* Go to that function to follow the code flow through the simcall barrier */
2283 if (0) SIMIX_pre_file_write(&self->simcall, fd, size, host);
2284 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2286 self->simcall.call = SIMCALL_FILE_WRITE;
2287 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2288 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2289 self->simcall.args[0].dp = (void*) fd;
2290 self->simcall.args[1].sgsz = (sg_size_t) size;
2291 self->simcall.args[2].dp = (void*) host;
2292 if (self != simix_global->maestro_process) {
2293 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2294 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2295 SIMIX_process_yield(self);
2297 SIMIX_simcall_enter(&self->simcall, 0);
2299 return self->simcall.result.sgsz;
2302 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
2303 smx_process_t self = SIMIX_process_self();
2305 /* Go to that function to follow the code flow through the simcall barrier */
2306 if (0) SIMIX_pre_file_open(&self->simcall, fullpath, host);
2307 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2309 self->simcall.call = SIMCALL_FILE_OPEN;
2310 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2311 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2312 self->simcall.args[0].cc = (const char*) fullpath;
2313 self->simcall.args[1].dp = (void*) host;
2314 if (self != simix_global->maestro_process) {
2315 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2316 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2317 SIMIX_process_yield(self);
2319 SIMIX_simcall_enter(&self->simcall, 0);
2321 return self->simcall.result.dp;
2324 inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
2325 smx_process_t self = SIMIX_process_self();
2327 /* Go to that function to follow the code flow through the simcall barrier */
2328 if (0) SIMIX_pre_file_close(&self->simcall, fd, host);
2329 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2331 self->simcall.call = SIMCALL_FILE_CLOSE;
2332 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2333 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2334 self->simcall.args[0].dp = (void*) fd;
2335 self->simcall.args[1].dp = (void*) host;
2336 if (self != simix_global->maestro_process) {
2337 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2338 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2339 SIMIX_process_yield(self);
2341 SIMIX_simcall_enter(&self->simcall, 0);
2343 return self->simcall.result.i;
2346 inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
2347 smx_process_t self = SIMIX_process_self();
2349 /* Go to that function to follow the code flow through the simcall barrier */
2350 if (0) SIMIX_pre_file_unlink(&self->simcall, fd, host);
2351 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2353 self->simcall.call = SIMCALL_FILE_UNLINK;
2354 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2355 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2356 self->simcall.args[0].dp = (void*) fd;
2357 self->simcall.args[1].dp = (void*) host;
2358 if (self != simix_global->maestro_process) {
2359 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2360 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2361 SIMIX_process_yield(self);
2363 SIMIX_simcall_enter(&self->simcall, 0);
2365 return self->simcall.result.i;
2368 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
2369 smx_process_t self = SIMIX_process_self();
2371 /* Go to that function to follow the code flow through the simcall barrier */
2372 if (0) SIMIX_pre_file_get_size(&self->simcall, fd);
2373 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2375 self->simcall.call = SIMCALL_FILE_GET_SIZE;
2376 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2377 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2378 self->simcall.args[0].dp = (void*) fd;
2379 if (self != simix_global->maestro_process) {
2380 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2381 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2382 SIMIX_process_yield(self);
2384 SIMIX_simcall_enter(&self->simcall, 0);
2386 return self->simcall.result.sgsz;
2389 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
2390 smx_process_t self = SIMIX_process_self();
2392 /* Go to that function to follow the code flow through the simcall barrier */
2393 if (0) SIMIX_pre_file_tell(&self->simcall, fd);
2394 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2396 self->simcall.call = SIMCALL_FILE_TELL;
2397 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2398 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2399 self->simcall.args[0].dp = (void*) fd;
2400 if (self != simix_global->maestro_process) {
2401 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2402 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2403 SIMIX_process_yield(self);
2405 SIMIX_simcall_enter(&self->simcall, 0);
2407 return self->simcall.result.sgsz;
2410 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
2411 smx_process_t self = SIMIX_process_self();
2413 /* Go to that function to follow the code flow through the simcall barrier */
2414 if (0) SIMIX_pre_file_seek(&self->simcall, fd, offset, origin);
2415 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2417 self->simcall.call = SIMCALL_FILE_SEEK;
2418 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2419 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2420 self->simcall.args[0].dp = (void*) fd;
2421 self->simcall.args[1].sgoff = (sg_offset_t) offset;
2422 self->simcall.args[2].i = (int) origin;
2423 if (self != simix_global->maestro_process) {
2424 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2425 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2426 SIMIX_process_yield(self);
2428 SIMIX_simcall_enter(&self->simcall, 0);
2430 return self->simcall.result.i;
2433 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
2434 smx_process_t self = SIMIX_process_self();
2436 /* Go to that function to follow the code flow through the simcall barrier */
2437 if (0) SIMIX_pre_file_get_info(&self->simcall, fd);
2438 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2440 self->simcall.call = SIMCALL_FILE_GET_INFO;
2441 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2442 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2443 self->simcall.args[0].dp = (void*) fd;
2444 if (self != simix_global->maestro_process) {
2445 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2446 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2447 SIMIX_process_yield(self);
2449 SIMIX_simcall_enter(&self->simcall, 0);
2451 return self->simcall.result.dp;
2454 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
2455 smx_process_t self = SIMIX_process_self();
2457 /* Go to that function to follow the code flow through the simcall barrier */
2458 if (0) SIMIX_pre_file_move(&self->simcall, fd, fullpath);
2459 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2461 self->simcall.call = SIMCALL_FILE_MOVE;
2462 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2463 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2464 self->simcall.args[0].dp = (void*) fd;
2465 self->simcall.args[1].cc = (const char*) fullpath;
2466 if (self != simix_global->maestro_process) {
2467 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2468 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2469 SIMIX_process_yield(self);
2471 SIMIX_simcall_enter(&self->simcall, 0);
2473 return self->simcall.result.i;
2476 inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
2477 smx_process_t self = SIMIX_process_self();
2479 /* Go to that function to follow the code flow through the simcall barrier */
2480 if (0) SIMIX_pre_storage_get_free_size(&self->simcall, storage);
2481 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2483 self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
2484 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2485 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2486 self->simcall.args[0].dp = (void*) storage;
2487 if (self != simix_global->maestro_process) {
2488 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2489 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2490 SIMIX_process_yield(self);
2492 SIMIX_simcall_enter(&self->simcall, 0);
2494 return self->simcall.result.sgsz;
2497 inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
2498 smx_process_t self = SIMIX_process_self();
2500 /* Go to that function to follow the code flow through the simcall barrier */
2501 if (0) SIMIX_pre_storage_get_used_size(&self->simcall, name);
2502 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2504 self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
2505 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2506 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2507 self->simcall.args[0].dp = (void*) name;
2508 if (self != simix_global->maestro_process) {
2509 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2510 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2511 SIMIX_process_yield(self);
2513 SIMIX_simcall_enter(&self->simcall, 0);
2515 return self->simcall.result.sgsz;
2518 inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
2519 smx_process_t self = SIMIX_process_self();
2521 /* Go to that function to follow the code flow through the simcall barrier */
2522 if (0) SIMIX_pre_storage_get_properties(&self->simcall, storage);
2523 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2525 self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
2526 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2527 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2528 self->simcall.args[0].dp = (void*) storage;
2529 if (self != simix_global->maestro_process) {
2530 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2531 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2532 SIMIX_process_yield(self);
2534 SIMIX_simcall_enter(&self->simcall, 0);
2536 return self->simcall.result.dp;
2539 inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
2540 smx_process_t self = SIMIX_process_self();
2542 /* Go to that function to follow the code flow through the simcall barrier */
2543 if (0) SIMIX_pre_storage_get_content(&self->simcall, storage);
2544 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2546 self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
2547 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2548 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2549 self->simcall.args[0].dp = (void*) storage;
2550 if (self != simix_global->maestro_process) {
2551 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2552 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2553 SIMIX_process_yield(self);
2555 SIMIX_simcall_enter(&self->simcall, 0);
2557 return self->simcall.result.dp;
2560 inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
2561 smx_process_t self = SIMIX_process_self();
2563 /* Go to that function to follow the code flow through the simcall barrier */
2564 if (0) SIMIX_pre_asr_get_properties(&self->simcall, name);
2565 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2567 self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
2568 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2569 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2570 self->simcall.args[0].cc = (const char*) name;
2571 if (self != simix_global->maestro_process) {
2572 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2573 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2574 SIMIX_process_yield(self);
2576 SIMIX_simcall_enter(&self->simcall, 0);
2578 return self->simcall.result.dp;
2580 #ifdef HAVE_LATENCY_BOUND_TRACKING
2582 inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
2583 smx_process_t self = SIMIX_process_self();
2585 /* Go to that function to follow the code flow through the simcall barrier */
2586 if (0) SIMIX_pre_comm_is_latency_bounded(&self->simcall, comm);
2587 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2589 self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
2590 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2591 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2592 self->simcall.args[0].dp = (void*) comm;
2593 if (self != simix_global->maestro_process) {
2594 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2595 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2596 SIMIX_process_yield(self);
2598 SIMIX_simcall_enter(&self->simcall, 0);
2600 return self->simcall.result.i;
2606 inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
2607 smx_process_t self = SIMIX_process_self();
2609 /* Go to that function to follow the code flow through the simcall barrier */
2610 if (0) SIMIX_pre_set_category(&self->simcall, action, category);
2611 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2613 self->simcall.call = SIMCALL_SET_CATEGORY;
2614 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2615 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2616 self->simcall.args[0].dp = (void*) action;
2617 self->simcall.args[1].cc = (const char*) category;
2618 if (self != simix_global->maestro_process) {
2619 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2620 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2621 SIMIX_process_yield(self);
2623 SIMIX_simcall_enter(&self->simcall, 0);
2631 inline static void* simcall_BODY_mc_snapshot() {
2632 smx_process_t self = SIMIX_process_self();
2634 /* Go to that function to follow the code flow through the simcall barrier */
2635 if (0) SIMIX_pre_mc_snapshot(&self->simcall);
2636 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2638 self->simcall.call = SIMCALL_MC_SNAPSHOT;
2639 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2640 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2642 if (self != simix_global->maestro_process) {
2643 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2644 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2645 SIMIX_process_yield(self);
2647 SIMIX_simcall_enter(&self->simcall, 0);
2649 return self->simcall.result.dp;
2652 inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
2653 smx_process_t self = SIMIX_process_self();
2655 /* Go to that function to follow the code flow through the simcall barrier */
2656 if (0) SIMIX_pre_mc_compare_snapshots(&self->simcall, s1, s2);
2657 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2659 self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
2660 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2661 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2662 self->simcall.args[0].dp = (void*) s1;
2663 self->simcall.args[1].dp = (void*) s2;
2664 if (self != simix_global->maestro_process) {
2665 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2666 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2667 SIMIX_process_yield(self);
2669 SIMIX_simcall_enter(&self->simcall, 0);
2671 return self->simcall.result.i;
2674 inline static int simcall_BODY_mc_random(int min, int max) {
2675 smx_process_t self = SIMIX_process_self();
2677 /* Go to that function to follow the code flow through the simcall barrier */
2678 if (0) SIMIX_pre_mc_random(&self->simcall, min, max);
2679 /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
2681 self->simcall.call = SIMCALL_MC_RANDOM;
2682 memset(&self->simcall.result, 0, sizeof(self->simcall.result));
2683 memset(self->simcall.args, 0, sizeof(self->simcall.args));
2684 self->simcall.args[0].i = (int) min;
2685 self->simcall.args[1].i = (int) max;
2686 if (self != simix_global->maestro_process) {
2687 XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
2688 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
2689 SIMIX_process_yield(self);
2691 SIMIX_simcall_enter(&self->simcall, 0);
2693 return self->simcall.result.i;