initialize a blocking barrier
cc [options] -Kthread file
int barrier_init(barrier_t *barrier, int count, int type, void *arg);
barrier_init initializes the
pointed to by barrier
to be of type type and to synchronize count threads.
Once initialized, the barrier can be used any number of times
to synchronize execution of count threads.
Threads waiting at a
barrier will block, or ``sleep'',
until all count threads arrive at the barrier.
pointer to barrier to be initialized
number of threads to use the barrier for synchronization
USYNC_THREAD or USYNC_PROCESS
NULL (reserved for future use)
barrier points to the
barrier to be initialized.
count is the number of threads that will be synchronized by the barrier.
That is, barrier_wait will block any calling threads until
count threads have reached the barrier.
type can be set to one of the following values:
initialize the barrier for threads within the current process
initialize the barrier for threads across processes
arg should be set to NULL.
It is not currently used, but is reserved for future use.
barrier_init returns zero for success
and an error number for failure.
If one of the following conditions is detected,
barrier_init returns the corresponding value:
invalid argument specified
A barrier should not be re-initialized
while threads are waiting at the barrier.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004