-void IoImpl::post()
-{
- performed_ioops_ = surf_action_->get_cost();
- if (surf_action_->get_state() == resource::Action::State::FAILED) {
- if (disk_ && not disk_->is_on())
- set_state(State::FAILED);
- else
- set_state(State::CANCELED);
- } else if (timeout_detector_ && timeout_detector_->get_state() == resource::Action::State::FINISHED) {
- if (surf_action_->get_remains() > 0.0) {
- surf_action_->set_state(resource::Action::State::FAILED);
- set_state(State::TIMEOUT);
- } else {
- set_state(State::DONE);
- }
- } else {
- set_state(State::DONE);
- }
-
- clean_action();
- if (timeout_detector_) {
- timeout_detector_->unref();
- timeout_detector_ = nullptr;
- }
-
- /* Answer all simcalls associated with the synchro */
- finish();
-}