X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6..386393c4094b45cce01179befdd3d519b320db04:/src/simdag/simdag_private.hpp diff --git a/src/simdag/simdag_private.hpp b/src/simdag/simdag_private.hpp index 734cb6ee80..bb06103925 100644 --- a/src/simdag/simdag_private.hpp +++ b/src/simdag/simdag_private.hpp @@ -1,8 +1,9 @@ -/* Copyright (c) 2006-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2021. 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. */ +#include "simgrid/s4u/Engine.hpp" #include "simgrid/simdag.h" #include "surf/surf.hpp" #include @@ -19,18 +20,20 @@ namespace simgrid{ namespace sd{ class Global { public: + explicit Global(int* argc, char** argv) : engine_(new simgrid::s4u::Engine(argc, argv)) {} bool watch_point_reached = false; /* has a task just reached a watch point? */ std::set initial_tasks; std::set runnable_tasks; std::set completed_tasks; std::set return_set; + s4u::Engine* engine_; }; std::set* simulate (double how_long); } } -extern XBT_PRIVATE simgrid::sd::Global *sd_global; +extern XBT_PRIVATE std::unique_ptr sd_global; /* Task */ struct s_SD_task_t {