Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Internals

Not to be used directly. More...

Data Structures

struct  Buffered_FIFO_chunk
 Structure defining a chunk of FIFO. The Buffered_FIFO is made of several Buffered_FIFO_chunk containing the data. More...
 

Functions

void Buffered_FIFO_chunk_init (struct Buffered_FIFO_chunk *ch, uint64_t chunk_size, size_t elem_size)
 Initializes a Buffered_FIFO_chunk. More...
 
struct Buffered_FIFO_chunkBuffered_FIFO_chunk_new (uint64_t chunk_size, uint64_t elem_size)
 Allocates a new Buffered_FIFO_chunk. More...
 
void Buffered_FIFO_chunk_release (struct Buffered_FIFO_chunk *ch)
 Deallocates a new Buffered_FIFO_chunk. More...
 
void * Buffered_FIFO_chunk_push (struct Buffered_FIFO_chunk *ch, void *elem)
 Pushes an element into a chunk. More...
 
void * Buffered_FIFO_chunk_pop (struct Buffered_FIFO_chunk *ch, void *dest)
 pops en element from a chunk More...
 
static void Buffered_FIFO_chunk_ctx_prev (struct Buffered_FIFO_chunk *ch, struct Buffered_FIFO_chunk *prev)
 Thread-safely sets the previous chunk (ch->prev) More...
 
static struct Buffered_FIFO_chunkBuffered_FIFO_chunk_prev (struct Buffered_FIFO_chunk *ch)
 Thread-safely gets the previous chunk (ch->prev) More...
 

Detailed Description

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.

Function Documentation

static void Buffered_FIFO_chunk_ctx_prev ( struct Buffered_FIFO_chunk ch,
struct Buffered_FIFO_chunk prev 
)
inlinestatic

Thread-safely sets the previous chunk (ch->prev)

Parameters
chthe chunk where to set the previous chunk
prevthe new previous chunk

Definition at line 103 of file Buffered_FIFO.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void Buffered_FIFO_chunk_init ( struct Buffered_FIFO_chunk ch,
uint64_t  chunk_size,
size_t  elem_size 
)

Initializes a Buffered_FIFO_chunk.

Parameters
chthe chunk to initialize
chunk_sizethe number of elements the chunk can contain
elem_sizethe 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_sizethe number of elements the chunk can contain
elem_sizethe size of the elements to store
Returns
the newly created chunk

Definition at line 54 of file Buffered_FIFO.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void* Buffered_FIFO_chunk_pop ( struct Buffered_FIFO_chunk ch,
void *  dest 
)

pops en element from a chunk

Parameters
chthe chunk where to push the element
destthe 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.

Here is the call graph for this function:

Here is the caller graph for this function:

static struct Buffered_FIFO_chunk* Buffered_FIFO_chunk_prev ( struct Buffered_FIFO_chunk ch)
static

Thread-safely gets the previous chunk (ch->prev)

Parameters
chthe chunk from where to get the previous chunk
Returns
the previous chunk

Definition at line 115 of file Buffered_FIFO.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void* Buffered_FIFO_chunk_push ( struct Buffered_FIFO_chunk ch,
void *  elem 
)

Pushes an element into a chunk.

Parameters
chthe chunk where to push the element
elemthe 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.

Here is the call graph for this function:

Here is the caller graph for this function:

void Buffered_FIFO_chunk_release ( struct Buffered_FIFO_chunk ch)

Deallocates a new Buffered_FIFO_chunk.

Parameters
chthe chunk to deallocate

Definition at line 70 of file Buffered_FIFO.c.

Here is the caller graph for this function: