- DEBUG2("Simulate the run of a task of %f sec for %s",duration,locbuf);
- task = MSG_task_create("task", (duration)/reference, 0 , NULL);
- MSG_task_execute(task);
- MSG_task_destroy(task);
+ DEBUG2("Simulate the run of a task of %f sec for %s", duration, locbuf);
+ cond = SIMIX_cond_init();
+ mutex = SIMIX_mutex_init();
+
+ SIMIX_mutex_lock(mutex);
+ act =
+ SIMIX_action_execute(SIMIX_host_self(), "task", (duration) / reference);
+
+ SIMIX_register_action_to_condition(act, cond);
+ SIMIX_cond_wait(cond, mutex);
+ SIMIX_unregister_action_to_condition(act, cond);
+
+ SIMIX_action_destroy(act);
+ SIMIX_mutex_unlock(mutex);
+
+ SIMIX_cond_destroy(cond);
+ SIMIX_mutex_destroy(mutex);