Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove comm destroy simcall
authorPaul Bédaride <paul.bedaride@gmail.com>
Thu, 13 Feb 2014 13:10:33 +0000 (14:10 +0100)
committerPaul Bédaride <paul.bedaride@gmail.com>
Thu, 13 Feb 2014 13:22:23 +0000 (14:22 +0100)
include/simgrid/simix.h
src/simix/simcalls.in
src/simix/simcalls_generated_args_getter_setter.h
src/simix/simcalls_generated_body.c
src/simix/simcalls_generated_case.c
src/simix/simcalls_generated_enum.h
src/simix/simcalls_generated_res_getter_setter.h
src/simix/simcalls_generated_string.c
src/simix/smx_network.c
src/simix/smx_network_private.h
src/simix/smx_user.c

index 938535a..91a6269 100644 (file)
@@ -435,7 +435,6 @@ XBT_PUBLIC(smx_action_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff,
                                             int (*match_fun)(void *, void *, smx_action_t),
                                             void *data, double rate);
 
-XBT_PUBLIC(void) simcall_comm_destroy(smx_action_t comm);
 XBT_PUBLIC(smx_action_t) simcall_comm_iprobe(smx_rdv_t rdv, int src, int tag,
                                 int (*match_fun)(void *, void *, smx_action_t), void *data);
 XBT_PUBLIC(void) simcall_comm_cancel(smx_action_t comm);
index 28d802d..fcf133e 100644 (file)
@@ -78,7 +78,6 @@ comm_send False (void) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double
 comm_isend True (void*, smx_action_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (clean_fun, FPtr, simix_clean_func_t) (data, void*) (detached, int)
 comm_recv False (void) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (data, void*) (timeout, double) (rate, double)
 comm_irecv True (void*, smx_action_t) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (data, void*) (rate, double)
-comm_destroy True (void) (comm, void*, smx_action_t)
 comm_cancel True (void) (comm, void*, smx_action_t)
 comm_waitany False (int) (comms, void*, xbt_dynar_t)
 comm_wait False (void) (comm, void*, smx_action_t) (timeout, double)
index d87cea3..af7235f 100644 (file)
@@ -858,12 +858,6 @@ static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall){
 static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg){
     simcall->args[5].d = arg;
 }
-static inline smx_action_t simcall_comm_destroy__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
-}
-static inline void simcall_comm_destroy__set__comm(smx_simcall_t simcall, void* arg){
-    simcall->args[0].dp = arg;
-}
 static inline smx_action_t simcall_comm_cancel__get__comm(smx_simcall_t simcall){
   return (smx_action_t) simcall->args[0].dp;
 }
index 113e5ca..b81e906 100644 (file)
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_comm_destroy(smx_action_t comm) {
-    smx_process_t self = SIMIX_process_self();
-    self->simcall.call = SIMCALL_COMM_DESTROY;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) comm;
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_pre(&self->simcall, 0);
-    }    
-    
-  }
   inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
     self->simcall.call = SIMCALL_COMM_CANCEL;
index 59b99ea..1fc92a5 100644 (file)
@@ -365,11 +365,6 @@ case SIMCALL_COMM_IRECV:
       SIMIX_simcall_answer(simcall);
       break;  
 
-case SIMCALL_COMM_DESTROY:
-       SIMIX_pre_comm_destroy(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
 case SIMCALL_COMM_CANCEL:
        SIMIX_pre_comm_cancel(simcall , (smx_action_t) simcall->args[0].dp);
       SIMIX_simcall_answer(simcall);
index 10bfce9..50460e2 100644 (file)
@@ -78,7 +78,6 @@ SIMCALL_COMM_SEND,
 SIMCALL_COMM_ISEND,
 SIMCALL_COMM_RECV,
 SIMCALL_COMM_IRECV,
-SIMCALL_COMM_DESTROY,
 SIMCALL_COMM_CANCEL,
 SIMCALL_COMM_WAITANY,
 SIMCALL_COMM_WAIT,
index 42c9afb..2e051f6 100644 (file)
@@ -309,8 +309,6 @@ static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, void*
 }
 
 
-
-
 static inline int simcall_comm_waitany__get__result(smx_simcall_t simcall){
   return  simcall->result.i;
 }
index 0c97a20..6bbf280 100644 (file)
@@ -78,7 +78,6 @@
 [SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
 [SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
 [SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
-[SIMCALL_COMM_DESTROY] = "SIMCALL_COMM_DESTROY",
 [SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
 [SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
 [SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
index a30ee03..9797825 100644 (file)
@@ -290,9 +290,6 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
   return act;
 }
 
-void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action){
-  SIMIX_comm_destroy(action);
-}
 /**
  *  \brief Destroy a communicate action
  *  \param action The communicate action to be destroyed
@@ -1105,7 +1102,7 @@ int SIMIX_pre_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action
  *  \brief verify if communication is latency bounded
  *  \param comm The communication
  */
-XBT_INLINE int SIMIX_comm_is_latency_bounded(smx_action_t action)
+int SIMIX_comm_is_latency_bounded(smx_action_t action)
 {
   if(!action){
     return 0;
index fb04ba4..e85cf58 100644 (file)
@@ -23,7 +23,7 @@ void SIMIX_network_init(void);
 void SIMIX_network_exit(void);
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_INLINE XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm);
+XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm);
 #endif
 
 smx_rdv_t SIMIX_rdv_create(const char *name);
@@ -94,7 +94,6 @@ smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
                                   void *dst_buff, size_t *dst_buff_size,
                                   int (*match_fun)(void *, void *, smx_action_t),
                                  void *data, double rate);
-void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action);
 void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action);
 double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action);
 e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action);
index 63d8f4a..143d10f 100644 (file)
@@ -888,13 +888,6 @@ smx_rdv_t simcall_rdv_get_by_name(const char *name)
    * skipping the simcall (for now). It works in parallel, it won't work on
    * distributed but probably we will change MSG for that. */
 
-  /*
-  smx_simcall_t simcall = simcall_mine();
-  simcall->call = SIMCALL_RDV_GEY_BY_NAME;
-  simcall->rdv_get_by_name.name = name;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->rdv_get_by_name.result;*/
-
   return SIMIX_rdv_get_by_name(name);
 }
 
@@ -1030,22 +1023,6 @@ smx_action_t simcall_comm_iprobe(smx_rdv_t rdv, int src, int tag,
   return simcall_BODY_comm_iprobe(rdv, src, tag, match_fun, data);
 }
 
-void simcall_comm_destroy(smx_action_t comm)
-{
-  xbt_assert(comm, "Invalid parameter");
-
-  /* FIXME remove this simcall type: comms are auto-destroyed now */
-
-  /*
-  smx_simcall_t simcall = simcall_mine();
-
-  simcall->call = SIMCALL_COMM_DESTROY;
-  simcall->comm_destroy.comm = comm;
-
-  SIMIX_simcall_push(simcall->issuer);
-  */
-}
-
 /**
  * \ingroup simix_comm_management
  */