- 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 SIMIX_process_get_name(process);
+}
+
+const char* SIMIX_process_get_name(smx_process_t process)
+{
+ return process->name;
+}
+
+int SIMIX_process_is_suspended(smx_process_t process)
+{
+ return process->suspended;
+}
+
+int SIMIX_process_is_enabled(smx_process_t process)
+{
+ if (process->request.call != REQ_NO_REQ && SIMIX_request_is_enabled(&process->request))
+ return TRUE;
+
+ return FALSE;
+}
+
+xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
+{
+ return process->properties;
+}
+
+void SIMIX_pre_process_sleep(smx_req_t req)
+{
+ if (MC_IS_ENABLED) {
+ req->process_sleep.result = SIMIX_DONE;
+ SIMIX_request_answer(req);