Chapter 31. Functions for Counters
Table 31.1. Counter Routines
| Function | Description |
|---|---|
| slapi_counter_add() | Adds a certain amount to the counter value. |
| slapi_counter_decrement() | Decrements the counter and returns the new value. |
| slapi_counter_destroy() | Destroys an existing counter. |
| slapi_counter_get_value() | Gets the current value of the counter. |
| slapi_counter_increment() | Increments the counter value and returns the new value. |
| slapi_counter_init() | Initializes a new counter. |
| slapi_counter_new() | Creates a new counter. |
| slapi_counter_set_value() | Sets the counter to a new, specified value and returns the updated value. |
| slapi_counter_subtract() | Subtracts a certain amount from the counter value. |
31.1. slapi_counter_add()
1; using slapi_counter_add() allows the counter to increment by some other specified unit.
#include "slapi-plugin.h" PRUint64 slapi_counter_add(Slapi_Counter *counter, PRUint64 addvalue);
This function takes the following parameters:
| counter | The counter to which to add the specified value. |
| addvalue | The amount to add to the current counter value. |
The function returns the value of the counter (the current count) after the counter has been incremented by the amount set in slapi_counter_add().

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.