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
sanitize the OOP of kernel::profile
[simgrid.git]
/
src
/
s4u
/
s4u_Mailbox.cpp
diff --git
a/src/s4u/s4u_Mailbox.cpp
b/src/s4u/s4u_Mailbox.cpp
index
b2b60de
..
5262cde
100644
(file)
--- a/
src/s4u/s4u_Mailbox.cpp
+++ b/
src/s4u/s4u_Mailbox.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2006-201
8
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-201
9
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-48,8
+48,8
@@
bool Mailbox::ready()
bool comm_ready = false;
if (not pimpl_->comm_queue_.empty()) {
comm_ready = pimpl_->comm_queue_.front()->state_ == SIMIX_DONE;
bool comm_ready = false;
if (not pimpl_->comm_queue_.empty()) {
comm_ready = pimpl_->comm_queue_.front()->state_ == SIMIX_DONE;
- }
-
if (!comm_ready &&
pimpl_->permanent_receiver_ && not pimpl_->done_comm_queue_.empty()) {
+
+
} else if (
pimpl_->permanent_receiver_ && not pimpl_->done_comm_queue_.empty()) {
comm_ready = pimpl_->done_comm_queue_.front()->state_ == SIMIX_DONE;
}
return comm_ready;
comm_ready = pimpl_->done_comm_queue_.front()->state_ == SIMIX_DONE;
}
return comm_ready;
@@
-114,7
+114,7
@@
void Mailbox::put(void* payload, uint64_t simulated_size_in_bytes, double timeou
c->set_remaining(simulated_size_in_bytes);
c->set_src_data(payload);
// c->start() is optional.
c->set_remaining(simulated_size_in_bytes);
c->set_src_data(payload);
// c->start() is optional.
- c->wait(timeout);
+ c->wait
_for
(timeout);
}
s4u::CommPtr Mailbox::get_init()
}
s4u::CommPtr Mailbox::get_init()
@@
-145,7
+145,7
@@
void* Mailbox::get(double timeout)
void* res = nullptr;
CommPtr c = get_init();
c->set_dst_data(&res, sizeof(res));
void* res = nullptr;
CommPtr c = get_init();
c->set_dst_data(&res, sizeof(res));
- c->wait(timeout);
+ c->wait
_for
(timeout);
return res;
}
} // namespace s4u
return res;
}
} // namespace s4u