Functions

Fifo perl-like functions
[Fifo: generic workqueue]

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 *)

Function Documentation

xbt_fifo_item_t xbt_fifo_push ( xbt_fifo_t  l,
void *  t 
)

Push

Parameters:
l list
t element
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:
l list
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:
l list
t element
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:
l list
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:
f a list
Returns:
the number of buckets in f.
int xbt_fifo_is_in ( xbt_fifo_t  f,
void *  content 
)
Parameters:
f a list
content an object
Returns:
1 if content is in f.


Back to the main Simgrid Documentation page Generated for SimGridAPI by doxygen