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

Public GIT Repository
32 bits insists of having some timestamps off by 1us ... Hide them.
[simgrid.git] / src / kernel / context / Context.hpp
index c501de891e9d33a2eeee9febeada184c276284ce..60504fafd03798fd882122a57a63cfcc9e412e30 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 {