Sun Java System Directory Server Enterprise Edition 6.0 Developer's Guide

slapi_wait_condvar()

Wait for a change in a condition variable.

Syntax

#include "slapi-plugin.h"
int slapi_wait_condvar(Slapi_CondVar *cvar,struct timeval *timeout);

Parameters

This function takes the following parameter:

cvar

Condition variable on which to wait

timeout

NULL means block until notified. Otherwise, block until the time is up, then try again to acquire the lock.

Description

This function enables thread synchronization using a wait/notify mechanism.

Returns

This function returns 1 if successful. Otherwise, it returns NULL.

Memory Considerations

Call slapi_notify_condvar() to notify other threads of a change to the condition variable.

See Also

slapi_destroy_condvar()

slapi_new_condvar()

slapi_notify_condvar()