XBT_PUBLIC(smx_rdv_t) simcall_rdv_get_by_name(const char *name);
XBT_PUBLIC(int) simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host);
XBT_PUBLIC(smx_action_t) simcall_rdv_get_head(smx_rdv_t rdv);
+XBT_PUBLIC(smx_process_t) SIMIX_rdv_get_receiver(smx_rdv_t rdv);
+XBT_PUBLIC(void) SIMIX_rdv_set_receiver(smx_rdv_t rdv , smx_process_t process);
XBT_PUBLIC(xbt_dict_t) SIMIX_get_rdv_points(void);
void MSG_mailbox_set_async(const char *alias){
msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias);
- mailbox->permanent_receiver=SIMIX_process_self();
+ SIMIX_rdv_set_receiver(mailbox, SIMIX_process_self());
XBT_VERB("%s mailbox set to receive eagerly for process %p\n",alias, SIMIX_process_self());
}
#include "xbt/dict.h"
#include "xbt/config.h"
#include "instr/instr_private.h"
-#include "simix/smx_private.h"
SG_BEGIN_DECL()
/**************** datatypes **********************************/
return xbt_fifo_get_item_content(xbt_fifo_get_first_item(rdv->comm_fifo));
}
+/**
+ * \brief get the receiver (process associated to the mailbox)
+ * \param rdv The rendez-vous point
+ * \return process The receiving process (NULL if not set)
+ */
+smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv)
+{
+ return rdv->permanent_receiver;
+}
+
+/**
+ * \brief set the receiver of the rendez vous point to allow eager sends
+ * \param rdv The rendez-vous point
+ * \param process The receiving process
+ */
+void SIMIX_rdv_set_receiver(smx_rdv_t rdv , smx_process_t process)
+{
+ rdv->permanent_receiver=process;
+}
+
/**
* \brief Pushes a communication action into a rendez-vous point
* \param rdv The rendez-vous point
(*argc)--;
data->argc = argc;
data->argv = argv;
- data->mailbox_small->permanent_receiver=proc;// set the process attached to the mailbox
+ SIMIX_rdv_set_receiver(data->mailbox_small, proc);// set the process attached to the mailbox
XBT_DEBUG("<%d> New process in the game: %p", index, proc);
}
}