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
Simplify the handling of SIMIX requests.
[simgrid.git]
/
src
/
msg
/
msg_mailbox.c
diff --git
a/src/msg/msg_mailbox.c
b/src/msg/msg_mailbox.c
index
62b007b
..
979b957
100644
(file)
--- a/
src/msg/msg_mailbox.c
+++ b/
src/msg/msg_mailbox.c
@@
-58,8
+58,8
@@
msg_mailbox_t MSG_mailbox_get_by_alias(const char *alias)
msg_mailbox_t MSG_mailbox_get_by_channel(m_host_t host,
m_channel_t channel)
{
msg_mailbox_t MSG_mailbox_get_by_channel(m_host_t host,
m_channel_t channel)
{
- xbt_assert
0
((host != NULL), "Invalid host");
- xbt_assert
1
((channel >= 0)
+ xbt_assert((host != NULL), "Invalid host");
+ xbt_assert((channel >= 0)
&& (channel < msg_global->max_channel), "Invalid channel %d",
channel);
&& (channel < msg_global->max_channel), "Invalid channel %d",
channel);
@@
-83,7
+83,7
@@
MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
#endif
/* Sanity check */
#endif
/* Sanity check */
- xbt_assert
0
(task, "Null pointer for the task storage");
+ xbt_assert(task, "Null pointer for the task storage");
if (*task)
XBT_CRITICAL
if (*task)
XBT_CRITICAL
@@
-130,6
+130,7
@@
MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
MSG_error_t ret = MSG_OK;
simdata_task_t t_simdata = NULL;
m_process_t process = MSG_process_self();
MSG_error_t ret = MSG_OK;
simdata_task_t t_simdata = NULL;
m_process_t process = MSG_process_self();
+ simdata_process_t p_simdata = SIMIX_process_self_get_data();
#ifdef HAVE_TRACING
volatile smx_action_t comm = NULL;
int call_end = 0;
#ifdef HAVE_TRACING
volatile smx_action_t comm = NULL;
int call_end = 0;
@@
-145,13
+146,14
@@
MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
t_simdata->sender = process;
t_simdata->source = MSG_host_self();
t_simdata->sender = process;
t_simdata->source = MSG_host_self();
- xbt_assert
0
(t_simdata->isused == 0,
+ xbt_assert(t_simdata->isused == 0,
"This task is still being used somewhere else. You cannot send it now. Go fix your code!");
t_simdata->isused=1;
msg_global->sent_msg++;
"This task is still being used somewhere else. You cannot send it now. Go fix your code!");
t_simdata->isused=1;
msg_global->sent_msg++;
- process->simdata->waiting_task = task;
+
+ p_simdata->waiting_task = task;
/* Try to send it by calling SIMIX network layer */
TRY {
/* Try to send it by calling SIMIX network layer */
TRY {
@@
-187,7
+189,7
@@
MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
t_simdata->isused = 0;
}
t_simdata->isused = 0;
}
- p
rocess->
simdata->waiting_task = NULL;
+ p
_
simdata->waiting_task = NULL;
#ifdef HAVE_TRACING
if (call_end)
TRACE_msg_task_put_end();
#ifdef HAVE_TRACING
if (call_end)
TRACE_msg_task_put_end();