23 #ifndef AAX_CATOMICQUEUE_H
24 #define AAX_CATOMICQUEUE_H
54 template <
typename T,
size_t S>
85 template <
typename T,
size_t S>
95 template <
typename T,
size_t S>
98 std::memset((
void*)mRingBuffer, 0x0,
sizeof(mRingBuffer));
101 template <
typename T,
size_t S>
196 const uint32_t widx = idx % S;
201 if (
false == cxResult)
205 const uint32_t ridx = (0 == idx) ? S : idx-1;
234 bool exchResult =
false;
250 template <
typename T,
size_t S>
254 mReadIdx = (mReadIdx+1) % template_size;
271 template <
typename T,
size_t S>
280 const uint32_t testIdx = (mReadIdx+1) % template_size;
Atomic operation utilities.
TPointer *AAX_CALLBACK AAX_Atomic_Exchange_Pointer(TPointer *&ioValue, TPointer *inExchangeValue)
Perform an exchange operation on a pointer value.
Definition: AAX_Atomic.h:53
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:77
TPointer *AAX_CALLBACK AAX_Atomic_Load_Pointer(TPointer const *const volatile *inValue)
Atomically loads a pointer value.
Abstract interface for a basic FIFO queue of pointers-to-objects.
Definition: AAX_CAtomicQueue.h:56
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:62
virtual ~AAX_CAtomicQueue()
Definition: AAX_CAtomicQueue.h:58
AAX_IPointerQueue< T >::template_type template_type
The type used for this template instance.
Definition: AAX_CAtomicQueue.h:64
AAX_IPointerQueue< T >::value_type value_type
The type of values stored in this queue.
Definition: AAX_CAtomicQueue.h:65
Mutex with try lock functionality.
Definition: AAX_CMutex.h:30
Helper class for working with mutex.
Definition: AAX_CMutex.h:50
EStatus
Definition: AAX_IContainer.h:38
@ eStatus_Unsupported
Operation is unsupported.
Definition: AAX_IContainer.h:43
@ eStatus_Unavailable
An internal resource was not available.
Definition: AAX_IContainer.h:42
@ eStatus_Overflow
Internal buffer overflow.
Definition: AAX_IContainer.h:40
@ eStatus_Success
Operation succeeded.
Definition: AAX_IContainer.h:39
Definition: AAX_IPointerQueue.h:35
T * value_type
The type of values stored in this queue.
Definition: AAX_IPointerQueue.h:41
T template_type
The type used for this template instance.
Definition: AAX_IPointerQueue.h:40