From f6c9a2b6c90817616b0c13bae51d150b6fb46fcd Mon Sep 17 00:00:00 2001 From: navarro Date: Tue, 17 Jan 2012 17:03:18 +0100 Subject: [PATCH] Put XBT_WARN when try to use channel and not alias system. Give the right function with alias. --- src/msg/msg_global.c | 2 ++ src/msg/msg_gos.c | 10 ++++++++++ src/msg/msg_mailbox.c | 1 + 3 files changed, 13 insertions(+) diff --git a/src/msg/msg_global.c b/src/msg/msg_global.c index b7d7b6e88e..2a91cb0dc6 100644 --- a/src/msg/msg_global.c +++ b/src/msg/msg_global.c @@ -112,6 +112,7 @@ void MSG_global_init(int *argc, char **argv) */ MSG_error_t MSG_set_channel_number(int number) { + XBT_WARN("DEPRECATED! Now use alias"); xbt_assert((msg_global) && (msg_global->max_channel == 0), "Channel number already set!"); @@ -130,6 +131,7 @@ MSG_error_t MSG_set_channel_number(int number) */ int MSG_get_channel_number(void) { + XBT_WARN("DEPRECATED! Now use alias"); xbt_assert((msg_global) && (msg_global->max_channel != 0), "Channel number not set yet!"); diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index 573f782cbb..90b8c699d8 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -264,6 +264,7 @@ MSG_error_t MSG_process_sleep(double nb_sec) MSG_error_t MSG_task_get_from_host(m_task_t * task, m_channel_t channel, m_host_t host) { + XBT_WARN("DEPRECATED! Now use MSG_task_receive_from_host"); return MSG_task_get_ext(task, channel, -1, host); } @@ -282,6 +283,7 @@ MSG_task_get_from_host(m_task_t * task, m_channel_t channel, m_host_t host) */ MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel) { + XBT_WARN("DEPRECATED! Now use MSG_task_receive"); return MSG_task_get_with_timeout(task, channel, -1); } @@ -306,6 +308,7 @@ MSG_error_t MSG_task_get_with_timeout(m_task_t * task, m_channel_t channel, double max_duration) { + XBT_WARN("DEPRECATED! Now use MSG_task_receive_with_timeout"); return MSG_task_get_ext(task, channel, max_duration, NULL); } @@ -318,6 +321,7 @@ MSG_error_t MSG_task_get_ext(m_task_t * task, m_channel_t channel, double timeout, m_host_t host) { + XBT_WARN("DEPRECATED! Now use MSG_task_receive_ext"); xbt_assert((channel >= 0) && (channel < msg_global->max_channel), "Invalid channel %d", channel); @@ -802,6 +806,7 @@ void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_si */ MSG_error_t MSG_task_put(m_task_t task, m_host_t dest, m_channel_t channel) { + XBT_WARN("DEPRECATED! Now use MSG_task_send"); return MSG_task_put_with_timeout(task, dest, channel, -1.0); } @@ -815,6 +820,7 @@ MSG_error_t MSG_task_put_bounded(m_task_t task, m_host_t dest, m_channel_t channel, double maxrate) { + XBT_WARN("DEPRECATED! Now use MSG_task_send_bounded"); task->simdata->rate = maxrate; return MSG_task_put(task, dest, channel); } @@ -851,6 +857,7 @@ MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest, m_channel_t channel, double timeout) { + XBT_WARN("DEPRECATED! Now use MSG_task_send_with_timeout"); xbt_assert((channel >= 0) && (channel < msg_global->max_channel), "Invalid channel %d", channel); @@ -902,6 +909,7 @@ int MSG_task_listen(const char *alias) */ int MSG_task_Iprobe(m_channel_t channel) { + XBT_WARN("DEPRECATED!"); xbt_assert((channel >= 0) && (channel < msg_global->max_channel), "Invalid channel %d", channel); @@ -928,6 +936,7 @@ int MSG_task_Iprobe(m_channel_t channel) */ int MSG_task_probe_from_host(int channel, m_host_t host) { + XBT_WARN("DEPRECATED! Now use MSG_task_listen_from_host"); xbt_assert((channel >= 0) && (channel < msg_global->max_channel), "Invalid channel %d", channel); @@ -961,6 +970,7 @@ int MSG_task_listen_from_host(const char *alias, m_host_t host) */ int MSG_task_probe_from(m_channel_t channel) { + XBT_WARN("DEPRECATED! Now use MSG_task_listen_from"); m_task_t task; CHECK_HOST(); diff --git a/src/msg/msg_mailbox.c b/src/msg/msg_mailbox.c index 2daf5ef263..8d575a6f2b 100644 --- a/src/msg/msg_mailbox.c +++ b/src/msg/msg_mailbox.c @@ -58,6 +58,7 @@ 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) { + XBT_WARN("DEPRECATED! Now use MSG_mailbox_get_by_alias"); xbt_assert((host != NULL), "Invalid host"); xbt_assert((channel >= 0) && (channel < msg_global->max_channel), "Invalid channel %d", -- 2.20.1