Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Inline Context::self()."
[simgrid.git] / src / kernel / context / Context.hpp
index c501de8..60504fa 100644 (file)
@@ -43,8 +43,6 @@ protected:
 class XBT_PUBLIC Context {
   friend ContextFactory;
 
-  static thread_local Context* current_;
-
   std::function<void()> code_;
   actor::ActorImpl* actor_ = nullptr;
   void declare_context(std::size_t size);
@@ -67,9 +65,9 @@ public:
 
   // Retrieving the self() context
   /** @brief Retrives the current context of this thread */
-  static Context* self() { return current_; }
+  static Context* self();
   /** @brief Sets the current context of this thread */
-  static void set_current(Context* self) { current_ = self; }
+  static void set_current(Context* self);
 };
 
 class XBT_PUBLIC AttachContext : public Context {