A thread safe FIFO.
More...
#include <NilFIFO.h>
template<typename Type, size_t Size>
class NilFIFO< Type, Size >
A thread safe FIFO.
A FIFO for a single producer/consumer pair.
template<typename Type , size_t Size>
template<typename Type , size_t Size>
| size_t NilFIFO< Type, Size >::dataCount |
( |
| ) |
|
|
inline |
- Returns
- count of data records in the FIFO.
template<typename Type , size_t Size>
| size_t NilFIFO< Type, Size >::freeCount |
( |
| ) |
|
|
inline |
- Returns
- count of free records in the FIFO.
template<typename Type , size_t Size>
| void NilFIFO< Type, Size >::signalData |
( |
| ) |
|
|
inline |
Signal that a data record is ready.
- Note
- Must only be called in producer thread.
template<typename Type , size_t Size>
| void NilFIFO< Type, Size >::signalFree |
( |
| ) |
|
|
inline |
Signal that a record is free.
- Note
- Must only be called in consumer thread.
template<typename Type , size_t Size>
Wait for a data record.
- Parameters
-
| [in] | time | the number of ticks before the operation timeouts, the following special values are allowed:
- TIME_IMMEDIATE immediate timeout.
- TIME_INFINITE no timeout.
|
- Note
- Must only be called in consumer thread.
- Returns
- pointer to the data record or null if no data record is availabile.
template<typename Type , size_t Size>
Wait for a free record.
- Parameters
-
| [in] | time | the number of ticks before the operation timeouts, the following special values are allowed:
- TIME_IMMEDIATE immediate timeout.
- TIME_INFINITE no timeout.
|
- Note
- Must only be called in producer thread.
- Returns
- pointer to the free record or null if no free record is availabile.
The documentation for this class was generated from the following file: