}
}
+void simcall_HANDLER_io_test(smx_simcall_t simcall, simgrid::kernel::activity::IoImpl* synchro)
+{
+ bool res = (synchro->state_ != simgrid::kernel::activity::State::WAITING &&
+ synchro->state_ != simgrid::kernel::activity::State::RUNNING);
+ if (res) {
+ synchro->simcalls_.push_back(simcall);
+ synchro->finish();
+ } else {
+ simcall->issuer_->simcall_answer();
+ }
+ simcall_io_test__set__result(simcall, res);
+}
+
namespace simgrid {
namespace kernel {
namespace activity {
void IoImpl::finish()
{
while (not simcalls_.empty()) {
- smx_simcall_t simcall = simcalls_.front();
+ const s_smx_simcall* simcall = simcalls_.front();
simcalls_.pop_front();
switch (state_) {
case State::DONE: