Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
_SIMIX_cond_wait becomes ConditionVariable::wait
[simgrid.git] / src / simix / smx_synchro.cpp
index 0cd3b01..153d7a7 100644 (file)
@@ -6,27 +6,13 @@
 #include "src/kernel/activity/ConditionVariableImpl.hpp"
 #include "src/kernel/activity/MutexImpl.hpp"
 #include "src/kernel/activity/SemaphoreImpl.hpp"
-#include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/kernel/context/Context.hpp"
 #include "src/simix/smx_synchro_private.hpp"
-#include "src/surf/cpu_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix, "SIMIX Synchronization (mutex, semaphores and conditions)");
 
 /***************************** Raw synchronization *********************************/
 
-smx_activity_t SIMIX_synchro_wait(sg_host_t smx_host, double timeout)
-{
-  XBT_IN("(%p, %f)",smx_host,timeout);
-
-  simgrid::kernel::activity::RawImplPtr sync =
-      simgrid::kernel::activity::RawImplPtr(new simgrid::kernel::activity::RawImpl());
-  sync->surf_action_ = smx_host->pimpl_cpu->sleep(timeout);
-  sync->surf_action_->set_data(sync.get());
-  XBT_OUT();
-  return sync;
-}
-
 void SIMIX_synchro_stop_waiting(smx_actor_t process, smx_simcall_t simcall)
 {
   XBT_IN("(%p, %p)",process,simcall);
@@ -37,11 +23,11 @@ void SIMIX_synchro_stop_waiting(smx_actor_t process, smx_simcall_t simcall)
       break;
 
     case SIMCALL_COND_WAIT:
-      simgrid::xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping, *process);
+      simgrid::xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping_, *process);
       break;
 
     case SIMCALL_COND_WAIT_TIMEOUT:
-      simgrid::xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping, *process);
+      simgrid::xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping_, *process);
       simcall_cond_wait_timeout__set__result(simcall, 1); // signal a timeout
       break;