Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
document Barrier in the new way, and document the C version
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 4 Jan 2020 17:27:03 +0000 (18:27 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 4 Jan 2020 18:18:57 +0000 (19:18 +0100)
docs/source/app_s4u.rst
include/simgrid/forward.h

index 5828cfb..fac7ad0 100644 (file)
@@ -934,21 +934,40 @@ Synchronization Objects
 .. _API_s4u_Barrier:
 
 ================
-⁣  class Barrier
+⁣  Barrier
 ================
 
-.. doxygentypedef:: BarrierPtr
-
 .. autodoxyclass:: simgrid::s4u::Barrier
 
    .. tabs::
 
       .. group-tab:: C++
 
+         .. code-block:: C++
+
+            #include <simgrid/s4u/Barrier.hpp>
+
+         .. doxygentypedef:: BarrierPtr
+
          .. autodoxymethod:: simgrid::s4u::Barrier::Barrier(unsigned int expected_actors)
          .. autodoxymethod:: simgrid::s4u::Barrier::create(unsigned int expected_actors)
          .. autodoxymethod:: simgrid::s4u::Barrier::wait()
 
+      .. group-tab:: C
+
+         .. code-block:: C
+
+            #include <simgrid/barrier.hpp>
+
+         .. doxygentypedef:: sg_bar_t
+         .. cpp:type:: const s4u_Barrier* const_sg_bar_t
+
+            Constant pointer to a SimGrid barrier object.
+
+         .. autodoxymethod:: sg_barrier_init(unsigned int count)
+         .. autodoxymethod:: sg_barrier_destroy(const_sg_bar_t bar)
+         .. autodoxymethod:: sg_barrier_wait(sg_bar_t bar)
+
 
 .. _API_s4u_ConditionVariable:
 
@@ -965,7 +984,7 @@ Basic management
 
       .. group-tab:: C++
 
-         .. code-block:: C
+         .. code-block:: C++
 
             #include <simgrid/s4u/ConditionVariable.hpp>
 
index 517c473..5d97079 100644 (file)
@@ -233,7 +233,9 @@ typedef struct s_smx_sem* smx_sem_t;
 
 #endif
 
+/** Pointer to a SimGrid barrier object */
 typedef s4u_Barrier* sg_bar_t;
+/** Constant pointer to a SimGrid barrier object */
 typedef const s4u_Barrier* const_sg_bar_t;
 typedef s4u_ConditionVariable* sg_cond_t;
 typedef const s4u_ConditionVariable* const_sg_cond_t;