Chapter 45. Functions for Managing Locks and Synchronization

This chapter contains reference information on locks and synchronization routines.

Table 45.1. Locks and Synchronization Routines

Function Description
slapi_destroy_condvar() Frees a Slapi_CondVar structure from memory.
slapi_destroy_mutex() Frees a Slapi_Mutex structure from memory.
slapi_lock_mutex() Locks the specified mutex.
slapi_new_condvar() Creates a new condition variable and returns a pointer to the corresponding Slapi_CondVar structure.
slapi_new_mutex() Creates a new mutex and returns a pointer to the corresponding Slapi_Mutex structure.
slapi_notify_condvar() Notifies a thread that is waiting on the specified condition variable.
slapi_unlock_mutex() Unlocks the specified mutex.
Chapter 45, Functions for Managing Locks and Synchronization Waits on a condition variable.

45.1. slapi_destroy_condvar()

This function frees a Slapi_CondVer structure from memory. Before calling this function, you should make sure that this condition variable is no longer in use. See Slapi_CondVar.
Syntax

#include "slapi-plugin.h"
void slapi_destroy_condvar( Slapi_CondVar *cvar );

Parameters

This function takes the following parameters:

cvar
Pointer to the Slapi_CondVar structure that you want to free from memory.