RTXI  2.4
The Real-Time eXperiment Interface Documentation
Public Member Functions
AtomicFifo Class Reference

Lockfree SINGLE producer / SINGLE consumer FIFO. More...

#include <atomic_fifo.h>

Collaboration diagram for AtomicFifo:
Collaboration graph

Public Member Functions

 AtomicFifo (size_t)
 
 ~AtomicFifo (void)
 
bool write (const void *buffer, size_t itemSize)
 
bool read (void *buffer, size_t itemSize)
 
bool isLockFree () const
 

Detailed Description

Lockfree SINGLE producer / SINGLE consumer FIFO.

Definition at line 33 of file atomic_fifo.h.

Constructor & Destructor Documentation

◆ AtomicFifo()

AtomicFifo::AtomicFifo(size_t s)

Definition at line 24 of file atomic_fifo.cpp.

◆ ~AtomicFifo()

AtomicFifo::~AtomicFifo(void )

Definition at line 30 of file atomic_fifo.cpp.

Member Function Documentation

◆ isLockFree()

bool AtomicFifo::isLockFree()const

Function to check if FIFO is truly atomic for the hardware architecture

Returns
LockFree true if free of locks false otherwise

Definition at line 94 of file atomic_fifo.cpp.

◆ read()

bool AtomicFifo::read(void * buffer,
size_t itemSize 
)

Function for reading data from atomic FIFO

Parameters
bufferMemory source
itemSizeSize of memory chunk to be copied into fifo
Returns
success True if successful false otherwise

Definition at line 61 of file atomic_fifo.cpp.

◆ write()

bool AtomicFifo::write(const void * buffer,
size_t itemSize 
)

Function for writing data to atomic FIFO

Parameters
bufferMemory destination
itemSizeSize of memory chunk to be copied
Returns
success True if successful false otherwise

Definition at line 35 of file atomic_fifo.cpp.

Here is the call graph for this function:

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