Adelsbach Enhanced Threading Library

Manual Pages (DD-00013-001)

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

bar_waitwait at thread barrier

library “threads”
#include <threadse.h>

int
bar_wait(bar_t *barrier);

The function () will stall stop the current thread and wait until the correct amount of threads are waiting at the given thread barrier, as specified at the initialization of the barrier in bar_init(3).

Upon success bar_wait() will return thrd_success for exactly one thread and thrd_busy for all others. In case of an error thrd_error will be returned.

bar_init(3) bar_destroy(3)

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

Jan Adelsbach <jan@jadelsbach.de>

May 9, 2020 Debian