Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Specialize parameter for simcall comm_wait.
[simgrid.git] / src / kernel / activity / IoImpl.cpp
index b96036d..f8fd4c9 100644 (file)
@@ -13,9 +13,9 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_io, simix, "Logging specific to SIMIX (io)");
 
-void simcall_HANDLER_io_wait(smx_simcall_t simcall, smx_activity_t synchro)
+void simcall_HANDLER_io_wait(smx_simcall_t simcall, simgrid::kernel::activity::IoImpl* synchro)
 {
-  XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro.get(), (int)synchro->state_);
+  XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state_);
 
   /* Associate this simcall to the synchro */
   synchro->simcalls_.push_back(simcall);
@@ -24,13 +24,13 @@ void simcall_HANDLER_io_wait(smx_simcall_t simcall, smx_activity_t synchro)
   /* set surf's synchro */
   if (MC_is_active() || MC_record_replay_is_active()) {
     synchro->state_ = SIMIX_DONE;
-    boost::static_pointer_cast<simgrid::kernel::activity::IoImpl>(synchro)->finish();
+    synchro->finish();
     return;
   }
 
   /* If the synchro is already finished then perform the error handling */
   if (synchro->state_ != SIMIX_RUNNING)
-    boost::static_pointer_cast<simgrid::kernel::activity::IoImpl>(synchro)->finish();
+    synchro->finish();
 }
 
 namespace simgrid {
@@ -110,7 +110,7 @@ void IoImpl::finish()
             std::make_exception_ptr(simgrid::CancelException(XBT_THROW_POINT, "I/O Canceled"));
         break;
       default:
-        xbt_die("Internal error in SIMIX_io_finish: unexpected synchro state %d", static_cast<int>(state_));
+        xbt_die("Internal error in IoImpl::finish(): unexpected synchro state %d", static_cast<int>(state_));
     }
 
     simcall->issuer->waiting_synchro = nullptr;