From 0916eaf25fc722ae0c9418f10dab481fe9af8b3d Mon Sep 17 00:00:00 2001 From: schnorr Date: Fri, 23 Mar 2012 15:11:45 +0100 Subject: [PATCH] get rid of CHECK_HOST --- src/msg/msg_gos.c | 20 -------------------- src/msg/msg_mailbox.c | 2 -- src/msg/msg_private.h | 3 --- src/msg/msg_process.c | 2 -- 4 files changed, 27 deletions(-) diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index 2ad4301a7e..cec273dd3b 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -27,7 +27,6 @@ MSG_error_t MSG_task_execute(m_task_t task) simdata_task_t simdata = NULL; simdata_process_t p_simdata; e_smx_state_t comp_state; - CHECK_HOST(); simdata = task->simdata; @@ -166,7 +165,6 @@ MSG_error_t MSG_parallel_task_execute(m_task_t task) simdata_task_t simdata = NULL; e_smx_state_t comp_state; simdata_process_t p_simdata; - CHECK_HOST(); simdata = task->simdata; p_simdata = SIMIX_process_self_get_data(SIMIX_process_self()); @@ -382,8 +380,6 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *al m_process_t process = MSG_process_self(); msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias); - CHECK_HOST(); - /* FIXME: these functions are not traceable */ /* Prepare the task to send */ @@ -434,8 +430,6 @@ void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup) m_process_t process = MSG_process_self(); msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias); - CHECK_HOST(); - /* FIXME: these functions are not traceable */ /* Prepare the task to send */ @@ -470,8 +464,6 @@ msg_comm_t MSG_task_irecv(m_task_t *task, const char *name) { smx_rdv_t rdv = MSG_mailbox_get_by_alias(name); - CHECK_HOST(); - /* FIXME: these functions are not traceable */ /* Sanity check */ @@ -842,8 +834,6 @@ MSG_task_send_with_timeout(m_task_t task, const char *alias, */ int MSG_task_listen(const char *alias) { - CHECK_HOST(); - return !MSG_mailbox_is_empty(MSG_mailbox_get_by_alias(alias)); } @@ -859,8 +849,6 @@ int MSG_task_listen(const char *alias) */ int MSG_task_listen_from_host(const char *alias, m_host_t host) { - CHECK_HOST(); - return MSG_mailbox_get_count_host_waiting_tasks(MSG_mailbox_get_by_alias (alias), host); @@ -879,8 +867,6 @@ int MSG_task_listen_from(const char *alias) { m_task_t task; - CHECK_HOST(); - if (NULL == (task = MSG_mailbox_get_head(MSG_mailbox_get_by_alias(alias)))) return -1; @@ -1002,8 +988,6 @@ int MSG_task_probe_from(m_channel_t channel) XBT_WARN("DEPRECATED! Now use MSG_task_listen_from"); m_task_t task; - CHECK_HOST(); - xbt_assert((channel >= 0) && (channel < msg_global->max_channel), "Invalid channel %d", channel); @@ -1033,8 +1017,6 @@ int MSG_task_Iprobe(m_channel_t channel) && (channel < msg_global->max_channel), "Invalid channel %d", channel); - CHECK_HOST(); - return !MSG_mailbox_is_empty(MSG_mailbox_get_by_channel (MSG_host_self(), channel)); @@ -1060,8 +1042,6 @@ int MSG_task_probe_from_host(int channel, m_host_t host) && (channel < msg_global->max_channel), "Invalid channel %d", channel); - CHECK_HOST(); - return MSG_mailbox_get_count_host_waiting_tasks(MSG_mailbox_get_by_channel (MSG_host_self(), channel), diff --git a/src/msg/msg_mailbox.c b/src/msg/msg_mailbox.c index 199b7c423f..7279654fc4 100644 --- a/src/msg/msg_mailbox.c +++ b/src/msg/msg_mailbox.c @@ -65,7 +65,6 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task, if (host) THROW_UNIMPLEMENTED; - CHECK_HOST(); #ifdef HAVE_TRACING TRACE_msg_task_get_start(); volatile double start_time = MSG_get_clock(); @@ -120,7 +119,6 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task, simdata_task_t t_simdata = NULL; m_process_t process = MSG_process_self(); simdata_process_t p_simdata = SIMIX_process_self_get_data(process); - CHECK_HOST(); #ifdef HAVE_TRACING int call_end = TRACE_msg_task_put_start(task); //must be after CHECK_HOST() diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index 3934c2c213..317a5d8aae 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -117,12 +117,9 @@ XBT_PUBLIC_DATA(MSG_Global_t) msg_global; #define MSG_RETURN(val) do {PROCESS_SET_ERRNO(val);return(val);} while(0) /* #define CHECK_ERRNO() ASSERT((PROCESS_GET_ERRNO()!=MSG_HOST_FAILURE),"Host failed, you cannot call this function.") */ -/*#define CHECK_HOST() xbt_assert(simcall_host_get_state(SIMIX_host_self())==1,\ - "Host failed, you cannot call this function. (state=%d)",simcall_host_get_state(SIMIX_host_self()))*/ #else # define MSG_RETURN(val) return(val) #endif -#define CHECK_HOST() m_host_t __MSG_host_create(smx_host_t workstation, void *data); void __MSG_host_destroy(m_host_t host); diff --git a/src/msg/msg_process.c b/src/msg/msg_process.c index d8fa002494..0b12e42fcd 100644 --- a/src/msg/msg_process.c +++ b/src/msg/msg_process.c @@ -427,7 +427,6 @@ m_process_t MSG_process_self(void) MSG_error_t MSG_process_suspend(m_process_t process) { xbt_assert(process != NULL, "Invalid parameter"); - CHECK_HOST(); #ifdef HAVE_TRACING TRACE_msg_process_suspend(process); @@ -446,7 +445,6 @@ MSG_error_t MSG_process_suspend(m_process_t process) MSG_error_t MSG_process_resume(m_process_t process) { xbt_assert(process != NULL, "Invalid parameter"); - CHECK_HOST(); #ifdef HAVE_TRACING TRACE_msg_process_resume(process); -- 2.20.1