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
Make mailbox matching functions return a bool.
[simgrid.git]
/
src
/
s4u
/
s4u_Mailbox.cpp
diff --git
a/src/s4u/s4u_Mailbox.cpp
b/src/s4u/s4u_Mailbox.cpp
index
d9d6c6c
..
0ab6de7
100644
(file)
--- a/
src/s4u/s4u_Mailbox.cpp
+++ b/
src/s4u/s4u_Mailbox.cpp
@@
-48,10
+48,10
@@
bool Mailbox::ready()
{
bool comm_ready = false;
if (not pimpl_->comm_queue_.empty()) {
- comm_ready = pimpl_->comm_queue_.front()->state_ ==
SIMIX_
DONE;
-
+ comm_ready = pimpl_->comm_queue_.front()->state_ ==
kernel::activity::State::
DONE;
+
} else if (pimpl_->permanent_receiver_ && not pimpl_->done_comm_queue_.empty()) {
- comm_ready = pimpl_->done_comm_queue_.front()->state_ ==
SIMIX_
DONE;
+ comm_ready = pimpl_->done_comm_queue_.front()->state_ ==
kernel::activity::State::
DONE;
}
return comm_ready;
}
@@
-77,7
+77,7
@@
ActorPtr Mailbox::get_receiver()
CommPtr Mailbox::put_init()
{
CommPtr res = CommPtr(new s4u::Comm());
- res->sender_ =
SIMIX_process_
self();
+ res->sender_ =
kernel::actor::ActorImpl::
self();
res->mailbox_ = this;
return res;
}
@@
-121,7
+121,7
@@
void Mailbox::put(void* payload, uint64_t simulated_size_in_bytes, double timeou
s4u::CommPtr Mailbox::get_init()
{
CommPtr res = CommPtr(new s4u::Comm());
- res->receiver_ =
SIMIX_process_
self();
+ res->receiver_ =
kernel::actor::ActorImpl::
self();
res->mailbox_ = this;
return res;
}
@@
-150,7
+150,7
@@
void* Mailbox::get(double timeout)
return res;
}
-smx_activity_t Mailbox::iprobe(int type,
int
(*match_fun)(void*, void*, kernel::activity::CommImpl*), void* data)
+smx_activity_t Mailbox::iprobe(int type,
bool
(*match_fun)(void*, void*, kernel::activity::CommImpl*), void* data)
{
return kernel::actor::simcall([this, type, match_fun, data] { return pimpl_->iprobe(type, match_fun, data); });
}