]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/context/ContextThread.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
There is no way these names are empty, bc we give a default value
[simgrid.git] / src / kernel / context / ContextThread.cpp
index 7ed881add0900ef8d34718b4eb8db5f46355eb0a..9106a3cb31a14b953116a89d335af14af77c538f 100644 (file)
@@ -24,21 +24,21 @@ namespace simgrid::kernel::context {
 
 ThreadContextFactory::ThreadContextFactory() : ContextFactory()
 {
-  if (stack_size != 8 * 1024 * 1024)
+  if (Context::stack_size != 8 * 1024 * 1024)
     XBT_INFO("Stack size modifications are ignored by thread factory.");
-  if (is_parallel())
+  if (Context::is_parallel())
     ParallelThreadContext::initialize();
 }
 
 ThreadContextFactory::~ThreadContextFactory()
 {
-  if (is_parallel())
+  if (Context::is_parallel())
     ParallelThreadContext::finalize();
 }
 
 ThreadContext* ThreadContextFactory::create_context(std::function<void()>&& code, actor::ActorImpl* actor, bool maestro)
 {
-  if (is_parallel())
+  if (Context::is_parallel())
     return this->new_context<ParallelThreadContext>(std::move(code), actor, maestro);
   else
     return this->new_context<SerialThreadContext>(std::move(code), actor, maestro);
@@ -46,7 +46,7 @@ ThreadContext* ThreadContextFactory::create_context(std::function<void()>&& code
 
 void ThreadContextFactory::run_all(std::vector<actor::ActorImpl*> const& actors_list)
 {
-  if (is_parallel())
+  if (Context::is_parallel())
     ParallelThreadContext::run_all(actors_list);
 
   else
@@ -84,7 +84,7 @@ void ThreadContext::wrapper(ThreadContext* context)
 {
   Context::set_current(context);
 
-  install_sigsegv_stack(nullptr, true);
+  install_sigsegv_stack(true);
   // Tell the caller (normally the maestro) we are starting, and wait for its green light
   context->end_.release();
   context->start();
@@ -103,7 +103,7 @@ void ThreadContext::wrapper(ThreadContext* context)
   // Signal to the caller (normally the maestro) that we have finished:
   context->yield();
 
-  install_sigsegv_stack(nullptr, false);
+  install_sigsegv_stack(false);
   XBT_DEBUG("Terminating");
   Context::set_current(nullptr);
 }