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
populate s4u::mailbox
[simgrid.git]
/
src
/
s4u
/
s4u_mailbox.cpp
diff --git
a/src/s4u/s4u_mailbox.cpp
b/src/s4u/s4u_mailbox.cpp
index
3b8c0ba
..
6e497d8
100644
(file)
--- a/
src/s4u/s4u_mailbox.cpp
+++ b/
src/s4u/s4u_mailbox.cpp
@@
-36,3
+36,14
@@
s4u::Mailbox *s4u::Mailbox::byName(const char*name) {
}
return res;
}
}
return res;
}
+
+bool s4u::Mailbox::empty() {
+ return nullptr == simcall_mbox_get_head(inferior_);
+}
+
+sg_mbox_t sg_mbox_by_name(const char*name){
+ return s4u::Mailbox::byName(name);
+}
+int sg_mbox_is_empty(sg_mbox_t mbox) {
+ return mbox->empty();
+}