The atomic integer class. More...

#include "murl_system_mutex.h"

Inheritance diagram for Murl::System::AtomicSInt32:

Public Member Functions

 AtomicSInt32 (SInt32 value)
 The constructor. More...
 
SInt32 operator++ ()
 Increment prefix operator. More...
 
SInt32 operator++ (int)
 Increment suffix operator. More...
 
SInt32 operator-- ()
 Decrement prefix operator. More...
 
SInt32 operator-- (int)
 Decrement suffix operator. More...
 
SInt32 ExchangeAndAdd (SInt32 valueToAdd)
 Exchange and add a value. More...
 
 operator SInt32 ()
 Conversion operator. More...
 

Protected Attributes

SInt32 mValue
 The value store. More...
 

Detailed Description

The atomic integer class.

The atomic integer is a thread-safe integer. On modern platforms the operations are supported by intrinsic CPU commands without using a mutex.

Constructor & Destructor Documentation

◆ AtomicSInt32()

Murl::System::AtomicSInt32::AtomicSInt32 ( SInt32  value)
inline

The constructor.

Parameters
valueThe initial value.

Member Function Documentation

◆ operator++() [1/2]

SInt32 Murl::System::AtomicSInt32::operator++ ( )

Increment prefix operator.

Returns
The incremented value.

◆ operator++() [2/2]

SInt32 Murl::System::AtomicSInt32::operator++ ( int  )

Increment suffix operator.

Returns
The value before incrementation.

◆ operator--() [1/2]

SInt32 Murl::System::AtomicSInt32::operator-- ( )

Decrement prefix operator.

Returns
The decremented value.

◆ operator--() [2/2]

SInt32 Murl::System::AtomicSInt32::operator-- ( int  )

Decrement suffix operator.

Returns
The value before decrementation.

◆ ExchangeAndAdd()

SInt32 Murl::System::AtomicSInt32::ExchangeAndAdd ( SInt32  valueToAdd)

Exchange and add a value.

Parameters
valueToAddThe value to add.
Returns
The value before addition.

◆ operator SInt32()

Murl::System::AtomicSInt32::operator SInt32 ( )
inline

Conversion operator.

Returns
The value.

Member Data Documentation

◆ mValue

SInt32 Murl::System::AtomicSInt32::mValue
protected

The value store.


The documentation for this class was generated from the following file:
  • murl_system_mutex.h


Copyright © 2011-2018 Spraylight GmbH.