- process->suspended = 1;
- c = process->cond;
- xbt_fifo_foreach(c->actions, i, act, smx_action_t) {
- surf_workstation_model->suspend(act->surf_action);
- }
- } else {
- process->suspended = 1;
- }
- } else {
- /* process executing, I can create an action and suspend it */
- smx_action_t dummy;
- smx_cond_t cond;
- char name[] = "dummy";
- process->suspended = 1;
-
- cond = SIMIX_cond_init();
- dummy = SIMIX_action_execute(SIMIX_process_get_host(process), name, 0);
- SIMIX_process_self()->waiting_action = dummy;
- surf_workstation_model->suspend(dummy->surf_action);
- SIMIX_register_action_to_condition(dummy, cond);
- __SIMIX_cond_wait(cond);
- SIMIX_process_self()->waiting_action = NULL;
- SIMIX_unregister_action_to_condition(dummy, cond);
- SIMIX_action_destroy(dummy);
- SIMIX_cond_destroy(cond);
- }
- return;