Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename the S4U method retrieving the internal impl to getImpl
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 26 Jul 2016 09:42:13 +0000 (11:42 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 26 Jul 2016 09:42:13 +0000 (11:42 +0200)
include/simgrid/s4u/actor.hpp
include/simgrid/s4u/mailbox.hpp
src/s4u/s4u_actor.cpp
src/s4u/s4u_comm.cpp
src/s4u/s4u_mailbox.cpp

index f5de605..28dbdc4 100644 (file)
@@ -247,8 +247,9 @@ public:
 
   /** Ask kindly to all actors to die. Only the issuer will survive. */
   static void killAll();
-  
-  smx_process_t getInferior();
+
+  /** Returns the internal implementation of this actor */
+  smx_process_t getImpl();
 };
 
 using ActorPtr = Actor::Ptr;
index c4a022c..88f9b98 100644 (file)
@@ -35,7 +35,7 @@ XBT_PUBLIC_CLASS Mailbox {
   Mailbox(smx_mailbox_t mbox): pimpl_(mbox) {}
 
 protected:
-  smx_mailbox_t getInferior() { return pimpl_; }
+  smx_mailbox_t getImpl() { return pimpl_; }
 
 public:
 
index c53f54a..0b42660 100644 (file)
@@ -83,7 +83,7 @@ void Actor::kill(int pid) {
   }
 }
 
-smx_process_t Actor::getInferior() {
+smx_process_t Actor::getImpl() {
   return pimpl_;
 }
 
index e10d2b0..7873e1d 100644 (file)
@@ -76,12 +76,12 @@ void Comm::start() {
   xbt_assert(state_ == inited);
 
   if (srcBuff_ != nullptr) { // Sender side
-    pimpl_ = simcall_comm_isend(sender_, mailbox_->getInferior(), remains_, rate_,
+    pimpl_ = simcall_comm_isend(sender_, mailbox_->getImpl(), remains_, rate_,
         srcBuff_, srcBuffSize_,
         matchFunction_, cleanFunction_, copyDataFunction_,
         userData_, detached_);
   } else if (dstBuff_ != nullptr) { // Receiver side
-    pimpl_ = simcall_comm_irecv(receiver_, mailbox_->getInferior(), dstBuff_, &dstBuffSize_,
+    pimpl_ = simcall_comm_irecv(receiver_, mailbox_->getImpl(), dstBuff_, &dstBuffSize_,
         matchFunction_, copyDataFunction_,
         userData_, rate_);
 
@@ -97,12 +97,12 @@ void Comm::wait() {
     simcall_comm_wait(pimpl_, -1/*timeout*/);
   else {// p_state == inited. Save a simcall and do directly a blocking send/recv
     if (srcBuff_ != nullptr) {
-      simcall_comm_send(sender_, mailbox_->getInferior(), remains_, rate_,
+      simcall_comm_send(sender_, mailbox_->getImpl(), remains_, rate_,
           srcBuff_, srcBuffSize_,
           matchFunction_, copyDataFunction_,
           userData_, -1 /*timeout*/);
     } else {
-      simcall_comm_recv(receiver_, mailbox_->getInferior(), dstBuff_, &dstBuffSize_,
+      simcall_comm_recv(receiver_, mailbox_->getImpl(), dstBuff_, &dstBuffSize_,
           matchFunction_, copyDataFunction_,
           userData_, -1/*timeout*/, rate_);
     }
@@ -120,12 +120,12 @@ void Comm::wait(double timeout) {
 
   // It's not started yet. Do it in one simcall
   if (srcBuff_ != nullptr) {
-    simcall_comm_send(sender_, mailbox_->getInferior(), remains_, rate_,
+    simcall_comm_send(sender_, mailbox_->getImpl(), remains_, rate_,
         srcBuff_, srcBuffSize_,
         matchFunction_, copyDataFunction_,
         userData_, timeout);
   } else { // Receiver
-    simcall_comm_recv(receiver_, mailbox_->getInferior(), dstBuff_, &dstBuffSize_,
+    simcall_comm_recv(receiver_, mailbox_->getImpl(), dstBuff_, &dstBuffSize_,
         matchFunction_, copyDataFunction_,
         userData_, timeout, rate_);
   }
index bba9fd2..fe40a3f 100644 (file)
@@ -63,5 +63,5 @@ void sg_mbox_setReceiver(sg_mbox_t mbox, smx_process_t process) {
   mbox->setReceiver(&process->actor());
 }
 smx_process_t sg_mbox_receiver(sg_mbox_t mbox) {
-  return mbox->receiver()->getInferior();
+  return mbox->receiver()->getImpl();
 }