along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <errno.h>
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
#include "macro.h"
-#include "util.h"
/* See source file for an API description. */
int barrier_create(Barrier *obj);
void barrier_destroy(Barrier *b);
+DEFINE_TRIVIAL_CLEANUP_FUNC(Barrier*, barrier_destroy);
+
void barrier_set_role(Barrier *b, unsigned int role);
bool barrier_place(Barrier *b);
}
static inline bool barrier_place_and_sync(Barrier *b) {
- barrier_place(b);
+ (void) barrier_place(b);
return barrier_sync(b);
}