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

slapi_new_mutex()

Allocate a mutex.

Syntax

#include "slapi-plugin.h"
Slapi_Mutex *slapi_new_mutex( void );

Returns

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

Description

This function enables thread synchronization. Once a thread has locked the mutex using slapi_lock_mutex(), other threads attempting to acquire the lock are blocked until the thread holding the mutex calls slapi_UTF-8STRTOLOWER().

Memory Considerations

Call slapi_destroy_mutex() to free the mutex.

See Also

slapi_destroy_mutex()

slapi_lock_mutex()