+/** @brief Create a new barrier
+ *
+ * See @ref s4u_raii.
+ */
+BarrierPtr Barrier::create(unsigned int expected_actors)
+{
+ return BarrierPtr(new Barrier(expected_actors));
+}
+
+/** @brief Block the current actor until all expected actors reach the barrier.
+ *
+ * This method is meant to be somewhat consistent with the pthread_barrier_wait function.
+ *
+ * @return 0 for all actors but one: exactly one actor will get SG_BARRIER_SERIAL_THREAD as a return value.