X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3b7e5f4b4d7c87ee3e8827313ec966ea8fc8387..72d32c4e88a57f4786f62fec48a1bfa454adbff9:/src/kernel/context/ContextSwapped.hpp diff --git a/src/kernel/context/ContextSwapped.hpp b/src/kernel/context/ContextSwapped.hpp index 8d21c01917..d687827cf7 100644 --- a/src/kernel/context/ContextSwapped.hpp +++ b/src/kernel/context/ContextSwapped.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -11,20 +11,14 @@ #include -namespace simgrid { -namespace kernel { -namespace context { +namespace simgrid::kernel::context { class SwappedContext; -} // namespace context -} // namespace kernel -} // namespace simgrid +} // namespace simgrid::kernel::context /* Use extern "C" to make sure that this symbol is easy to recognize by name, even on exotic platforms */ extern "C" XBT_ATTRIB_NORETURN void smx_ctx_wrapper(simgrid::kernel::context::SwappedContext* context); -namespace simgrid { -namespace kernel { -namespace context { +namespace simgrid::kernel::context { class SwappedContextFactory : public ContextFactory { friend SwappedContext; // Reads whether we are in parallel mode @@ -32,7 +26,7 @@ public: SwappedContextFactory() = default; SwappedContextFactory(const SwappedContextFactory&) = delete; SwappedContextFactory& operator=(const SwappedContextFactory&) = delete; - void run_all() override; + void run_all(std::vector const& actors) override; private: /* For the sequential execution */ @@ -54,7 +48,6 @@ public: void suspend() override; virtual void resume(); - XBT_ATTRIB_NORETURN void stop() override; void swap_into(SwappedContext* to); @@ -73,7 +66,7 @@ private: SwappedContextFactory& factory_; // for sequential and parallel run_all() #if HAVE_VALGRIND_H - unsigned int valgrind_stack_id_; + unsigned int valgrind_stack_id_ = 0; #endif #if HAVE_SANITIZER_ADDRESS_FIBER_SUPPORT const void* asan_stack_ = nullptr; @@ -95,7 +88,5 @@ inline void SwappedContext::verify_previous_context(XBT_ATTRIB_UNUSED const Swap #endif } -} // namespace context -} // namespace kernel -} // namespace simgrid +} // namespace simgrid::kernel::context #endif