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
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git]
/
src
/
msg
/
msg_gos.cpp
diff --git
a/src/msg/msg_gos.cpp
b/src/msg/msg_gos.cpp
index
426f25a
..
5329078
100644
(file)
--- a/
src/msg/msg_gos.cpp
+++ b/
src/msg/msg_gos.cpp
@@
-1,9
+1,9
@@
-/* Copyright (c) 2004-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2004-2016. 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. */
+#include "src/simix/smx_private.h" /* MSG_task_listen looks inside the rdv directly. Not clean. */
#include "msg_private.h"
#include "mc/mc.h"
#include "xbt/log.h"
#include "msg_private.h"
#include "mc/mc.h"
#include "xbt/log.h"
@@
-44,8
+44,7
@@
msg_error_t MSG_parallel_task_execute(msg_task_t task)
{
xbt_ex_t e;
simdata_task_t simdata = task->simdata;
{
xbt_ex_t e;
simdata_task_t simdata = task->simdata;
- msg_process_t self = SIMIX_process_self();
- simdata_process_t p_simdata = (simdata_process_t) SIMIX_process_self_get_data(self);
+ simdata_process_t p_simdata = (simdata_process_t) SIMIX_process_self_get_data();
e_smx_state_t comp_state;
msg_error_t status = MSG_OK;
e_smx_state_t comp_state;
msg_error_t status = MSG_OK;
@@
-285,7
+284,7
@@
msg_error_t MSG_task_receive_ext_bounded(msg_task_t * task, const char *alias, d
}
/* Internal function used to factorize code between MSG_task_isend_with_matching() and MSG_task_dsend(). */
}
/* Internal function used to factorize code between MSG_task_isend_with_matching() and MSG_task_dsend(). */
-static
XBT_INLINE
msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
+static
inline
msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
int (*match_fun)(void*,void*, smx_synchro_t),
void *match_data, void_f_pvoid_t cleanup, int detached)
{
int (*match_fun)(void*,void*, smx_synchro_t),
void *match_data, void_f_pvoid_t cleanup, int detached)
{
@@
-297,7
+296,7
@@
static XBT_INLINE msg_comm_t MSG_task_isend_internal(msg_task_t task, const char
/* Prepare the task to send */
t_simdata = task->simdata;
t_simdata->sender = process;
/* Prepare the task to send */
t_simdata = task->simdata;
t_simdata->sender = process;
- t_simdata->source = ((simdata_process_t) SIMIX_process_self_get_data(
process
))->m_host;
+ t_simdata->source = ((simdata_process_t) SIMIX_process_self_get_data())->m_host;
if (t_simdata->isused != 0) {
if (msg_global->debug_multiple_use){
if (t_simdata->isused != 0) {
if (msg_global->debug_multiple_use){
@@
-462,7
+461,7
@@
msg_comm_t MSG_task_irecv(msg_task_t *task, const char *name)
*/
msg_comm_t MSG_task_irecv_bounded(msg_task_t *task, const char *name, double rate)
{
*/
msg_comm_t MSG_task_irecv_bounded(msg_task_t *task, const char *name, double rate)
{
- smx_
rdv
_t rdv = MSG_mailbox_get_by_alias(name);
+ smx_
mailbox
_t rdv = MSG_mailbox_get_by_alias(name);
/* FIXME: these functions are not traceable */
/* Sanity check */
/* FIXME: these functions are not traceable */
/* Sanity check */
@@
-826,7
+825,8
@@
msg_error_t MSG_task_send_with_timeout_bounded(msg_task_t task, const char *alia
*/
int MSG_task_listen(const char *alias)
{
*/
int MSG_task_listen(const char *alias)
{
- return !MSG_mailbox_is_empty(MSG_mailbox_get_by_alias(alias));
+ smx_mailbox_t rdv = MSG_mailbox_get_by_alias(alias);
+ return !MSG_mailbox_is_empty(rdv) || (rdv->permanent_receiver && xbt_fifo_size(rdv->done_comm_fifo)!=0);
}
/** \ingroup msg_task_usage
}
/** \ingroup msg_task_usage