initialize a condition variable
cc [options] -Kthread file
int cond_init(cond_t *cond, int type, void *arg);
cond_init initializes the condition variable
pointed to by cond to be of type type.
Once created, the condition cond can be used any number of
times without being re-initialized.
pointer to condition variable to be initialized
USYNC_THREAD or USYNC_PROCESS
NULL (reserved for future use)
cond points to the condition variable to be initialized.
type can be set to one of the following values:
initialize the condition variable for threads within the current process
initialize the condition variable for threads across processes
arg should be set to NULL.
It is not currently used, but is reserved for future use.
Static condition variable initialization
In this implementation, a condition variable can be initialized statically
if its storage is zero-filled.
In this case, the condition variable is of type USYNC_THREAD,
and cond_init need not be called.
cond_init returns zero for success
and an error number for failure.
If the following condition is detected,
cond_init returns the corresponding value:
invalid type or NULL cond argument specified
cond_init does not examine the cond argument
before initializing it.
If cond_init is called more than once for the same condition,
it will overwrite its state.
It is the user's responsibility to ensure that cond_init
is only called once for each condition variable.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005