Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
hide a global data container
[simgrid.git] / src / msg / msg_host.cpp
index c1af957400b67fb7267504a9f0be1c76efae3435..1d369c03135648c3d94d6e5fcc3777d72b410685 100644 (file)
@@ -4,11 +4,12 @@
 /* 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 "src/msg/msg_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "simgrid/simix.h"
 #include <simgrid/s4u/host.hpp>
-#include "msg_private.hpp"
+#include <numeric>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg);
 
@@ -127,7 +128,7 @@ void __MSG_host_priv_free(msg_host_priv_t priv)
  */
 int MSG_get_host_number()
 {
-  return xbt_dict_length(host_list);
+  return sg_host_count();
 }
 
 /** \ingroup m_host_management