A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[s4u] Mailbox::receiver return a s4u::ActorPtr
[simgrid.git]
/
src
/
s4u
/
s4u_mailbox.cpp
diff --git
a/src/s4u/s4u_mailbox.cpp
b/src/s4u/s4u_mailbox.cpp
index
d7f4869
..
ed93710
100644
(file)
--- a/
src/s4u/s4u_mailbox.cpp
+++ b/
src/s4u/s4u_mailbox.cpp
@@
-43,8
+43,9
@@
void Mailbox::setReceiver(Actor* actor) {
}
/** @brief get the receiver (process associated to the mailbox) */
}
/** @brief get the receiver (process associated to the mailbox) */
-Actor& Mailbox::receiver() {
- return pimpl_->permanent_receiver->actor();
+ActorPtr Mailbox::receiver() {
+ if(pimpl_->permanent_receiver == nullptr) return ActorPtr();
+ return ActorPtr(&pimpl_->permanent_receiver->actor());
}
}
}
}
@@
-62,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) {
mbox->setReceiver(&process->actor());
}
smx_process_t sg_mbox_receiver(sg_mbox_t mbox) {
- return mbox->receiver()
.
getInferior();
+ return mbox->receiver()
->
getInferior();
}
}