Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'depencencies' of https://framagit.org/simgrid/simgrid into depencencies
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 24 Jan 2020 17:42:07 +0000 (18:42 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 24 Jan 2020 17:42:07 +0000 (18:42 +0100)
1  2 
include/simgrid/s4u/Activity.hpp

@@@ -1,4 -1,4 +1,4 @@@
 -/* Copyright (c) 2006-2019. The SimGrid Team. All rights reserved.          */
 +/* Copyright (c) 2006-2020. 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/forward.h>
  #include <string>
  #include <vector>
- #include <xbt/log.hpp>
  #include <xbt/signal.hpp>
  
 +XBT_LOG_EXTERNAL_CATEGORY(s4u_activity);
 +
  namespace simgrid {
  namespace s4u {
  
@@@ -92,7 -89,7 +91,7 @@@ private
  
  template <class AnyActivity> class Activity_T : public Activity {
  private:
 -  std::string name_             = "";
 +  std::string name_             = "unnamed";
    std::string tracing_category_ = "";
    void* user_data_              = nullptr;
    std::atomic_int_fast32_t refcount_{0};
@@@ -127,7 -124,6 +126,7 @@@ public
    {
      while (has_successors()) {
        AnyActivity* b = get_successor();
 +      XBT_CDEBUG(s4u_activity, "Remove a dependency from '%s' on '%s'", get_cname(), b->get_cname());
        b->remove_dependency_on(static_cast<AnyActivity*>(this));
        if (not b->has_dependencies()) {
          b->vetoable_start();
      if (has_dependencies())
        return static_cast<AnyActivity*>(this);
      set_state(State::STARTED);
 +    XBT_CDEBUG(s4u_activity, "All dependencies are solved, let's start '%s'", get_cname());
      static_cast<AnyActivity*>(this)->start();
      return static_cast<AnyActivity*>(this);
    }