HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameter:
The counter to decrement.
counter
Returns The function returns the value of the counter (the current count) after the counter has
been decremented.
See also
slapi_counter_subtract()
slapi_counter_increment()
31.3 slapi_counter_destroy()
Frees a Slapi_Counter structure from memory. Use this with a dynamically allocated
Slapi_Counter structure that was obtained by calling slapi_counter_new().
Before calling this function, make sure that the specified counter is no longer in use.
Do not call slapi_counter_destroy() to destroy a counter which was not dynamically
allocated.
Syntax
#include "slapi-plugin.h"
void slapi_counter_destroy(Slapi_Counter **counter);
Parameters This function takes the following parameter:
The address of the counter being destroyed.
counter
See also
slapi_counter_new()
31.4 slapi_counter_get_value()
Atomically gets the current value of the counter.
Syntax
#include "slapi-plugin.h"
PRUint64 slapi_counter_get_value(Slapi_Counter *counter);
Parameters This function takes the following parameter:
The name of the counter for which the value is checked.
counter
Returns The function returns the value of the counter (the current count).
31.5 slapi_counter_increment()
Atomically increments the counter value up by one (1) and returns the new value.
Syntax
#include "slapi-plugin.h"
PRUint64 slapi_counter_increment(Slapi_Counter *counter);
Parameters This function takes the following parameter:
The counter to increment.
counter
Returns The function returns the value of the counter (the current count) after the counter has
been incremented.
256 Functions for counters