X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cc735fda92d738d39f1017a15afb3ac7acd6b47c..cefad23a9d9a13805bb7b6017d8d9e0585d639d5:/src/kernel/context/Context.hpp diff --git a/src/kernel/context/Context.hpp b/src/kernel/context/Context.hpp index f1aa12bc48..5edadf8c58 100644 --- a/src/kernel/context/Context.hpp +++ b/src/kernel/context/Context.hpp @@ -9,7 +9,6 @@ #include "simgrid/forward.h" #include "src/kernel/activity/ActivityImpl.hpp" -#include #include #include @@ -44,12 +43,16 @@ protected: class XBT_PUBLIC Context { friend ContextFactory; + static thread_local Context* current_context_; + std::function code_; actor::ActorImpl* actor_ = nullptr; bool iwannadie_ = false; void declare_context(std::size_t size); public: + static int install_sigsegv_stack(stack_t* old_stack, bool enable); + Context(std::function&& code, actor::ActorImpl* actor); Context(const Context&) = delete; Context& operator=(const Context&) = delete; @@ -104,8 +107,4 @@ XBT_PRIVATE ContextFactory* boost_factory(); XBT_PRIVATE void SIMIX_context_mod_init(); XBT_PRIVATE void SIMIX_context_mod_exit(); - -#ifndef WIN32 -XBT_PUBLIC_DATA std::array sigsegv_stack; -#endif #endif