Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add sg_comm_test
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 23 Feb 2020 16:03:40 +0000 (17:03 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 23 Feb 2020 19:12:44 +0000 (20:12 +0100)
include/simgrid/comm.h
src/s4u/s4u_Comm.cpp

index 3742c42..e630676 100644 (file)
@@ -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);
index 33c613e..c2dc1f1 100644 (file)
@@ -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<simgrid::s4u::CommPtr> s4u_comms;