Public Member Functions | List of all members
ibis::util::counter Class Reference

A simple shared counter. More...

#include <util.h>

Public Member Functions

uint32_t operator() ()
 Return the current count and increment the count.
 
void reset ()
 Reset count to zero.
 
uint32_t value () const
 Return the current count value.
 

Detailed Description

A simple shared counter.

Each time the operator() is called, it is incremented by 1. Calls from different threads are serialized through a mutual exclusion lock or an atomic operation. Currently, it only knows about atomic operations provided by GCC and visual studio on WIN32. The GCC automic functions are determined in the configure script.


The documentation for this class was generated from the following file:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive