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

slapi_new_condvar()

Allocate a condition variable.

Syntax

#include "slapi-plugin.h"
Slapi_CondVar *slapi_new_condvar( Slapi_Mutex *mutex );

Parameters

This function takes the following parameter:

mutex

Mutex used for the lock

Description

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

Returns

This function returns a pointer to the new condition variable if successful. Otherwise, it returns NULL.

Memory Considerations

Call this function to create the condition variable and slapi_destroy_condvar() to free the condition variable.

See Also

slapi_destroy_condvar()

slapi_notify_condvar()

slapi_wait_condvar()