Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move SIMCALL_HOST_EXECUTE to the new simcall architecture for initial testing.
[simgrid.git] / src / simix / smx_smurf.c
1 #include "smx_private.h"
2 #include "xbt/fifo.h"
3 #include "xbt/xbt_os_thread.h"
4 #include "../mc/mc_private.h"
5
6 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_smurf, simix,
7                                 "Logging specific to SIMIX (SMURF)");
8
9 XBT_INLINE smx_simcall_t SIMIX_simcall_mine()
10 {
11   smx_process_t issuer = SIMIX_process_self();
12   return &issuer->simcall;
13 }
14
15 /**
16  * \brief Makes the current process do a simcall to the kernel and yields
17  * until completion. If the current thread is maestro, we don't yield and
18  * execute the simcall directly.
19  * \param self the current process
20  */
21 void SIMIX_simcall_push(smx_process_t self)
22 {
23   if (self != simix_global->maestro_process) {
24     XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
25               SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
26     SIMIX_process_yield(self);
27   } else {
28     XBT_DEBUG("I'm the maestro, execute the simcall directly");
29     SIMIX_simcall_pre(&self->simcall, 0);
30   }
31 }
32
33 void SIMIX_simcall_answer(smx_simcall_t simcall)
34 {
35   if (simcall->issuer != simix_global->maestro_process){
36     XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call,
37         simcall->issuer->name, simcall->issuer);
38     simcall->issuer->simcall.call = SIMCALL_NONE;
39 /*    This check should be useless and slows everyone. Reactivate if you see something
40  *    weird in process scheduling.
41  */
42 /*    if(!xbt_dynar_member(simix_global->process_to_run, &(simcall->issuer))) */
43     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, simcall->issuer);
44 /*    else DIE_IMPOSSIBLE; */
45   }
46 }
47
48 void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
49 {
50   XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
51
52   switch (simcall->call) {
53     case SIMCALL_COMM_TEST:
54       SIMIX_pre_comm_test(simcall);
55       break;
56
57     case SIMCALL_COMM_TESTANY:
58       SIMIX_pre_comm_testany(simcall, value);
59       break;
60
61     case SIMCALL_COMM_WAIT:
62       SIMIX_pre_comm_wait(simcall,
63           simcall->comm_wait.comm,
64           simcall->comm_wait.timeout,
65           value);
66       break;
67
68     case SIMCALL_COMM_WAITANY:
69       SIMIX_pre_comm_waitany(simcall, value);
70       break;
71
72     case SIMCALL_COMM_SEND:
73     {
74       smx_action_t comm = SIMIX_comm_isend(
75           simcall->issuer,
76           simcall->comm_send.rdv,
77           simcall->comm_send.task_size,
78           simcall->comm_send.rate,
79           simcall->comm_send.src_buff,
80           simcall->comm_send.src_buff_size,
81           simcall->comm_send.match_fun,
82           NULL, /* no clean function since it's not detached */
83           simcall->comm_send.data,
84           0);
85       SIMIX_pre_comm_wait(simcall, comm, simcall->comm_send.timeout, 0);
86       break;
87     }
88
89     case SIMCALL_COMM_ISEND:
90       simcall->comm_isend.result = SIMIX_comm_isend(
91           simcall->issuer,
92           simcall->comm_isend.rdv,
93           simcall->comm_isend.task_size,
94           simcall->comm_isend.rate,
95           simcall->comm_isend.src_buff,
96           simcall->comm_isend.src_buff_size,
97           simcall->comm_isend.match_fun,
98           simcall->comm_isend.clean_fun,
99           simcall->comm_isend.data,
100           simcall->comm_isend.detached);
101       SIMIX_simcall_answer(simcall);
102       break;
103
104     case SIMCALL_COMM_RECV:
105     {
106       smx_action_t comm = SIMIX_comm_irecv(
107           simcall->issuer,
108           simcall->comm_recv.rdv,
109           simcall->comm_recv.dst_buff,
110           simcall->comm_recv.dst_buff_size,
111           simcall->comm_recv.match_fun,
112           simcall->comm_recv.data);
113       SIMIX_pre_comm_wait(simcall, comm, simcall->comm_recv.timeout, 0);
114       break;
115     }
116
117     case SIMCALL_COMM_IRECV:
118       simcall->comm_irecv.result = SIMIX_comm_irecv(
119           simcall->issuer,
120           simcall->comm_irecv.rdv,
121           simcall->comm_irecv.dst_buff,
122           simcall->comm_irecv.dst_buff_size,
123           simcall->comm_irecv.match_fun,
124           simcall->comm_irecv.data);
125       SIMIX_simcall_answer(simcall);
126       break;
127
128     case SIMCALL_COMM_IPROBE:
129       simcall->comm_iprobe.result = SIMIX_comm_iprobe(
130           simcall->issuer,
131           simcall->comm_iprobe.rdv,
132           simcall->comm_iprobe.src,
133           simcall->comm_iprobe.tag,
134           simcall->comm_iprobe.match_fun,
135           simcall->comm_iprobe.data);
136       SIMIX_simcall_answer(simcall);
137       break;
138
139     case SIMCALL_COMM_DESTROY:
140       SIMIX_comm_destroy(simcall->comm_destroy.comm);
141       SIMIX_simcall_answer(simcall);
142       break;
143
144     case SIMCALL_COMM_CANCEL:
145       SIMIX_comm_cancel(simcall->comm_cancel.comm);
146       SIMIX_simcall_answer(simcall);
147       break;
148
149     case SIMCALL_COMM_GET_REMAINS:
150       simcall->comm_get_remains.result =
151           SIMIX_comm_get_remains(simcall->comm_get_remains.comm);
152       SIMIX_simcall_answer(simcall);
153       break;
154
155     case SIMCALL_COMM_GET_STATE:
156       simcall->comm_get_state.result =
157           SIMIX_comm_get_state(simcall->comm_get_state.comm);
158       SIMIX_simcall_answer(simcall);
159       break;
160
161     case SIMCALL_COMM_GET_SRC_DATA:
162       simcall->comm_get_src_data.result = SIMIX_comm_get_src_data(simcall->comm_get_src_data.comm);
163       SIMIX_simcall_answer(simcall);
164       break;
165
166     case SIMCALL_COMM_GET_DST_DATA:
167       simcall->comm_get_dst_data.result = SIMIX_comm_get_dst_data(simcall->comm_get_dst_data.comm);
168       SIMIX_simcall_answer(simcall);
169       break;
170
171     case SIMCALL_COMM_GET_SRC_PROC:
172       simcall->comm_get_src_proc.result =
173           SIMIX_comm_get_src_proc(simcall->comm_get_src_proc.comm);
174       SIMIX_simcall_answer(simcall);
175       break;
176
177     case SIMCALL_COMM_GET_DST_PROC:
178       simcall->comm_get_dst_proc.result =
179           SIMIX_comm_get_dst_proc(simcall->comm_get_dst_proc.comm);
180       SIMIX_simcall_answer(simcall);
181       break;
182
183 #ifdef HAVE_LATENCY_BOUND_TRACKING
184     case SIMCALL_COMM_IS_LATENCY_BOUNDED:
185       simcall->comm_is_latency_bounded.result =
186           SIMIX_comm_is_latency_bounded(simcall->comm_is_latency_bounded.comm);
187       SIMIX_simcall_answer(simcall);
188       break;
189 #endif
190
191     case SIMCALL_RDV_CREATE:
192       simcall->rdv_create.result = SIMIX_rdv_create(simcall->rdv_create.name);
193       SIMIX_simcall_answer(simcall);
194       break;
195
196     case SIMCALL_RDV_DESTROY:
197       SIMIX_rdv_destroy(simcall->rdv_destroy.rdv);
198       SIMIX_simcall_answer(simcall);
199       break;
200
201     case SIMCALL_RDV_GEY_BY_NAME:
202       simcall->rdv_get_by_name.result =
203         SIMIX_rdv_get_by_name(simcall->rdv_get_by_name.name);
204       SIMIX_simcall_answer(simcall);
205       break;
206
207     case SIMCALL_RDV_COMM_COUNT_BY_HOST:
208       simcall->rdv_comm_count_by_host.result = SIMIX_rdv_comm_count_by_host(
209           simcall->rdv_comm_count_by_host.rdv,
210           simcall->rdv_comm_count_by_host.host);
211       SIMIX_simcall_answer(simcall);
212       break;
213
214     case SIMCALL_RDV_GET_HEAD:
215       simcall->rdv_get_head.result = SIMIX_rdv_get_head(simcall->rdv_get_head.rdv);
216       SIMIX_simcall_answer(simcall);
217       break;
218
219     case SIMCALL_RDV_SET_RECV:
220       SIMIX_rdv_set_receiver(simcall->rdv_set_rcv_proc.rdv, simcall->rdv_set_rcv_proc.receiver);
221       SIMIX_simcall_answer(simcall);
222       break;
223
224     case SIMCALL_RDV_GET_RECV:
225       simcall->rdv_get_rcv_proc.result = SIMIX_rdv_get_receiver(simcall->rdv_set_rcv_proc.rdv);
226       SIMIX_simcall_answer(simcall);
227       break;
228
229     case SIMCALL_HOST_GET_BY_NAME:
230       simcall->host_get_by_name.result =
231         SIMIX_host_get_by_name(simcall->host_get_by_name.name);
232       SIMIX_simcall_answer(simcall);
233       break;
234
235     case SIMCALL_HOST_GET_NAME:
236       simcall->host_get_name.result =  SIMIX_host_get_name(simcall->host_get_name.host);
237       SIMIX_simcall_answer(simcall);
238       break;
239
240     case SIMCALL_HOST_GET_PROPERTIES:
241       simcall->host_get_properties.result =
242         SIMIX_host_get_properties(simcall->host_get_properties.host);
243       SIMIX_simcall_answer(simcall);
244       break;
245
246     case SIMCALL_HOST_GET_SPEED:
247       simcall->host_get_speed.result = 
248         SIMIX_host_get_speed(simcall->host_get_speed.host);
249       SIMIX_simcall_answer(simcall);
250       break;
251
252     case SIMCALL_HOST_GET_AVAILABLE_SPEED:
253       simcall->host_get_available_speed.result =
254         SIMIX_host_get_available_speed(simcall->host_get_available_speed.host);
255       SIMIX_simcall_answer(simcall);
256       break;
257
258     case SIMCALL_HOST_GET_STATE:
259       simcall->host_get_state.result = 
260         SIMIX_host_get_state(simcall->host_get_state.host);
261       SIMIX_simcall_answer(simcall);
262       break;
263
264     case SIMCALL_HOST_GET_DATA:
265       simcall->host_get_data.result =  SIMIX_host_get_data(simcall->host_get_data.host);
266       SIMIX_simcall_answer(simcall);
267       break;
268
269     case SIMCALL_HOST_SET_DATA:
270       SIMIX_host_set_data(simcall->host_set_data.host, simcall->host_set_data.data);
271       SIMIX_simcall_answer(simcall);
272       break;
273
274     case SIMCALL_HOST_EXECUTE:
275       simcall->host_execute.result = simcall_table[simcall->call](simcall->args);
276       SIMIX_simcall_answer(simcall);
277       break;
278
279     case SIMCALL_HOST_PARALLEL_EXECUTE:
280       simcall->host_parallel_execute.result = SIMIX_host_parallel_execute(
281     simcall->host_parallel_execute.name,
282     simcall->host_parallel_execute.host_nb,
283     simcall->host_parallel_execute.host_list,
284     simcall->host_parallel_execute.computation_amount,
285     simcall->host_parallel_execute.communication_amount,
286     simcall->host_parallel_execute.amount,
287     simcall->host_parallel_execute.rate);
288       SIMIX_simcall_answer(simcall);
289       break;
290
291     case SIMCALL_HOST_EXECUTION_DESTROY:
292       SIMIX_host_execution_destroy(simcall->host_execution_destroy.execution);
293       SIMIX_simcall_answer(simcall);
294       break;
295
296     case SIMCALL_HOST_EXECUTION_CANCEL:
297       SIMIX_host_execution_cancel(simcall->host_execution_cancel.execution);
298       SIMIX_simcall_answer(simcall);
299       break;
300
301     case SIMCALL_HOST_EXECUTION_GET_REMAINS:
302       simcall->host_execution_get_remains.result =
303         SIMIX_host_execution_get_remains(simcall->host_execution_get_remains.execution);
304       SIMIX_simcall_answer(simcall);
305       break;
306
307     case SIMCALL_HOST_EXECUTION_GET_STATE:
308       simcall->host_execution_get_state.result =
309         SIMIX_host_execution_get_state(simcall->host_execution_get_state.execution);
310       SIMIX_simcall_answer(simcall);
311       break;
312
313     case SIMCALL_HOST_EXECUTION_SET_PRIORITY:
314       SIMIX_host_execution_set_priority(
315     simcall->host_execution_set_priority.execution,
316     simcall->host_execution_set_priority.priority);
317       SIMIX_simcall_answer(simcall);
318       break;
319
320     case SIMCALL_HOST_EXECUTION_WAIT:
321       SIMIX_pre_host_execution_wait(simcall);
322       break;
323
324     case SIMCALL_PROCESS_CREATE:
325       SIMIX_process_create(
326           simcall->process_create.process,
327     simcall->process_create.name,
328     simcall->process_create.code,
329     simcall->process_create.data,
330     simcall->process_create.hostname,
331     simcall->process_create.kill_time,
332     simcall->process_create.argc,
333     simcall->process_create.argv,
334     simcall->process_create.properties,
335     simcall->process_create.auto_restart);
336       SIMIX_simcall_answer(simcall);
337       break;
338
339     case SIMCALL_PROCESS_KILL:
340       SIMIX_process_kill(simcall->process_kill.process,simcall->issuer);
341       SIMIX_simcall_answer(simcall);
342       break;
343
344     case SIMCALL_PROCESS_KILLALL:
345       SIMIX_process_killall(simcall->issuer);
346       SIMIX_simcall_answer(simcall);
347       break;
348
349     case SIMCALL_PROCESS_CLEANUP:
350       SIMIX_process_cleanup(simcall->process_cleanup.process);
351       SIMIX_simcall_answer(simcall);
352       break;
353
354     case SIMCALL_PROCESS_CHANGE_HOST:
355       SIMIX_pre_process_change_host(
356           simcall->process_change_host.process,
357           simcall->process_change_host.dest);
358       SIMIX_simcall_answer(simcall);
359       break;
360
361     case SIMCALL_PROCESS_SUSPEND:
362       SIMIX_pre_process_suspend(simcall);
363       break;
364
365     case SIMCALL_PROCESS_RESUME:
366       SIMIX_process_resume(simcall->process_resume.process, simcall->issuer);
367       SIMIX_simcall_answer(simcall);
368       break;
369
370     case SIMCALL_PROCESS_COUNT:
371       simcall->process_count.result = SIMIX_process_count();
372       SIMIX_simcall_answer(simcall);
373       break;
374
375     case SIMCALL_PROCESS_GET_DATA:
376       simcall->process_get_data.result =
377         SIMIX_process_get_data(simcall->process_get_data.process);
378       SIMIX_simcall_answer(simcall);
379       break;
380     case SIMCALL_PROCESS_ON_EXIT:
381       SIMIX_process_on_exit(simcall->process_on_exit.process,
382                             simcall->process_on_exit.fun,
383                             simcall->process_on_exit.data);
384       SIMIX_simcall_answer(simcall);
385     break;
386     case SIMCALL_PROCESS_RESTART:
387       simcall->process_restart.result = SIMIX_process_restart(simcall->process_restart.process, simcall->issuer);
388       SIMIX_simcall_answer(simcall);
389     break;
390     case SIMCALL_PROCESS_AUTO_RESTART_SET:
391       SIMIX_process_auto_restart_set(simcall->process_auto_restart.process,simcall->process_auto_restart.auto_restart);
392       SIMIX_simcall_answer(simcall);
393     break;
394     case SIMCALL_PROCESS_SET_DATA:
395       SIMIX_process_set_data(
396     simcall->process_set_data.process,
397     simcall->process_set_data.data);
398       SIMIX_simcall_answer(simcall);
399       break;
400
401     case SIMCALL_PROCESS_GET_HOST:
402       simcall->process_get_host.result = SIMIX_process_get_host(simcall->process_get_host.process);
403       SIMIX_simcall_answer(simcall);
404       break;
405
406     case SIMCALL_PROCESS_GET_NAME:
407       simcall->process_get_name.result = SIMIX_process_get_name(simcall->process_get_name.process);
408       SIMIX_simcall_answer(simcall);
409       break;
410
411     case SIMCALL_PROCESS_IS_SUSPENDED:
412       simcall->process_is_suspended.result =
413         SIMIX_process_is_suspended(simcall->process_is_suspended.process);
414       SIMIX_simcall_answer(simcall);
415       break;
416
417     case SIMCALL_PROCESS_GET_PROPERTIES:
418       simcall->process_get_properties.result =
419         SIMIX_process_get_properties(simcall->process_get_properties.process);
420       SIMIX_simcall_answer(simcall);
421       break;
422
423     case SIMCALL_PROCESS_SLEEP:
424       SIMIX_pre_process_sleep(simcall);
425       break;
426
427 #ifdef HAVE_TRACING
428     case SIMCALL_SET_CATEGORY:
429       SIMIX_set_category(
430           simcall->set_category.action,
431           simcall->set_category.category);
432       SIMIX_simcall_answer(simcall);
433       break;
434 #endif
435
436     case SIMCALL_MUTEX_INIT:
437       simcall->mutex_init.result = SIMIX_mutex_init();
438       SIMIX_simcall_answer(simcall);
439       break;
440
441     case SIMCALL_MUTEX_DESTROY:
442       SIMIX_mutex_destroy(simcall->mutex_destroy.mutex);
443       SIMIX_simcall_answer(simcall);
444       break;
445
446     case SIMCALL_MUTEX_LOCK:
447       SIMIX_pre_mutex_lock(simcall);
448       break;
449
450     case SIMCALL_MUTEX_TRYLOCK:
451       simcall->mutex_trylock.result =
452         SIMIX_mutex_trylock(simcall->mutex_trylock.mutex, simcall->issuer);
453       SIMIX_simcall_answer(simcall);
454       break;
455
456     case SIMCALL_MUTEX_UNLOCK:
457       SIMIX_mutex_unlock(simcall->mutex_unlock.mutex, simcall->issuer);
458       SIMIX_simcall_answer(simcall);
459       break;
460
461     case SIMCALL_COND_INIT:
462       simcall->cond_init.result = SIMIX_cond_init();
463       SIMIX_simcall_answer(simcall);
464       break;
465
466     case SIMCALL_COND_DESTROY:
467       SIMIX_cond_destroy(simcall->cond_destroy.cond);
468       SIMIX_simcall_answer(simcall);
469       break;
470
471     case SIMCALL_COND_SIGNAL:
472       SIMIX_cond_signal(simcall->cond_signal.cond);
473       SIMIX_simcall_answer(simcall);
474       break;
475
476     case SIMCALL_COND_WAIT:
477       SIMIX_pre_cond_wait(simcall);
478       break;
479
480     case SIMCALL_COND_WAIT_TIMEOUT:
481       SIMIX_pre_cond_wait_timeout(simcall);
482       break;
483
484     case SIMCALL_COND_BROADCAST:
485       SIMIX_cond_broadcast(simcall->cond_broadcast.cond);
486       SIMIX_simcall_answer(simcall);
487       break;
488
489     case SIMCALL_SEM_INIT:
490       simcall->sem_init.result = SIMIX_sem_init(simcall->sem_init.capacity);
491       SIMIX_simcall_answer(simcall);
492       break;
493
494     case SIMCALL_SEM_DESTROY:
495       SIMIX_sem_destroy(simcall->sem_destroy.sem);
496       SIMIX_simcall_answer(simcall);
497       break;
498
499     case SIMCALL_SEM_RELEASE:
500       SIMIX_sem_release(simcall->sem_release.sem);
501       SIMIX_simcall_answer(simcall);
502       break;
503
504     case SIMCALL_SEM_WOULD_BLOCK:
505       simcall->sem_would_block.result =
506         SIMIX_sem_would_block(simcall->sem_would_block.sem);
507       SIMIX_simcall_answer(simcall);
508       break;
509
510     case SIMCALL_SEM_ACQUIRE:
511       SIMIX_pre_sem_acquire(simcall);
512       break;
513
514     case SIMCALL_SEM_ACQUIRE_TIMEOUT:
515       SIMIX_pre_sem_acquire_timeout(simcall);
516       break;
517
518     case SIMCALL_SEM_GET_CAPACITY:
519       simcall->sem_get_capacity.result = 
520         SIMIX_sem_get_capacity(simcall->sem_get_capacity.sem);
521       SIMIX_simcall_answer(simcall);
522       break;
523
524     case SIMCALL_FILE_READ:
525       SIMIX_pre_file_read(simcall);
526       break;
527
528     case SIMCALL_FILE_WRITE:
529       SIMIX_pre_file_write(simcall);
530       break;
531
532     case SIMCALL_FILE_OPEN:
533       SIMIX_pre_file_open(simcall);
534       break;
535
536     case SIMCALL_FILE_CLOSE:
537       SIMIX_pre_file_close(simcall);
538       break;
539
540     case SIMCALL_FILE_STAT:
541       SIMIX_pre_file_stat(simcall);
542       break;
543
544     case SIMCALL_FILE_UNLINK:
545       SIMIX_pre_file_unlink(simcall);
546       break;
547
548     case SIMCALL_FILE_LS:
549       SIMIX_pre_file_ls(simcall);
550       break;
551
552     case SIMCALL_ASR_GET_PROPERTIES:
553       simcall->asr_get_properties.result =
554         SIMIX_asr_get_properties(simcall->asr_get_properties.name);
555       SIMIX_simcall_answer(simcall);
556       break;
557
558 #ifdef HAVE_MC
559     case SIMCALL_MC_SNAPSHOT:
560       simcall->mc_snapshot.s = MC_take_snapshot();
561       SIMIX_simcall_answer(simcall);
562       break;
563
564     case SIMCALL_MC_COMPARE_SNAPSHOTS:
565       simcall->mc_compare_snapshots.result =
566         snapshot_compare(simcall->mc_compare_snapshots.snapshot1, simcall->mc_compare_snapshots.snapshot2, NULL, NULL);
567       SIMIX_simcall_answer(simcall);
568       break;
569 #endif /* HAVE_MC */
570
571     case SIMCALL_NONE:
572       THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
573           SIMIX_process_get_name(simcall->issuer),
574           SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))
575           );
576       break;
577
578     /* ****************************************************************************************** */
579     /* TUTORIAL: New API                                                                        */
580     /* ****************************************************************************************** */
581     case SIMCALL_NEW_API_INIT:
582       SIMIX_pre_new_api_fct(simcall);
583       break;
584   }
585 }
586
587 void SIMIX_simcall_post(smx_action_t action)
588 {
589   switch (action->type) {
590
591     case SIMIX_ACTION_EXECUTE:
592     case SIMIX_ACTION_PARALLEL_EXECUTE:
593       SIMIX_post_host_execute(action);
594       break;
595
596     case SIMIX_ACTION_COMMUNICATE:
597       SIMIX_post_comm(action);
598       break;
599
600     case SIMIX_ACTION_SLEEP:
601       SIMIX_post_process_sleep(action);
602       break;
603
604     case SIMIX_ACTION_SYNCHRO:
605       SIMIX_post_synchro(action);
606       break;
607
608     case SIMIX_ACTION_IO:
609       SIMIX_post_io(action);
610       break;
611
612     /* ****************************************************************************************** */
613     /* TUTORIAL: New API                                                                        */
614     /* ****************************************************************************************** */
615     case SIMIX_ACTION_NEW_API:
616       SIMIX_post_new_api(action);
617       break;
618   }
619 }
620
621 /* New Simcal interface */
622
623 /* FIXME: add types for every simcall */
624 const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p" };
625
626 simcall_handler_t simcall_table[NUM_SIMCALLS] = {[SIMCALL_HOST_EXECUTE] = &SIMIX_host_execute};
627
628 void SIMIX_simcall_typecheck(const char *fmt, ...)
629 {
630   return;
631 }
632
633 void __SIMIX_simcall(e_smx_simcall_t simcall_id, u_smx_scalar_t *args)
634 {
635   smx_process_t self = SIMIX_process_self();
636   self->simcall.call = simcall_id;
637   self->simcall.args = args;
638
639   if (self != simix_global->maestro_process) {
640     XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
641               SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
642
643     SIMIX_process_yield(self);
644   } else {
645
646     SIMIX_simcall_pre(&self->simcall, 0);
647   }
648 }