33#ifndef AAX_CATOMICQUEUE_H
34#define AAX_CATOMICQUEUE_H
64template <
typename T,
size_t S>
95template <
typename T,
size_t S>
105template <
typename T,
size_t S>
108 std::memset((
void*)mRingBuffer, 0x0,
sizeof(mRingBuffer));
111template <
typename T,
size_t S>
206 const uint32_t widx = idx % S;
211 if (
false == cxResult)
215 const uint32_t ridx = (0 == idx) ? S : idx-1;
261template <
typename T,
size_t S>
265 mReadIdx = (mReadIdx+1) % template_size;
282template <
typename T,
size_t S>
291 const uint32_t testIdx = (mReadIdx+1) % template_size;
Abstract interface for a basic FIFO queue of pointers-to-objects.
Atomic operation utilities.
uint32_t AAX_CALLBACK AAX_Atomic_IncThenGet_32(uint32_t &ioData)
Increments a 32-bit value and returns the result.
bool AAX_CALLBACK AAX_Atomic_CompareAndExchange_32(volatile uint32_t &ioValue, uint32_t inCompareValue, uint32_t inExchangeValue)
Perform a compare and exchange operation on a 32-bit value.
bool AAX_CALLBACK AAX_Atomic_CompareAndExchange_Pointer(TPointer *&ioValue, TPointer *inCompareValue, TPointer *inExchangeValue)
Perform a compare and exchange operation on a pointer value.
Definition: AAX_Atomic.h:87
TPointer *AAX_CALLBACK AAX_Atomic_Load_Pointer(TPointer const *const volatile *inValue)
Atomically loads a pointer value.
TPointer *AAX_CALLBACK AAX_Atomic_Exchange_Pointer(TPointer *&ioValue, TPointer *inExchangeValue)
Perform an exchange operation on a pointer value.
Definition: AAX_Atomic.h:63
Definition: AAX_CAtomicQueue.h:66
virtual value_type Peek() const
virtual AAX_IContainer::EStatus Push(value_type inElem)
static const size_t template_size
The size used for this template instance.
Definition: AAX_CAtomicQueue.h:72
virtual ~AAX_CAtomicQueue()
Definition: AAX_CAtomicQueue.h:68
AAX_IPointerQueue< T >::template_type template_type
The type used for this template instance.
Definition: AAX_CAtomicQueue.h:74
AAX_IPointerQueue< T >::value_type value_type
The type of values stored in this queue.
Definition: AAX_CAtomicQueue.h:75
Mutex with try lock functionality.
Definition: AAX_CMutex.h:40
Helper class for working with mutex.
Definition: AAX_CMutex.h:60
EStatus
Definition: AAX_IContainer.h:48
@ eStatus_Unsupported
Operation is unsupported.
Definition: AAX_IContainer.h:53
@ eStatus_Unavailable
An internal resource was not available.
Definition: AAX_IContainer.h:52
@ eStatus_Overflow
Internal buffer overflow.
Definition: AAX_IContainer.h:50
@ eStatus_Success
Operation succeeded.
Definition: AAX_IContainer.h:49
Definition: AAX_IPointerQueue.h:45
T * value_type
The type of values stored in this queue.
Definition: AAX_IPointerQueue.h:51
T template_type
The type used for this template instance.
Definition: AAX_IPointerQueue.h:50