XBT_PUBLIC(int) MSG_task_probe_from(m_channel_t channel);
XBT_PUBLIC(int) MSG_task_probe_from_host(int channel, m_host_t host);
XBT_PUBLIC(MSG_error_t) MSG_process_sleep(double nb_sec);
-XBT_PUBLIC(MSG_error_t) MSG_get_errno(void);
XBT_PUBLIC(double) MSG_task_get_compute_duration(m_task_t task);
XBT_PUBLIC(void) MSG_task_set_compute_duration(m_task_t task,
MSG_mailbox_put_with_timeout(mailbox, task, timeout)
#define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h);
+XBT_PUBLIC(MSG_error_t) MSG_get_errno(void);
#endif
#include "instr/instr.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg,
"Logging specific to MSG (gos)");
-/** \ingroup msg_gos_functions
- *
- * \brief Return the last value returned by a MSG function (except
- * MSG_get_errno...).
- */
-MSG_error_t MSG_get_errno(void)
-{
- return PROCESS_GET_ERRNO();
-}
-
/** \ingroup msg_gos_functions
* \brief Executes a task and waits for its termination.
*
return MSG_process_get_PID(task->simdata->sender);
}
+
+#ifdef MSG_USE_DEPRECATED
+/** \ingroup msg_gos_functions
+ *
+ * \brief Return the last value returned by a MSG function (except
+ * MSG_get_errno...).
+ */
+MSG_error_t MSG_get_errno(void)
+{
+ return PROCESS_GET_ERRNO();
+}
+#endif
/*************************************************************/
-#define PROCESS_SET_ERRNO(val) \
+#ifdef MSG_USE_DEPRECATED
+# define PROCESS_SET_ERRNO(val) \
(((simdata_process_t) SIMIX_process_self_get_data(SIMIX_process_self()))->last_errno=val)
-#define PROCESS_GET_ERRNO() \
+# define PROCESS_GET_ERRNO() \
(((simdata_process_t) SIMIX_process_self_get_data(SIMIX_process_self()))->last_errno)
#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(SIMIX_req_host_get_state(SIMIX_host_self())==1,\
"Host failed, you cannot call this function. (state=%d)",SIMIX_req_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);