molecular
Public Member Functions | List of all members
molecular::util::GccAtomicCounter Class Reference

Counter with atomic increment/decrement methods. More...

#include <AtomicCounter.h>

Public Member Functions

void Increment ()
 Increments Counter by one. More...
 
void Decrement ()
 Decrements Counter by one. More...
 
bool DecrementCheckZero ()
 Decrements counter and checks for zero. More...
 
bool CheckZero ()
 

Detailed Description

Counter with atomic increment/decrement methods.

This implementation uses GCC compiler intrinsics (also supported on clang).

Member Function Documentation

bool molecular::util::GccAtomicCounter::CheckZero ( )
inline
void molecular::util::GccAtomicCounter::Decrement ( )
inline

Decrements Counter by one.

bool molecular::util::GccAtomicCounter::DecrementCheckZero ( )
inline

Decrements counter and checks for zero.

Returns
true if counter reaches zero.
void molecular::util::GccAtomicCounter::Increment ( )
inline

Increments Counter by one.


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