HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameters:
Pointer to an Slapi_CondVar structure representing the condition variable.
cvar
If 1, notifies all threads that are waiting on the condition variable.notify_all
Returns This function returns one of the following values:
A nonzero value if the thread (or threads) are successfully notified.
0 if an error occurs; for example, if the condition variable is NULL or if the mutex associated
with the condition variable is not locked.
45.7 slapi_unlock_mutex()
Description This function unlocks the mutex specified by the Slapi_Mutex structure.
Syntax
#include "slapi-plugin.h"
int slapi_unlock_mutex( Slapi_Mutex *mutex );
Parameters This function takes the following parameters:
Pointer to an Slapi_Mutex structure representing the mutex that you want to unlock.mutex
Returns This function returns one of the following values:
A nonzero value if the mutex was successfully unlocked.
0 if the mutex was NULL or was not locked by the calling thread.
45.8 slapi_wait_condvar()
Description This function waits on the condition variable until it receives notification; see the
“slapi_notify_condvar()” function. Before calling this function, the calling thread must lock the
mutex associated with this condition variable.
Syntax
#include "slapi-plugin.h"
int slapi_wait_condvar( Slapi_CondVar *cvar, struct timeval *timeout );
Parameters This function takes the following parameters:
Pointer to a Slapi_CondVar structure representing the condition variable on which you
want to wait.
cvar
Time period to wait for notification on the condition variable. If NULL, the calling
function blocks indefinitely.
timeout
Returns This function returns one of the following values:
A nonzero value if successful.
0 if an error occurs; for example, if the condition variable is NULL or if the mutex associated
with the condition variable is not locked.
45.7 slapi_unlock_mutex() 361