Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Buffered_FIFO.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "Spinlock.h"
Include dependency graph for Buffered_FIFO.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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...
 
struct  Buffered_FIFO
 This is a struct defining a FIFO It is composed of several Buffered_FIFO_chunk. 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...
 
void Buffered_FIFO_init (struct Buffered_FIFO *fifo, uint64_t chunk_size, size_t elem_size)
 Initializes a Buffered_FIFO. More...
 
void Buffered_FIFO_release (struct Buffered_FIFO *fifo, void(*free_func)(void *))
 releases a FIFO More...
 
void * Buffered_FIFO_push (struct Buffered_FIFO *fifo, void *elem)
 Pushes an element into a FIFO. More...
 
void * Buffered_FIFO_pop (struct Buffered_FIFO *fifo, void *dest)
 Pops an element from a FIFO. More...
 
uint64_t Buffered_FIFO_count (struct Buffered_FIFO *fifo)
 Thread-safely gets the number of elements stored in the FIFO. More...