Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Field SwappedContext::stack_ became private, use get_stack().
[simgrid.git] / src / kernel / context / ContextBoost.cpp
index 1e65b48..3fb9768 100644 (file)
@@ -33,9 +33,9 @@ BoostContext::BoostContext(std::function<void()> code, void_pfn_smxprocess_t cle
     /* We need to pass the bottom of the stack to make_fcontext,
        depending on the stack direction it may be the lower or higher address: */
 #if PTH_STACKGROWTH == -1
-    void* stack = static_cast<char*>(this->stack_) + smx_context_usable_stack_size;
+    void* stack = static_cast<char*>(get_stack()) + smx_context_usable_stack_size;
 #else
-    void* stack = this->stack_;
+    void* stack = get_stack();
 #endif
     ASAN_ONLY(this->asan_stack_ = stack);
 #if BOOST_VERSION < 106100
@@ -55,7 +55,7 @@ BoostContext::BoostContext(std::function<void()> code, void_pfn_smxprocess_t cle
 BoostContext::~BoostContext()
 {
 #if BOOST_VERSION < 105600
-  if (not this->stack_)
+  if (not get_stack())
     delete this->fc_;
 #endif
 }