__xbt_running_ctx_fetch = SIMIX_process_get_running_context;
__xbt_ex_terminate = SIMIX_process_exception_terminate;
- SIMIX_network_init();
-
/* Prepare to display some more info when dying on Ctrl-C pressing */
signal(SIGINT, inthandler);
SIMIX_process_killall(simix_global->maestro_process, 1);
/* Exit the SIMIX network module */
- SIMIX_network_exit();
+ SIMIX_mailbox_exit();
xbt_heap_free(simix_timers);
simix_timers = NULL;
#include "mc/mc.h"
#include "src/mc/mc_replay.h"
#include "xbt/dict.h"
+#include "simgrid/s4u/mailbox.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix, "SIMIX network-related synchronization");
-static xbt_dict_t mailboxes = NULL;
+static void SIMIX_mbox_free(void *data);
+static xbt_dict_t mailboxes = xbt_dict_new_homogeneous(SIMIX_mbox_free);
static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall);
static void SIMIX_comm_copy_data(smx_synchro_t comm);
static smx_synchro_t SIMIX_fifo_get_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
int (*match_fun)(void *, void *,smx_synchro_t),
void *user_data, smx_synchro_t my_synchro);
-static void SIMIX_mbox_free(void *data);
static void SIMIX_comm_start(smx_synchro_t synchro);
-void SIMIX_network_init(void)
-{
- mailboxes = xbt_dict_new_homogeneous(SIMIX_mbox_free);
-}
-
-void SIMIX_network_exit(void)
+void SIMIX_mailbox_exit(void)
{
xbt_dict_free(&mailboxes);
}
xbt_fifo_t done_comm_fifo;//messages already received in the permanent receive mode
} s_smx_mailbox_t;
-XBT_PRIVATE void SIMIX_network_init(void);
-XBT_PRIVATE void SIMIX_network_exit(void);
+XBT_PRIVATE void SIMIX_mailbox_exit(void);
XBT_PRIVATE smx_mailbox_t SIMIX_mbox_create(const char *name);
XBT_PRIVATE void SIMIX_mbox_destroy(smx_mailbox_t mbox);