Logo Search packages:      
Sourcecode: pwlib version File versions

PAtomicInteger Class Reference

#include <critsec.h>

List of all members.

Detailed Description

This class implements an integer that can be atomically incremented and decremented in a thread-safe manner. On Windows, the integer is of type long and this class is implemented using InterlockedIncrement and InterlockedDecrement integer is of type long. On Unix systems with GNU std++ support for EXCHANGE_AND_ADD, the integer is of type _Atomic_word (normally int) On all other systems, this class is implemented using PCriticalSection and the integer is of type int.

Definition at line 163 of file critsec.h.

Public Member Functions

BOOL IsZero () const
 operator int () const
int operator++ ()
int operator-- ()
 PAtomicInteger (int v=0)
void SetValue (int v)

Protected Attributes

PCriticalSection critSec
int value

Private Member Functions

PAtomicIntegeroperator= (const PAtomicInteger &ref)

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

Generated by  Doxygen 1.6.0   Back to index