Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 22 Oct 2017 13:13:14 +0000 (15:13 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 22 Oct 2017 13:48:02 +0000 (15:48 +0200)
src/kernel/context/ContextBoost.cpp
src/kernel/context/ContextBoost.hpp

index bf96864..a9422e0 100644 (file)
@@ -177,7 +177,7 @@ void SerialBoostContext::suspend()
     XBT_DEBUG("No more process to run");
     next_context = static_cast<SerialBoostContext*>(BoostContext::getMaestro());
   }
-  SIMIX_context_set_current(static_cast<smx_context_t>(next_context));
+  SIMIX_context_set_current(next_context);
   BoostContext::swap(this, next_context);
 }
 
@@ -225,12 +225,12 @@ void ParallelBoostContext::finalize()
 void ParallelBoostContext::run_all()
 {
   threads_working_ = 0;
-  if (not parmap_)
+  if (parmap_ == nullptr)
     parmap_ = new simgrid::xbt::Parmap<smx_actor_t>(SIMIX_context_get_nthreads(), SIMIX_context_get_parallel_mode());
   parmap_->apply(
       [](smx_actor_t process) {
         ParallelBoostContext* context = static_cast<ParallelBoostContext*>(process->context);
-        return context->resume();
+        context->resume();
       },
       simix_global->process_to_run);
 }
@@ -258,7 +258,7 @@ void ParallelBoostContext::resume()
   xbt_os_thread_set_specific(worker_id_key_, reinterpret_cast<void*>(worker_id));
 
   ParallelBoostContext* worker_context = static_cast<ParallelBoostContext*>(SIMIX_context_self());
-  workers_context_[worker_id] = worker_context;
+  workers_context_[worker_id]          = worker_context;
 
   SIMIX_context_set_current(this);
   BoostContext::swap(worker_context, this);
index a067e8a..1132f98 100644 (file)
@@ -105,13 +105,12 @@ class BoostContextFactory : public ContextFactory {
 public:
   BoostContextFactory();
   ~BoostContextFactory() override;
-  Context* create_context(std::function<void()> code, void_pfn_smxprocess_t, smx_actor_t process) override;
+  Context* create_context(std::function<void()> code, void_pfn_smxprocess_t cleanup, smx_actor_t process) override;
   void run_all() override;
 
 private:
   bool parallel_;
 };
-
 }}} // namespace
 
 #endif