SimGrid  3.8.1
Scalable Simulation of Distributed Systems - Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Fifo perl-like functions

Functions

xbt_fifo_item_t xbt_fifo_push (xbt_fifo_t, void *)
void * xbt_fifo_pop (xbt_fifo_t)
xbt_fifo_item_t xbt_fifo_unshift (xbt_fifo_t, void *)
void * xbt_fifo_shift (xbt_fifo_t)
int xbt_fifo_size (xbt_fifo_t)
int xbt_fifo_is_in (xbt_fifo_t, void *)

Detailed Description

Function Documentation

xbt_fifo_item_t xbt_fifo_push ( xbt_fifo_t  l,
void *  t 
)

Push

Parameters
llist
telement
Returns
the bucket that was just added

Add an object at the tail of the list

void* xbt_fifo_pop ( xbt_fifo_t  l)

Pop

Parameters
llist
Returns
the object stored at the tail of the list.

Removes and returns the object stored at the tail of the list. Returns NULL if the list is empty.

xbt_fifo_item_t xbt_fifo_unshift ( xbt_fifo_t  l,
void *  t 
)
Parameters
llist
telement
Returns
the bucket that was just added

Add an object at the head of the list

void* xbt_fifo_shift ( xbt_fifo_t  l)

Shift

Parameters
llist
Returns
the object stored at the head of the list.

Removes and returns the object stored at the head of the list. Returns NULL if the list is empty.

int xbt_fifo_size ( xbt_fifo_t  f)
Parameters
fa list
Returns
the number of buckets in f.
int xbt_fifo_is_in ( xbt_fifo_t  f,
void *  content 
)
Parameters
fa list
contentan object
Returns
1 if content is in f.