A
lgorithmique
N
umérique
D
istribuée
Private GIT Repository
projects
/
loba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve timing between iterations.
[loba.git]
/
messages.cpp
diff --git
a/messages.cpp
b/messages.cpp
index 2fa48618e64cc28116b666ba8f451e7ef9fb5b9d..0abf913987782ce2399d3f9285c20235c45135d6 100644
(file)
--- a/
messages.cpp
+++ b/
messages.cpp
@@
-1,4
+1,9
@@
#include <sstream>
#include <sstream>
+#include <xbt/log.h>
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(comm);
+
+#include "misc.h"
#include "messages.h"
#include "messages.h"
@@
-27,6
+32,7
@@
bool message_queue::pop(message*& msg, m_host_t& from, double timeout)
mutex.acquire();
while (queue.empty() && (!deadline || deadline > MSG_get_clock())) {
xbt_ex_t e;
mutex.acquire();
while (queue.empty() && (!deadline || deadline > MSG_get_clock())) {
xbt_ex_t e;
+ XBT_DEBUG("waiting for a message to come");
TRY {
if (deadline)
cond.timedwait(mutex, deadline - MSG_get_clock());
TRY {
if (deadline)
cond.timedwait(mutex, deadline - MSG_get_clock());
@@
-51,5
+57,8
@@
bool message_queue::pop(message*& msg, m_host_t& from, double timeout)
from = MSG_task_get_source(task);
MSG_task_destroy(task);
from = MSG_task_get_source(task);
MSG_task_destroy(task);
+ XBT_DEBUG("received %s from %s",
+ msg->to_string().c_str(), MSG_host_get_name(from));
+
return true;
}
return true;
}