31.8. slapi_counter_set_value()

Atomically sets the current value of the counter structure.
By default, counters start at zero (0). This function can be called to set a counter to a specific value.
Syntax

#include "slapi-plugin.h"
PRUint64 slapi_counter_set_value(Slapi_Counter *counter, PRUint64 newvalue);

Parameters

This function takes the following parameters:

counter The counter for which to set the value.
newvalue The new value for the counter.
Returns

The function returns the value of the counter (the current count) after the counter has been set to the value specified in slapi_counter_set_value().