Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[doc] Add documentation about compiling to 32bit on Linux 64bit multiarch
[simgrid.git] / src / simix / smx_network.cpp
index b715647..9b79a4f 100644 (file)
@@ -178,7 +178,7 @@ smx_synchro_t SIMIX_fifo_get_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
       xbt_fifo_remove_item(fifo, item);
       xbt_fifo_free_item(item);
       synchro->comm.refcount++;
-#ifdef HAVE_MC
+#if HAVE_MC
       synchro->comm.rdv_cpy = synchro->comm.rdv;
 #endif
       synchro->comm.rdv = NULL;
@@ -252,12 +252,6 @@ smx_synchro_t SIMIX_comm_new(e_smx_comm_type_t type)
   synchro->comm.src_data=NULL;
   synchro->comm.dst_data=NULL;
 
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  //initialize with unknown value
-  synchro->latency_limited = -1;
-#endif
-
   synchro->category = NULL;
 
   XBT_DEBUG("Create communicate synchro %p", synchro);
@@ -286,10 +280,6 @@ void SIMIX_comm_destroy(smx_synchro_t synchro)
   XBT_DEBUG("Really free communication %p; refcount is now %d", synchro,
       synchro->comm.refcount);
 
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  synchro->latency_limited = SIMIX_comm_is_latency_bounded( synchro ) ;
-#endif
-
   xbt_free(synchro->name);
   SIMIX_comm_destroy_internal_actions(synchro);
 
@@ -311,9 +301,6 @@ void SIMIX_comm_destroy(smx_synchro_t synchro)
 void SIMIX_comm_destroy_internal_actions(smx_synchro_t synchro)
 {
   if (synchro->comm.surf_comm){
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-    synchro->latency_limited = SIMIX_comm_is_latency_bounded(synchro);
-#endif
     synchro->comm.surf_comm->unref();
     synchro->comm.surf_comm = NULL;
   }
@@ -720,7 +707,7 @@ static inline void SIMIX_comm_start(smx_synchro_t synchro)
     synchro->state = SIMIX_RUNNING;
 
     /* If a link is failed, detect it immediately */
-    if (synchro->comm.surf_comm->getState() == SURF_ACTION_FAILED) {
+    if (synchro->comm.surf_comm->getState() == simgrid::surf::Action::State::failed) {
       XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure",
                 sg_host_get_name(sender), sg_host_get_name(receiver));
       synchro->state = SIMIX_LINK_FAILURE;
@@ -888,19 +875,19 @@ void SIMIX_post_comm(smx_synchro_t synchro)
 {
   /* Update synchro state */
   if (synchro->comm.src_timeout &&
-      synchro->comm.src_timeout->getState() == SURF_ACTION_DONE)
+      synchro->comm.src_timeout->getState() == simgrid::surf::Action::State::done)
     synchro->state = SIMIX_SRC_TIMEOUT;
   else if (synchro->comm.dst_timeout &&
-    synchro->comm.dst_timeout->getState() == SURF_ACTION_DONE)
+    synchro->comm.dst_timeout->getState() == simgrid::surf::Action::State::done)
     synchro->state = SIMIX_DST_TIMEOUT;
   else if (synchro->comm.src_timeout &&
-    synchro->comm.src_timeout->getState() == SURF_ACTION_FAILED)
+    synchro->comm.src_timeout->getState() == simgrid::surf::Action::State::failed)
     synchro->state = SIMIX_SRC_HOST_FAILURE;
   else if (synchro->comm.dst_timeout &&
-      synchro->comm.dst_timeout->getState() == SURF_ACTION_FAILED)
+      synchro->comm.dst_timeout->getState() == simgrid::surf::Action::State::failed)
     synchro->state = SIMIX_DST_HOST_FAILURE;
   else if (synchro->comm.surf_comm &&
-    synchro->comm.surf_comm->getState() == SURF_ACTION_FAILED) {
+    synchro->comm.surf_comm->getState() == simgrid::surf::Action::State::failed) {
     XBT_DEBUG("Puta madre. Surf says that the link broke");
     synchro->state = SIMIX_LINK_FAILURE;
   } else
@@ -1018,25 +1005,6 @@ smx_process_t SIMIX_comm_get_dst_proc(smx_synchro_t synchro)
   return synchro->comm.dst_proc;
 }
 
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-/**
- *  \brief verify if communication is latency bounded
- *  \param comm The communication
- */
-int SIMIX_comm_is_latency_bounded(smx_synchro_t synchro)
-{
-  if(!synchro){
-    return 0;
-  }
-  if (synchro->comm.surf_comm){
-    XBT_DEBUG("Getting latency limited for surf_action (%p)", synchro->comm.surf_comm);
-    synchro->latency_limited = surf_network_action_get_latency_limited(synchro->comm.surf_comm);
-    XBT_DEBUG("synchro limited is %d", synchro->latency_limited);
-  }
-  return synchro->latency_limited;
-}
-#endif
-
 /******************************************************************************/
 /*                    SIMIX_comm_copy_data callbacks                       */
 /******************************************************************************/