-static int process_syscall_color(void *p)
-{
- switch ((*(smx_actor_t *)p)->simcall.call) {
- case SIMCALL_NONE:
- case SIMCALL_PROCESS_KILL:
- return 2;
- case SIMCALL_PROCESS_RESUME:
- return 1;
- default:
- return 0;
- }
-}
-
-/** Wake up all processes waiting for a Surf action to finish */
-static void SIMIX_wake_processes()
-{
- surf_action_t action;
-
- for(auto model : *all_existing_models) {
- XBT_DEBUG("Handling the processes whose action failed (if any)");
- while ((action = surf_model_extract_failed_action_set(model))) {
- XBT_DEBUG(" Handling Action %p",action);
- SIMIX_simcall_exit(static_cast<simgrid::kernel::activity::ActivityImpl*>(action->getData()));
- }
- XBT_DEBUG("Handling the processes whose action terminated normally (if any)");
- while ((action = surf_model_extract_done_action_set(model))) {
- XBT_DEBUG(" Handling Action %p",action);
- if (action->getData() == nullptr)
- XBT_DEBUG("probably vcpu's action %p, skip", action);
- else
- SIMIX_simcall_exit(static_cast<simgrid::kernel::activity::ActivityImpl*>(action->getData()));
- }
- }
-}
-
-/** Handle any pending timer */