#include "src/instr/instr_private.hpp"
#include "src/msg/msg_private.hpp"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_comm, msg, "Logging specific to MSG (comm)");
-
namespace simgrid {
namespace msg {
/* I am the receiver */
(*task_received)->set_not_used();
}
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
status_ = MSG_TIMEOUT;
finished = true;
} catch (const simgrid::CancelException&) {
}
/* FIXME: these functions are not traceable */
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
status_ = MSG_TIMEOUT;
} catch (const simgrid::CancelException&) {
status_ = MSG_TASK_CANCELED;
msg_error_t status = MSG_OK;
try {
finished_index = simcall_comm_testany(s_comms.data(), s_comms.size());
- } catch (const simgrid::TimeoutError& e) {
+ } catch (const simgrid::TimeoutException& e) {
finished_index = e.value;
status = MSG_TIMEOUT;
} catch (const simgrid::CancelException& e) {
}
/** @brief Destroys the provided communication. */
-void MSG_comm_destroy(msg_comm_t comm)
+void MSG_comm_destroy(const_msg_comm_t comm)
{
delete comm;
}
return comm->wait_for(timeout);
}
-/** @brief This function is called by a sender and permit to wait for each communication
+/** @brief This function is called by a sender and permits waiting for each communication
*
* @param comm a vector of communication
* @param nb_elem is the size of the comm vector
msg_error_t status = MSG_OK;
try {
finished_index = simcall_comm_waitany(s_comms.data(), s_comms.size(), -1);
- } catch (const simgrid::TimeoutError& e) {
+ } catch (const simgrid::TimeoutException& e) {
finished_index = e.value;
status = MSG_TIMEOUT;
} catch (const simgrid::CancelException& e) {
* @param comm a finished communication
* @return the status of the communication, or #MSG_OK if no error occurred during the communication
*/
-msg_error_t MSG_comm_get_status(msg_comm_t comm)
+msg_error_t MSG_comm_get_status(const_msg_comm_t comm)
{
-
return comm->get_status();
}
* @param comm the communication where to get the task
* @return the task from the communication
*/
-msg_task_t MSG_comm_get_task(msg_comm_t comm)
+msg_task_t MSG_comm_get_task(const_msg_comm_t comm)
{
xbt_assert(comm, "Invalid parameter");
return comm->task_received ? *comm->task_received : comm->task_sent;
}
-
-/**
- * @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
- */
-// deprecated but used by MSG_set_copy_callback. Should be removed in v325
-void MSG_comm_copy_data_from_SIMIX(simgrid::kernel::activity::CommImpl* comm, void* buff, size_t buff_size)
-{
- SIMIX_comm_copy_pointer_callback(comm, buff, buff_size);
-
- // notify the user callback if any
- if (msg_global->task_copy_callback) {
- msg_task_t task = static_cast<msg_task_t>(buff);
- msg_global->task_copy_callback(task, comm->src_actor_->ciface(), comm->dst_actor_->ciface());
- }
-}