* \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED
* or #MSG_HOST_FAILURE otherwise
*/
-MSG_error_t MSG_task_execute(msg_task_t task)
+msg_error_t MSG_task_execute(msg_task_t task)
{
return MSG_parallel_task_execute(task);
}
* \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED
* or #MSG_HOST_FAILURE otherwise
*/
-MSG_error_t MSG_parallel_task_execute(msg_task_t task)
+msg_error_t MSG_parallel_task_execute(msg_task_t task)
{
xbt_ex_t e;
simdata_task_t simdata = task->simdata;
msg_process_t self = SIMIX_process_self();
simdata_process_t p_simdata = SIMIX_process_self_get_data(self);
e_smx_state_t comp_state;
- MSG_error_t status = MSG_OK;
+ msg_error_t status = MSG_OK;
#ifdef HAVE_TRACING
TRACE_msg_task_execute_start(task);
*
* \param nb_sec a number of second
*/
-MSG_error_t MSG_process_sleep(double nb_sec)
+msg_error_t MSG_process_sleep(double nb_sec)
{
- MSG_error_t status = MSG_OK;
+ msg_error_t status = MSG_OK;
/*msg_process_t proc = MSG_process_self();*/
#ifdef HAVE_TRACING
* sometime waiting on all these mailboxes using @ref MSG_comm_waitany. You can find
* an example of use of this function in the @ref MSG_examples section.
* - Provide a proper patch to implement this functionality back in MSG. That wouldn't be
- * very difficult actually. Check the function @ref MSG_mailbox_get_task_ext. During its call to
+ * very difficult actually. Check the function #MSG_mailbox_get_task_ext. During its call to
* simcall_comm_recv(), the 5th argument, match_fun, is NULL. Create a function that filters
* messages according to the host (that you will pass as sixth argument to simcall_comm_recv()
* and that your filtering function will receive as first parameter, and then, the filter could
* #MSG_OK if the task was successfully received,
* #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
*/
-MSG_error_t
+msg_error_t
MSG_task_receive_from_host(msg_task_t * task, const char *alias,
msg_host_t host)
{
* #MSG_OK if the task was successfully received,
* #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
*/
-MSG_error_t MSG_task_receive(msg_task_t * task, const char *alias)
+msg_error_t MSG_task_receive(msg_task_t * task, const char *alias)
{
return MSG_task_receive_with_timeout(task, alias, -1);
}
* #MSG_OK if the task was successfully received,
* #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
*/
-MSG_error_t
+msg_error_t
MSG_task_receive_with_timeout(msg_task_t * task, const char *alias,
double timeout)
{
* #MSG_OK if the task was successfully received,
* #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
*/
-MSG_error_t
+msg_error_t
MSG_task_receive_ext(msg_task_t * task, const char *alias, double timeout,
msg_host_t host)
{
xbt_dynar_push(s_comms, &comm->s_comm);
}
- MSG_error_t status = MSG_OK;
+ msg_error_t status = MSG_OK;
TRY {
finished_index = simcall_comm_testany(s_comms);
}
* \param comm the communication to wait.
* \param timeout Wait until the communication terminates or the timeout
* occurs. You can provide a -1 timeout to obtain an infinite timeout.
- * \return MSG_error_t
+ * \return msg_error_t
*/
-MSG_error_t MSG_comm_wait(msg_comm_t comm, double timeout)
+msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout)
{
xbt_ex_t e;
TRY {
xbt_dynar_push(s_comms, &comm->s_comm);
}
- MSG_error_t status = MSG_OK;
+ msg_error_t status = MSG_OK;
TRY {
finished_index = simcall_comm_waitany(s_comms);
}
* \return the status of the communication, or #MSG_OK if no error occured
* during the communication
*/
-MSG_error_t MSG_comm_get_status(msg_comm_t comm) {
+msg_error_t MSG_comm_get_status(msg_comm_t comm) {
return comm->status;
}
}
/**
- * \brief This function is called by SIMIX to copy the data of a comm.
+ * \brief This function is called by SIMIX in kernel mode to copy the data of a comm.
* \param comm the comm
* \param buff the data copied
* \param buff_size size of the buffer
* \return Returns #MSG_OK if the task was successfully sent,
* #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
*/
-MSG_error_t MSG_task_send(msg_task_t task, const char *alias)
+msg_error_t MSG_task_send(msg_task_t task, const char *alias)
{
XBT_DEBUG("MSG_task_send: Trying to send a message on mailbox '%s'", alias);
return MSG_task_send_with_timeout(task, alias, -1);
* \return Returns #MSG_OK if the task was successfully sent,
* #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
*/
-MSG_error_t
+msg_error_t
MSG_task_send_bounded(msg_task_t task, const char *alias, double maxrate)
{
task->simdata->rate = maxrate;
* \return Returns #MSG_OK if the task was successfully sent,
* #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
*/
-MSG_error_t
+msg_error_t
MSG_task_send_with_timeout(msg_task_t task, const char *alias,
double timeout)
{
* previously declared with the function #TRACE_category
* (or with #TRACE_category_with_color).
*
- * See \ref tracing_tracing for details on how to trace
+ * See \ref tracing for details on how to trace
* the (categorized) resource utilization.
*
* \param task the task that is going to be categorized
* \brief Return the last value returned by a MSG function (except
* MSG_get_errno...).
*/
-MSG_error_t MSG_get_errno(void)
+msg_error_t MSG_get_errno(void)
{
return PROCESS_GET_ERRNO();
}
* #MSG_TRANSFER_FAILURE if the transfer could not be properly done
* (network failure, dest failure) or #MSG_OK if it succeeded.
*/
-MSG_error_t MSG_task_put(msg_task_t task, msg_host_t dest, m_channel_t channel)
+msg_error_t MSG_task_put(msg_task_t task, msg_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);
*
* \sa MSG_task_put
*/
-MSG_error_t
+msg_error_t
MSG_task_put_bounded(msg_task_t task, msg_host_t dest, m_channel_t channel,
double maxrate)
{
#MSG_TRANSFER_FAILURE if the transfer could not be properly done
(network failure, dest failure, timeout...) or #MSG_OK if the communication succeeded.
*/
-MSG_error_t
+msg_error_t
MSG_task_put_with_timeout(msg_task_t task, msg_host_t dest,
m_channel_t channel, double timeout)
{
listening. This value has to be >=0 and < than the maximal
number of channels fixed with MSG_set_channel_number().
* \param host the host that is to be watched.
- * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
+ * \return a #msg_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
*/
-MSG_error_t
+msg_error_t
MSG_task_get_from_host(msg_task_t * task, m_channel_t channel, msg_host_t host)
{
XBT_WARN("DEPRECATED! Now use MSG_task_receive_from_host");
* \param channel the channel on which the process should be
listening. This value has to be >=0 and < than the maximal
number of channels fixed with MSG_set_channel_number().
- * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
+ * \return a #msg_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
*/
-MSG_error_t MSG_task_get(msg_task_t * task, m_channel_t channel)
+msg_error_t MSG_task_get(msg_task_t * task, m_channel_t channel)
{
XBT_WARN("DEPRECATED! Now use MSG_task_receive");
return MSG_task_get_with_timeout(task, channel, -1);
up. In such a case, #MSG_TRANSFER_FAILURE will be returned, \a task
will not be modified and will still be
equal to \c NULL when returning.
- * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
+ * \return a #msg_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
*/
-MSG_error_t
+msg_error_t
MSG_task_get_with_timeout(msg_task_t * task, m_channel_t channel,
double max_duration)
{
return MSG_task_get_ext(task, channel, max_duration, NULL);
}
-MSG_error_t
+msg_error_t
MSG_task_get_ext(msg_task_t * task, m_channel_t channel, double timeout,
msg_host_t host)
{