From 93400d8225df04f5be18bb8f8fcca31293b92636 Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 16 Oct 2009 07:37:44 +0000 Subject: [PATCH] Introduce a MSG_TIMEOUT_FAILURE return code and use it for communication timeouts (closes #8563) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6797 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- ChangeLog | 2 ++ include/msg/datatypes.h | 1 + src/msg/msg_mailbox.c | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 533f11da98..24dd994e69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -107,6 +107,8 @@ SimGrid (3.3.4) unstable; urgency=low * Allow to compile from the SVN with automake 1.11 * Fix some problems when using the "start_time" tag in deployment XMLs. * Fix #8569: XBT/synchro.h has redundant declarations + * Fix #8563: MSG return values and exceptions + Introduce a MSG_TIMEOUT_FAILURE return code and use it consistently. -- Da SimGrid team diff --git a/include/msg/datatypes.h b/include/msg/datatypes.h index c9e85319a8..3187380740 100644 --- a/include/msg/datatypes.h +++ b/include/msg/datatypes.h @@ -121,6 +121,7 @@ SG_BEGIN_DECL() MSG_WARNING, /**< @brief Mmmh! Something must be not perfectly clean. But I may be a paranoid freak... ! */ + MSG_TIMEOUT_FAILURE, /**< @brief nothing good happened before the timer you provided elapsed */ MSG_TRANSFER_FAILURE, /**< @brief There has been a problem during you task transfer. Either the network is down or the remote host has been diff --git a/src/msg/msg_mailbox.c b/src/msg/msg_mailbox.c index f7f344550e..3425a413dc 100644 --- a/src/msg/msg_mailbox.c +++ b/src/msg/msg_mailbox.c @@ -126,7 +126,7 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t *task, m_host_t host, CRITICAL0 ("MSG_task_get() was asked to write in a non empty task struct."); - /* We no loger support getting a task from a specific host */ + /* We no longer support getting a task from a specific host */ if(host) THROW_UNIMPLEMENTED; @@ -144,7 +144,7 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t *task, m_host_t host, ret = MSG_TRANSFER_FAILURE; break; case timeout_error: - ret = MSG_TRANSFER_FAILURE; + ret = MSG_TIMEOUT_FAILURE; break; default: xbt_die("Unhandled SIMIX network exception"); @@ -198,7 +198,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task, ret = MSG_TRANSFER_FAILURE; break; case timeout_error: - ret = MSG_TRANSFER_FAILURE; + ret = MSG_TIMEOUT_FAILURE; break; default: xbt_die("Unhandled SIMIX network exception"); -- 2.20.1