X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6..72d32c4e88a57f4786f62fec48a1bfa454adbff9:/src/bindings/java/JavaContext.hpp diff --git a/src/bindings/java/JavaContext.hpp b/src/bindings/java/JavaContext.hpp index 432ccc5763..52598c626d 100644 --- a/src/bindings/java/JavaContext.hpp +++ b/src/bindings/java/JavaContext.hpp @@ -1,6 +1,6 @@ /* Context switching within the JVM. */ -/* 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,16 @@ #include #include -#include "simgrid/simix.h" #include "src/kernel/context/ContextThread.hpp" -#include "src/simix/smx_private.hpp" #include "jmsg.hpp" -namespace simgrid { -namespace kernel { -namespace context { +namespace simgrid::kernel::context { class JavaContext; class JavacontextFactory; -class JavaContext : public simgrid::kernel::context::SerialThreadContext { +class JavaContext : public SerialThreadContext { public: // The java process instance bound with the msg process structure: jobject jprocess_ = nullptr; @@ -32,23 +28,23 @@ public: JNIEnv* jenv_ = nullptr; friend class JavaContextFactory; - JavaContext(std::function&& code, smx_actor_t actor); + JavaContext(std::function&& code, actor::ActorImpl* actor); void start_hook() override; - void stop_hook() override; + void stop() override; }; -class JavaContextFactory : public simgrid::kernel::context::ContextFactory { +class JavaContextFactory : public ContextFactory { public: JavaContextFactory(); ~JavaContextFactory() override; Context* create_context(std::function&& code, actor::ActorImpl* actor) override; - void run_all() override; + void run_all(std::vector const& actors) override; }; -XBT_PRIVATE simgrid::kernel::context::ContextFactory* java_factory(); +XBT_PRIVATE ContextFactory* java_factory(); XBT_PRIVATE void java_main_jprocess(jobject process); -}}} // namespace simgrid::kernel::context +} // namespace simgrid::kernel::context -#endif /* !_XBT_CONTEXT_JAVA_H */ +#endif /* SIMGRID_JAVA_JAVA_CONTEXT_HPP */