int
pthread_barrier_init(
pthread_barrier_t * restrict barrier
, const pthread_barrierattr_t * restrict attr
, unsigned int count
)
)
function creates a new barrier, with attributes specified with
attr
and
count
.
The
count
parameter indicates the number of threads which will participate in the barrier.
If
attr
is NULL the default attributes are used.
Barriers are most commonly used in the decomposition of parallel loops.
)
will return zero and put the new barrier id into
barrier
,
otherwise an error number will be returned to indicate the error.
)
shall fail if:
EAGAIN
]
EINVAL
]
count
is zero.
ENOMEM
]
pthread_barrier_init()
may fail if:
EBUSY
]
EINVAL
]
attr
is invalid.
)
conforms to
IEEE Std 1003.1-2001 (``POSIX.1'') .