HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
14.18 Slapi_Connection
Represents a connection.
Syntax
#include "slapi-plugin.h"
typedef struct conn Slapi_Connection;
Description Slapi_Connection is the data type for an opaque structure that represents a
connection.
14.19 Slapi_CondVar
Represents a condition variable in a directory entry.
Syntax
#include "slapi-plugin.h"
typedef struct slapi_condvar Slapi_CondVar;
Description Slapi_CondVar is the data type for an opaque structure that represents a
synchronization lock in the server plug-in. The following table summarizes the front end API
functions that you can call to modify synchronization locks in the server plug-in.
Call this function:To:
“slapi_destroy_condvar()”Destroy a condition variable.
“slapi_new_condvar()”Create a new condition variable.
“slapi_notify_condvar()”Send notification about a condition variable.
“slapi_wait_condvar()”Wait for a condition variable.
14.20 Slapi_Counter
Provides 64-bit integers with support for atomic operations, even on 32-bit systems.
Slapi_Counter allows plug-ins to use global integers that can be updated by multiple worker
threads in a thread-safe manner.
The Slapi_Counter structure is a wrapper around the actual counter value.
A mutex is used on platforms that do not provide 64-bit atomic operations.
Syntax
#include "slapi-plugin.h"
typedef struct Slapi_Counter {
PRUint64 value;
#ifndef ATOMIC_64BIT_OPERATIONS
Slapi_Mutex *mutex;
#endif
} Slapi_Counter;
Associated Functions Slapi_Counter defines settings for counters. The different functions
available to Slapi_Counter structures are listed in Table 14-13 “Functions for Slapi_Counter.
Table 14-13 Functions for Slapi_Counter
Call this function:To:
slapi_counter_new()Create a new counter.
slapi_counter_init()Initialize a new counter.
slapi_counter_increment()Increment the counter value and return the new value.
slapi_counter_decrement()Decrement the counter and return the new value.
14.18 Slapi_Connection 129