X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/22e6546d2c6f14864cc93c4ed1470d8e8c1e2d95..5a44668d9c4fae9baed7798d707fdf843446f2fc:/src/simdag/simdag_private.hpp diff --git a/src/simdag/simdag_private.hpp b/src/simdag/simdag_private.hpp index 6b14965fc2..e452c3ba3d 100644 --- a/src/simdag/simdag_private.hpp +++ b/src/simdag/simdag_private.hpp @@ -1,14 +1,13 @@ -/* Copyright (c) 2006-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-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. */ +#include "simgrid/simdag.h" +#include "surf/surf.hpp" #include #include #include -#include "simgrid/simdag.h" -#include "surf/surf.h" #ifndef SIMDAG_PRIVATE_HPP #define SIMDAG_PRIVATE_HPP @@ -20,21 +19,17 @@ namespace simgrid{ namespace sd{ class Global { public: - explicit Global(); - Global(const Global&) = delete; - ~Global(); - bool watch_point_reached; /* has a task just reached a watch point? */ - std::set *initial_tasks; - std::set *runnable_tasks; - std::set *completed_tasks; - std::set *return_set; + 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; }; std::set* simulate (double how_long); } } -extern "C" { extern XBT_PRIVATE simgrid::sd::Global *sd_global; /* Task */ @@ -47,12 +42,12 @@ struct s_SD_task_t { double alpha; /* used by typed parallel tasks */ double start_time; double finish_time; - surf_action_t surf_action; + simgrid::kernel::resource::Action* surf_action; unsigned short watch_points; /* bit field xor()ed with masks */ - int marked; /* used to check if the task DAG has some cycle*/ + bool marked = false; /* used to check if the task DAG has some cycle*/ - /* dependencies */ + /* dependencies -- cannot be embedded in the struct since it's not handled as a real C++ class */ std::set *inputs; std::set *outputs; std::set *predecessors; @@ -71,5 +66,4 @@ XBT_PRIVATE void SD_task_run(SD_task_t task); XBT_PRIVATE bool acyclic_graph_detail(xbt_dynar_t dag); XBT_PRIVATE void uniq_transfer_task_name(SD_task_t task); XBT_PRIVATE const char *__get_state_name(e_SD_task_state_t state); -} #endif