Returns
This function returns one of the following values:
•
A non-zero value if the mutex was successfully unlocked.
•
0
Description
This function unlocks the mutex specified by the
slapi_wait_condvar()
Waits on a condition variable.
Syntax
#include "slapi-plugin.h"
int slapi_wait_condvar( Slapi_CondVar *cvar,
struct timeval *timeout );
Parameters
This function takes the following parameters:
cvar
timeout
Returns
This function returns one of the following values:
•
A non-zero value if successful.
•
0
mutex associated with the condition variable is not locked.
Description
This function waits on the condition variable until it receives notification; see the
slapi_notify_condvar()
must lock the mutex associated with this condition variable.
if the mutex was
NULL
Pointer to an Slapi_CondVar structure representing the
condition variable on which you want to wait.
Time period to wait for notification on the condition variable. If
NULL, the calling function blocks indefinitely.
if an error occurs; for example, if the condition variable is
Functions for Managing Locks and Synchronization
or was not locked by the calling thread.
function. Before calling this function, the calling thread
structure.
Slapi_Mutex
or if the
NULL
Chapter 15
Function Reference
547