Not to be used directly.
More...
Not to be used directly.
These structure and functions are not meant to be used directly. These are internals of Buffered FIFO and related functions.
Thread-safely sets the previous chunk (ch->prev)
- Parameters
-
ch | the chunk where to set the previous chunk |
prev | the new previous chunk |
Definition at line 103 of file Buffered_FIFO.h.
void Buffered_FIFO_chunk_init |
( |
struct Buffered_FIFO_chunk * |
ch, |
|
|
uint64_t |
chunk_size, |
|
|
size_t |
elem_size |
|
) |
| |
Initializes a Buffered_FIFO_chunk.
- Parameters
-
ch | the chunk to initialize |
chunk_size | the number of elements the chunk can contain |
elem_size | the size of the elements to store |
struct Buffered_FIFO_chunk* Buffered_FIFO_chunk_new |
( |
uint64_t |
chunk_size, |
|
|
uint64_t |
elem_size |
|
) |
| |
Allocates a new Buffered_FIFO_chunk.
- Parameters
-
chunk_size | the number of elements the chunk can contain |
elem_size | the size of the elements to store |
- Returns
- the newly created chunk
Definition at line 54 of file Buffered_FIFO.c.
pops en element from a chunk
- Parameters
-
ch | the chunk where to push the element |
dest | the element where to copy data |
- Returns
- a pointer to the element stored in ch->payload (NULL the chunk is empty)
Definition at line 97 of file Buffered_FIFO.c.
Thread-safely gets the previous chunk (ch->prev)
- Parameters
-
ch | the chunk from where to get the previous chunk |
- Returns
- the previous chunk
Definition at line 115 of file Buffered_FIFO.h.
Pushes an element into a chunk.
- Parameters
-
ch | the chunk where to push the element |
elem | the element to push |
- Returns
- a pointer to the element stored in ch->payload (NULL if there is not enough room)
Definition at line 76 of file Buffered_FIFO.c.