From ab5892145873c4600038ad2561a9800f994e4c35 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Sun, 23 Feb 2020 17:03:40 +0100 Subject: [PATCH] add sg_comm_test --- include/simgrid/comm.h | 1 + src/s4u/s4u_Comm.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/simgrid/comm.h b/include/simgrid/comm.h index 3742c42984..e63067614f 100644 --- a/include/simgrid/comm.h +++ b/include/simgrid/comm.h @@ -12,6 +12,7 @@ /* C interface */ SG_BEGIN_DECL +XBT_PUBLIC int sg_comm_test(sg_comm_t comm); XBT_PUBLIC void sg_comm_wait_all(sg_comm_t* comms, size_t count); XBT_PUBLIC int sg_comm_wait_any_for(sg_comm_t* comms, size_t count, double timeout); XBT_PUBLIC int sg_comm_wait_any(sg_comm_t* comms, size_t count); diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 33c613e69a..c2dc1f13e9 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -255,6 +255,11 @@ Actor* Comm::get_sender() const } // namespace s4u } // namespace simgrid /* **************************** Public C interface *************************** */ +int sg_comm_test(sg_comm_t comm) +{ + return comm->test(); +} + void sg_comm_wait_all(sg_comm_t* comms, size_t count) { std::vector s4u_comms; -- 2.20.1