]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/workstation_ptask_L07.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move GTNETS initialization to the right place and comply with the new parser
[simgrid.git] / src / surf / workstation_ptask_L07.c
index 34468c7d0bb98e25312a9f67287e424b6935129f..f69cb1eb07110237fb8c6f18a6f650b340bc0eef 100644 (file)
@@ -665,6 +665,10 @@ static double get_link_latency(const void *link)
   return ((link_L07_t) link)->lat_current;
 }
 
+static int link_shared(const void *link)
+{
+  return lmm_constraint_is_shared(((link_L07_t) link)->constraint);
+}
 
 /**************************************/
 /*** Resource Creation & Destruction **/
@@ -673,6 +677,7 @@ static double get_link_latency(const void *link)
 static void cpu_free(void *cpu)
 {
   free(((cpu_L07_t) cpu)->name);
+  xbt_dict_free(&(((cpu_L07_t)cpu)->properties));
   free(cpu);
 }
 
@@ -751,6 +756,7 @@ static void parse_cpu_init(void)
 static void link_free(void *nw_link)
 {
   free(((link_L07_t) nw_link)->name);
+  xbt_dict_free(&(((link_L07_t)nw_link)->properties));
   free(nw_link);
 }
 
@@ -1121,6 +1127,8 @@ static void model_init_internal(void)
       get_link_bandwidth;
   surf_workstation_model->extension_public->get_link_latency =
       get_link_latency;
+  surf_workstation_model->extension_public->link_shared =
+      link_shared;
 
   surf_workstation_model->common_public->get_properties = get_properties;