X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d535c50c617ba838b99de4bd251a6ac076774d00..b7b9fb781045188e65beb5c1dfc391a2d21e5472:/src/bindings/java/JavaContext.hpp diff --git a/src/bindings/java/JavaContext.hpp b/src/bindings/java/JavaContext.hpp index 0a07f01358..8eef41b773 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-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2019. 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. */ @@ -14,7 +14,6 @@ #include "simgrid/simix.h" #include "src/kernel/context/ContextThread.hpp" #include "src/simix/smx_private.hpp" -#include "xbt/xbt_os_thread.h" #include "jmsg.hpp" @@ -33,21 +32,17 @@ public: JNIEnv* jenv_ = nullptr; friend class JavaContextFactory; - JavaContext(std::function code, - void_pfn_smxprocess_t cleanup_func, - smx_actor_t process); + JavaContext(std::function&& code, smx_actor_t actor); void start_hook() override; - void stop() override; + void stop_hook() override; }; class JavaContextFactory : public simgrid::kernel::context::ContextFactory { public: JavaContextFactory(); ~JavaContextFactory() override; - JavaContext* self() override; - JavaContext* create_context(std::function code, - void_pfn_smxprocess_t, smx_actor_t process) override; + JavaContext* create_context(std::function&& code, smx_actor_t actor) override; void run_all() override; };