SimGrid  3.9
Versatile Simulation of Distributed Systems
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
MSG Deprecated

This section describes the deprecated functions. PLEASE STOP USING THEM. More...

Functions

msg_error_t MSG_get_errno (void)
 Return the last value returned by a MSG function (except MSG_get_errno...).
msg_error_t MSG_task_put (msg_task_t task, msg_host_t dest, m_channel_t channel)
 Put a task on a channel of an host and waits for the end of the transmission.
msg_error_t MSG_task_put_bounded (msg_task_t task, msg_host_t dest, m_channel_t channel, double maxrate)
 Does exactly the same as MSG_task_put but with a bounded transmition rate.
msg_error_t MSG_task_put_with_timeout (msg_task_t task, msg_host_t dest, m_channel_t channel, double timeout)
 Put a task on a channel of an host (with a timeout on the waiting of the destination host) and waits for the end of the transmission.
int MSG_task_probe_from (m_channel_t channel)
 Test whether there is a pending communication on a channel, and who sent it.
int MSG_task_Iprobe (m_channel_t channel)
 Test whether there is a pending communication on a channel.
int MSG_task_probe_from_host (int channel, msg_host_t host)
 Return the number of tasks waiting to be received on a channel and sent by host.
msg_error_t MSG_task_get_from_host (msg_task_t *task, m_channel_t channel, msg_host_t host)
 Listen on channel and waits for receiving a task from host.
msg_error_t MSG_task_get (msg_task_t *task, m_channel_t channel)
 Listen on a channel and wait for receiving a task.
msg_error_t MSG_task_get_with_timeout (msg_task_t *task, m_channel_t channel, double max_duration)
 Listen on a channel and wait for receiving a task with a timeout.

Detailed Description

This section describes the deprecated functions. PLEASE STOP USING THEM.

We don't remove them because the ability to run old scientific code is something important to us. But these functionalities are not actively supported anymore.

To access these functions, you should define the relevant option at configuration time in ccmake.

Function Documentation

msg_error_t MSG_task_put ( msg_task_t  task,
msg_host_t  dest,
m_channel_t  channel 
)

Put a task on a channel of an host and waits for the end of the transmission.

This function is used for describing the behavior of a process. It takes three parameter.

Parameters
taska msg_task_t to send on another location. This task will not be usable anymore when the function will return. There is no automatic task duplication and you have to save your parameters before calling this function. Tasks are unique and once it has been sent to another location, you should not access it anymore. You do not need to call MSG_task_destroy() but to avoid using, as an effect of inattention, this task anymore, you definitely should renitialize it with MSG_TASK_UNINITIALIZED. Note that this task can be transfered iff it has been correctly created with MSG_task_create().
destthe destination of the message
channelthe channel on which the process should put this task. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
Returns
MSG_HOST_FAILURE if the host on which this function was called was shut down, 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_bounded ( msg_task_t  task,
msg_host_t  dest,
m_channel_t  channel,
double  maxrate 
)

Does exactly the same as MSG_task_put but with a bounded transmition rate.

See Also
MSG_task_put
msg_error_t MSG_task_put_with_timeout ( msg_task_t  task,
msg_host_t  dest,
m_channel_t  channel,
double  timeout 
)

Put a task on a channel of an host (with a timeout on the waiting of the destination host) and waits for the end of the transmission.

This function is used for describing the behavior of a process. It takes four parameter.

Parameters
taska msg_task_t to send on another location. This task will not be usable anymore when the function will return. There is no automatic task duplication and you have to save your parameters before calling this function. Tasks are unique and once it has been sent to another location, you should not access it anymore. You do not need to call MSG_task_destroy() but to avoid using, as an effect of inattention, this task anymore, you definitely should renitialize it with MSG_TASK_UNINITIALIZED. Note that this task can be transfered iff it has been correctly created with MSG_task_create().
destthe destination of the message
channelthe channel on which the process should put this task. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
timeoutthe maximum time to wait for a task before giving up. In such a case, MSG_TRANSFER_FAILURE will be returned, task will not be modified
Returns
MSG_HOST_FAILURE if the host on which this function was called was shut down, MSG_TRANSFER_FAILURE if the transfer could not be properly done (network failure, dest failure, timeout...) or MSG_OK if the communication succeeded.
int MSG_task_probe_from ( m_channel_t  channel)

Test whether there is a pending communication on a channel, and who sent it.

It takes one parameter.

Parameters
channelthe 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().
Returns
-1 if there is no pending communication and the PID of the process who sent it otherwise
int MSG_task_Iprobe ( m_channel_t  channel)

Test whether there is a pending communication on a channel.

It takes one parameter.

Parameters
channelthe 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().
Returns
1 if there is a pending communication and 0 otherwise
int MSG_task_probe_from_host ( int  channel,
msg_host_t  host 
)

Return the number of tasks waiting to be received on a channel and sent by host.

It takes two parameters.

Parameters
channelthe 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().
hostthe host that is to be watched.
Returns
the number of tasks waiting to be received on channel and sent by host.
msg_error_t MSG_task_get_from_host ( msg_task_t task,
m_channel_t  channel,
msg_host_t  host 
)

Listen on channel and waits for receiving a task from host.

It takes three parameters.

Parameters
taska memory location for storing a msg_task_t. It will hold a task when this function will return. Thus task should not be equal to NULL and *task should be equal to NULL. If one of those two condition does not hold, there will be a warning message.
channelthe 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().
hostthe host that is to be watched.
Returns
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 
)

Listen on a channel and wait for receiving a task.

It takes two parameters.

Parameters
taska memory location for storing a msg_task_t. It will hold a task when this function will return. Thus task should not be equal to NULL and *task should be equal to NULL. If one of those two condition does not hold, there will be a warning message.
channelthe 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().
Returns
a msg_error_t indicating whether the operation was successful (MSG_OK), or why it failed otherwise.
msg_error_t MSG_task_get_with_timeout ( msg_task_t task,
m_channel_t  channel,
double  max_duration 
)

Listen on a channel and wait for receiving a task with a timeout.

It takes three parameters.

Parameters
taska memory location for storing a msg_task_t. It will hold a task when this function will return. Thus task should not be equal to NULL and *task should be equal to NULL. If one of those two condition does not hold, there will be a warning message.
channelthe 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().
max_durationthe maximum time to wait for a task before giving up. In such a case, MSG_TRANSFER_FAILURE will be returned, task will not be modified and will still be equal to NULL when returning.
Returns
a msg_error_t indicating whether the operation was successful (MSG_OK), or why it failed otherwise.