Adelsbach Enhanced Threading Library

Manual Pages (DD-00013-001)

Enhanced Threading Library > bar_init (3)
HTML TXT PDF PS
bar_init(3) Library Functions Manual bar_init(3)

bar_initinitialize thread barrier

library “threads”
#include <threadse.h>

int
bar_init(bar_t *barrier, int type, unsigned count);

The function () initializes a thread barrier of the given type as specified below and the amount of threads that need to call bar_wait(3) before the barrier will be released count.

The type argument can be either of

the barrier is not shared among child processes.
the barrier is shared among child processes.

Upon success bar_init() returns thrd_success, otherwise thrd_error will be returned.

bar_destroy(3) bar_wait(3)

The bar_init() function first appeared in the Adelsbach Enhanced Threading Library.

Jan Adelsbach <jan@jadelsbach.de>

May 9, 2020 Debian