SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions
oSIP fifo Handling

Data Structures

struct  osip_fifo
 Structure for referencing a fifo. More...
 

Typedefs

typedef struct osip_fifo osip_fifo_t
 Structure for referencing a fifo. More...
 

Enumerations

enum  osip_fifo_state { osip_ok, osip_empty }
 

Functions

void osip_fifo_init (osip_fifo_t *ff)
 Initialise a osip_fifo_t element. More...
 
void osip_fifo_free (osip_fifo_t *ff)
 Free a fifo element. More...
 
int osip_fifo_insert (osip_fifo_t *ff, void *element)
 Insert an element in a fifo (at the beginning). More...
 
int osip_fifo_add (osip_fifo_t *ff, void *element)
 Add an element in a fifo. More...
 
int osip_fifo_size (osip_fifo_t *ff)
 Get the number of element in a fifo. More...
 
void * osip_fifo_get (osip_fifo_t *ff)
 Get an element from a fifo or block until one is added. More...
 
void * osip_fifo_tryget (osip_fifo_t *ff)
 Try to get an element from a fifo, but do not block if there is no element. More...
 

Detailed Description

Typedef Documentation

#include <osip_fifo.h>

Structure for referencing a fifo.

Definition at line 57 of file osip_fifo.h.

Enumeration Type Documentation

#include <osip_fifo.h>

Enumerator
osip_ok 
osip_empty 

Definition at line 49 of file osip_fifo.h.

Function Documentation

int osip_fifo_add ( osip_fifo_t ff,
void *  element 
)

#include <osip_fifo.h>

Add an element in a fifo.

Parameters
ffThe element to work on.
elementThe pointer on the element to add.
void osip_fifo_free ( osip_fifo_t ff)

#include <osip_fifo.h>

Free a fifo element.

Parameters
ffThe element to work on.
void* osip_fifo_get ( osip_fifo_t ff)

#include <osip_fifo.h>

Get an element from a fifo or block until one is added.

Parameters
ffThe element to work on.
void osip_fifo_init ( osip_fifo_t ff)

#include <osip_fifo.h>

Initialise a osip_fifo_t element.

NOTE: this element MUST be previously allocated with osip_malloc(). The osip_free() call on the fifo is still automatically done by osip_fifo_free(). This also means you can't use a static osip_fifo_t variable if you want to use osip_fifo_free().

Parameters
ffThe element to initialise.
int osip_fifo_insert ( osip_fifo_t ff,
void *  element 
)

#include <osip_fifo.h>

Insert an element in a fifo (at the beginning).

Parameters
ffThe element to work on.
elementThe pointer on the element to insert.
int osip_fifo_size ( osip_fifo_t ff)

#include <osip_fifo.h>

Get the number of element in a fifo.

Parameters
ffThe element to work on.
void* osip_fifo_tryget ( osip_fifo_t ff)

#include <osip_fifo.h>

Try to get an element from a fifo, but do not block if there is no element.

Parameters
ffThe element to work on.