#[unsafe(no_mangle)]pub unsafe extern "C" fn pthread_barrier_init(
barrier: *mut pthread_barrier_t,
attr: *const pthread_barrierattr_t,
count: c_uint,
) -> c_intExpand description
See https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_barrier_init.html.
Allocates any resources required to use the barrier referenced by barrier
and shall initialize the barrier with attributes referenced by attr.
Upon success, returns 0. Upon error, returns an error number.
§Implementation
Not async-signal-safe.
§Safety
The following will result in undefined behaviour:
- Use of
barrierbefore this function is called. - This function is called with an already initialized
barrier. - This function is called when any thread is blocked on
barrier.