- // FIXME: simix sleep
- self = SIMIX_host_self();
- sleep_action = SIMIX_action_sleep(self, seconds);
- sleep(seconds);
+ host = SIMIX_host_self();
+ sleep_action = SIMIX_action_sleep(host, seconds);
+ mutex = SIMIX_mutex_init();
+ cond = SIMIX_cond_init();
+ SIMIX_mutex_lock(mutex);
+ SIMIX_register_condition_to_action(sleep_action, cond);
+ SIMIX_register_action_to_condition(sleep_action, cond);
+ SIMIX_cond_wait(cond, mutex);
+ SIMIX_mutex_unlock(mutex);
+ SIMIX_mutex_destroy(mutex);
+ SIMIX_cond_destroy(cond);
+ // FIXME: check for success/failure?