From: Martin Quinson Date: Mon, 21 Jan 2019 08:42:37 +0000 (+0100) Subject: Try to make a symbol easier to find for MC on exotic platforms X-Git-Tag: v3_22~522 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/71ff3d7f1d30d20062764ffa3b63e7e69b7a637a?hp=eacfab6c97ff6a65f91ebbea136b732259d7667e Try to make a symbol easier to find for MC on exotic platforms --- diff --git a/src/kernel/context/ContextUnix.cpp b/src/kernel/context/ContextUnix.cpp index e9dafbfb5d..09711d033c 100644 --- a/src/kernel/context/ContextUnix.cpp +++ b/src/kernel/context/ContextUnix.cpp @@ -23,9 +23,10 @@ constexpr int CTX_ADDR_LEN = 2; static_assert(sizeof(simgrid::kernel::context::UContext*) <= CTX_ADDR_LEN * sizeof(int), "Ucontexts are not supported on this arch yet. Please increase CTX_ADDR_LEN."); -namespace simgrid { -namespace kernel { -namespace context { +/* Make sure that this symbol is easy to recognize by name, even on exotic platforms */ +extern "C" { +static void smx_ctx_wrapper(int i1, int i2); +} // The name of this function is currently hardcoded in MC (as string). // Do not change it without fixing those references as well. @@ -50,6 +51,10 @@ static void smx_ctx_wrapper(int i1, int i2) context->suspend(); } +namespace simgrid { +namespace kernel { +namespace context { + // UContextFactory Context* UContextFactory::create_context(std::function code, void_pfn_smxprocess_t cleanup, smx_actor_t actor) {