X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ca82f90e6d610b6bb3b038cd9ee48d378cc8a909..beab0c35a476db131ba31536ffd5ea9720fe7bae:/src/msg/msg_comm.cpp diff --git a/src/msg/msg_comm.cpp b/src/msg/msg_comm.cpp index 463619d61b..8490f780f0 100644 --- a/src/msg/msg_comm.cpp +++ b/src/msg/msg_comm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -82,7 +82,7 @@ int MSG_comm_test(msg_comm_t comm) * @return the position of the finished communication if any * (but it may have failed, use MSG_comm_get_status() to know its status), or -1 if none is finished */ -int MSG_comm_testany(xbt_dynar_t comms) +int MSG_comm_testany(const_xbt_dynar_t comms) { int finished_index = -1; @@ -124,7 +124,7 @@ int MSG_comm_testany(xbt_dynar_t comms) } /** @brief Destroys the provided communication. */ -void MSG_comm_destroy(msg_comm_t comm) +void MSG_comm_destroy(const_msg_comm_t comm) { delete comm; } @@ -159,7 +159,7 @@ void MSG_comm_waitall(msg_comm_t* comm, int nb_elem, double timeout) * @return the position of the first finished communication * (but it may have failed, use MSG_comm_get_status() to know its status) */ -int MSG_comm_waitany(xbt_dynar_t comms) +int MSG_comm_waitany(const_xbt_dynar_t comms) { int finished_index = -1; @@ -205,9 +205,8 @@ int MSG_comm_waitany(xbt_dynar_t comms) * @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(); } @@ -216,7 +215,7 @@ msg_error_t MSG_comm_get_status(msg_comm_t comm) * @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");