Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
track all the useless void
[simgrid.git] / src / kernel / context / Context.cpp
index 29393ea..d650e20 100644 (file)
 #include "src/kernel/context/Context.hpp"
 #include "src/simix/smx_private.h"
 
-void SIMIX_process_set_cleanup_function(
-  smx_process_t process, void_pfn_smxprocess_t cleanup)
-{
-  process->context->set_cleanup(cleanup);
-}
-
 /**
  * @brief creates a new context for a user level process
  * @param code a main function
@@ -33,8 +27,7 @@ smx_context_t SIMIX_context_new(
   void_pfn_smxprocess_t cleanup_func,
   smx_process_t simix_process)
 {
-  if (!simix_global)
-    xbt_die("simix is not initialized, please call MSG_init first");
+  xbt_assert(simix_global, "simix is not initialized, please call MSG_init first");
   return simix_global->context_factory->create_context(
     std::move(code), cleanup_func, simix_process);
 }
@@ -108,14 +101,13 @@ AttachContext::~AttachContext()
 }}}
 
 /** @brief Executes all the processes to run (in parallel if possible). */
-void SIMIX_context_runall(void)
+void SIMIX_context_runall()
 {
-  if (!xbt_dynar_is_empty(simix_global->process_to_run))
-    simix_global->context_factory->run_all();
+  simix_global->context_factory->run_all();
 }
 
 /** @brief returns the current running context */
-smx_context_t SIMIX_context_self(void)
+smx_context_t SIMIX_context_self()
 {
   if (simix_global && simix_global->context_factory)
     return simix_global->context_factory->self();