SimGrid  3.14.159
Versatile Simulation of Distributed Systems
fifo.c File Reference
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/mallocator.h"
#include "fifo_private.h"
#include "src/xbt_modinter.h"

Macros

#define fifo_item_mallocator_free_f   xbt_free_f
 

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (xbt_fifo, xbt, "FIFO")
 
static voidfifo_item_mallocator_new_f (void)
 
static void fifo_item_mallocator_reset_f (void *item)
 
xbt_fifo_t xbt_fifo_new (void)
 Constructor. More...
 
void xbt_fifo_free (xbt_fifo_t l)
 Destructor. More...
 
void xbt_fifo_reset (xbt_fifo_t l)
 Makes a fifo empty. More...
 
xbt_fifo_item_t xbt_fifo_push (xbt_fifo_t l, void *t)
 Push. More...
 
voidxbt_fifo_pop (xbt_fifo_t l)
 Pop. More...
 
xbt_fifo_item_t xbt_fifo_unshift (xbt_fifo_t l, void *t)
 
voidxbt_fifo_shift (xbt_fifo_t l)
 Shift. More...
 
void xbt_fifo_push_item (xbt_fifo_t l, xbt_fifo_item_t new)
 Push a bucket. More...
 
xbt_fifo_item_t xbt_fifo_pop_item (xbt_fifo_t l)
 Pop bucket. More...
 
void xbt_fifo_unshift_item (xbt_fifo_t l, xbt_fifo_item_t new)
 Push a bucket. More...
 
xbt_fifo_item_t xbt_fifo_shift_item (xbt_fifo_t l)
 Shift bucket. More...
 
int xbt_fifo_remove (xbt_fifo_t l, void *t)
 
int xbt_fifo_remove_all (xbt_fifo_t l, void *t)
 
void xbt_fifo_remove_item (xbt_fifo_t l, xbt_fifo_item_t current)
 
int xbt_fifo_is_in (xbt_fifo_t f, void *content)
 
xbt_fifo_item_t xbt_fifo_search_item (xbt_fifo_t f, int_f_pvoid_pvoid_t cmp_fun, void *closure)
 Search the given element in the fifo using a comparison function. More...
 
void ** xbt_fifo_to_array (xbt_fifo_t f)
 
xbt_fifo_t xbt_fifo_copy (xbt_fifo_t f)
 
xbt_fifo_item_t xbt_fifo_new_item (void)
 Constructor. More...
 
xbt_fifo_item_t xbt_fifo_newitem (void)
 
void xbt_fifo_set_item_content (xbt_fifo_item_t i, void *v)
 
voidxbt_fifo_get_item_content (xbt_fifo_item_t i)
 
void xbt_fifo_free_item (xbt_fifo_item_t b)
 Destructor. More...
 
void xbt_fifo_freeitem (xbt_fifo_item_t b)
 Destructor. More...
 
int xbt_fifo_size (xbt_fifo_t f)
 
xbt_fifo_item_t xbt_fifo_get_first_item (xbt_fifo_t l)
 
xbt_fifo_item_t xbt_fifo_get_last_item (xbt_fifo_t l)
 
xbt_fifo_item_t xbt_fifo_getFirstItem (xbt_fifo_t l)
 
xbt_fifo_item_t xbt_fifo_get_next_item (xbt_fifo_item_t i)
 
xbt_fifo_item_t xbt_fifo_getNextItem (xbt_fifo_item_t i)
 
xbt_fifo_item_t xbt_fifo_get_prev_item (xbt_fifo_item_t i)
 
xbt_fifo_item_t xbt_fifo_getPrevItem (xbt_fifo_item_t i)
 
void xbt_fifo_preinit ()
 
void xbt_fifo_postexit ()
 

Variables

static xbt_mallocator_t item_mallocator = NULL
 

Macro Definition Documentation

◆ fifo_item_mallocator_free_f

#define fifo_item_mallocator_free_f   xbt_free_f

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( xbt_fifo  ,
xbt  ,
"FIFO"   
)

◆ fifo_item_mallocator_new_f()

static void * fifo_item_mallocator_new_f ( void  )
static

◆ fifo_item_mallocator_reset_f()

static void fifo_item_mallocator_reset_f ( void item)
static

◆ xbt_fifo_newitem()

xbt_fifo_item_t xbt_fifo_newitem ( void  )
inline

◆ xbt_fifo_freeitem()

void xbt_fifo_freeitem ( xbt_fifo_item_t  b)
inline

Destructor.

Deprecated:
Use xbt_fifo_free_item instead.

◆ xbt_fifo_getFirstItem()

xbt_fifo_item_t xbt_fifo_getFirstItem ( xbt_fifo_t  l)
inline

◆ xbt_fifo_getNextItem()

xbt_fifo_item_t xbt_fifo_getNextItem ( xbt_fifo_item_t  i)

◆ xbt_fifo_getPrevItem()

xbt_fifo_item_t xbt_fifo_getPrevItem ( xbt_fifo_item_t  i)

◆ xbt_fifo_preinit()

void xbt_fifo_preinit ( )

◆ xbt_fifo_postexit()

void xbt_fifo_postexit ( )

Variable Documentation

◆ item_mallocator

xbt_mallocator_t item_mallocator = NULL
static