Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Replay/Memory: Move tmp buffers from replay to memory
[simgrid.git] / src / s4u / s4u_link.cpp
index 7a38166..02e0102 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2018. 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. */
@@ -6,8 +6,9 @@
 #include <algorithm>
 
 #include "simgrid/s4u/Link.hpp"
-#include "simgrid/sg_config.h"
+#include "simgrid/sg_config.hpp"
 #include "simgrid/simix.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "src/surf/network_interface.hpp"
 #include "xbt/log.h"
 
@@ -17,8 +18,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_link, s4u, "Logging specific to the S4U link
  * C API *
  *********/
 
-extern "C" {
-
 const char* sg_link_name(sg_link_t link)
 {
   return link->getCname();
@@ -67,7 +66,6 @@ void sg_link_exit()
 {
   simgrid::surf::LinkImpl::linksExit();
 }
-}
 
 /***********
  * C++ API *
@@ -116,7 +114,7 @@ int Link::sharingPolicy()
 
 double Link::getUsage()
 {
-  return lmm_constraint_get_usage(this->pimpl_->constraint());
+  return this->pimpl_->constraint()->get_usage();
 }
 
 void Link::turnOn()