Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
get rid of surf_exit()
[simgrid.git] / doc / doxygen / uhood_switch.doc
index ff66dbf..3f3dc80 100644 (file)
@@ -260,8 +260,7 @@ T simgrid::kernel::Future::get()
 template<class T>
 T simgrid::kernel::FutureState<T>::get()
 {
-  if (status_ != FutureStatus::ready)
-    xbt_die("Deadlock: this future is not ready");
+  xbt_assert(status_ == FutureStatus::ready, "Deadlock: this future is not ready");
   status_ = FutureStatus::done;
   if (exception_) {
     std::exception_ptr exception = std::move(exception_);
@@ -328,7 +327,7 @@ number and its arguments (among some other things):
 @code{cpp}
 struct s_smx_simcall {
   // Simcall number:
-  e_smx_simcall_t call;
+  Simcall call;
   // Issuing actor:
   smx_actor_t issuer;
   // Arguments of the simcall:
@@ -478,8 +477,7 @@ template<class F>
 auto kernel_sync(F code) -> decltype(code().get())
 {
   typedef decltype(code().get()) T;
-  if (SIMIX_is_maestro())
-    xbt_die("Can't execute blocking call in kernel mode");
+  xbt_assert(not SIMIX_is_maestro(), "Can't execute blocking call in kernel mode");
 
   smx_actor_t self = SIMIX_process_self();
   simgrid::xbt::Result<T> result;
@@ -749,7 +747,7 @@ bool ConditionVariable::wait_for(std::unique_lock<Mutex>& lock,
   double duration, P pred)
 {
   return this->wait_until(lock,
-    SIMIX_get_clock() + duration, std::move(pred));
+    simgrid::s4u::Engine::get_clock() + duration, std::move(pred));
 }
 @endcode