Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[L07] Don't segfault on point-to-point communications
[simgrid.git] / src / surf / host_ptask_L07.hpp
index c265a52..34d7a2c 100644 (file)
@@ -1,9 +1,11 @@
-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2015. 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 <xbt/base.h>
+
 #include "host_interface.hpp"
 
 #ifndef HOST_L07_HPP_
  * Classes *
  ***********/
 
-class HostL07Model;
-class CpuL07Model;
-class NetworkL07Model;
-
-class HostL07;
-class CpuL07;
-class LinkL07;
+class XBT_PRIVATE HostL07Model;
+class XBT_PRIVATE CpuL07Model;
+class XBT_PRIVATE NetworkL07Model;
 
-class L07Action;
+class XBT_PRIVATE HostL07;
+class XBT_PRIVATE CpuL07;
+class XBT_PRIVATE LinkL07;
 
+class XBT_PRIVATE L07Action;
 /*********
  * Tools *
  *********/
@@ -50,7 +51,7 @@ public:
 
 class CpuL07Model : public CpuModel {
 public:
-  CpuL07Model() : CpuModel() {};
+  CpuL07Model(HostL07Model *hmodel) : CpuModel() {p_hostModel = hmodel;};
   ~CpuL07Model() {surf_cpu_model_pm = NULL;};
   Cpu *createCpu(const char *name,  xbt_dynar_t powerPeak,
                           int pstate, double power_scale,
@@ -65,7 +66,7 @@ public:
 
 class NetworkL07Model : public NetworkModel {
 public:
-  NetworkL07Model() : NetworkModel() {};
+  NetworkL07Model(HostL07Model *hmodel) : NetworkModel() {p_hostModel = hmodel;};
   ~NetworkL07Model() {surf_network_model = NULL;};
   Link* createLink(const char *name,
                                                   double bw_initial,