Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
gts::AtomicCommon< T > Struct Template Reference

A wrapper class for a stl-like atomic. Uses the STL by default. Define GTS_USE_CUSTOM_ATOMICS to add your own backend, or replace everything completely as long as this interface exists. More...

#include <Atomic.h>

Inherited by gts::AtomicPointer< T * >, gts::AtomicArithmetic< T >, and gts::AtomicPointer< T >.

Public Member Functions

 AtomicCommon (const AtomicCommon &)=delete
 
AtomicCommonoperator= (const AtomicCommon &)=delete
 
AtomicCommonoperator= (const AtomicCommon &) volatile=delete
 
constexpr AtomicCommon (T val)
 
void store (T value, gts::memory_order order)
 
load (gts::memory_order order) const
 
exchange (T value, gts::memory_order order)
 
bool compare_exchange_weak (T &expected, T value, gts::memory_order xchgOrder, gts::memory_order loadOrder)
 
bool compare_exchange_strong (T &expected, T value, gts::memory_order xchgOrder, gts::memory_order loadOrder)
 

Protected Attributes

GTS_ATOMIC_TYPE< T > m_atom
 

Detailed Description

template<typename T>
struct gts::AtomicCommon< T >

A wrapper class for a stl-like atomic. Uses the STL by default. Define GTS_USE_CUSTOM_ATOMICS to add your own backend, or replace everything completely as long as this interface exists.