SimGrid
3.14.159
Versatile Simulation of Distributed Systems
|
Macros | |
#define | xbt_fifo_foreach(f, i, n, type) |
List iterator asserts and stuff. More... | |
Functions | |
xbt_fifo_item_t | xbt_fifo_new_item (void) |
Constructor. More... | |
void | xbt_fifo_set_item_content (xbt_fifo_item_t i, void *v) |
void * | xbt_fifo_get_item_content (xbt_fifo_item_t i) |
void | xbt_fifo_free_item (xbt_fifo_item_t i) |
Destructor. More... | |
void | xbt_fifo_push_item (xbt_fifo_t l, xbt_fifo_item_t i) |
Push a bucket. More... | |
xbt_fifo_item_t | xbt_fifo_pop_item (xbt_fifo_t i) |
Pop bucket. More... | |
void | xbt_fifo_unshift_item (xbt_fifo_t l, xbt_fifo_item_t i) |
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 i) |
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_get_next_item (xbt_fifo_item_t i) |
xbt_fifo_item_t | xbt_fifo_get_prev_item (xbt_fifo_item_t i) |
List iterator asserts and stuff.
f | a list (xbt_fifo_t) |
i | a bucket (xbt_fifo_item_t) |
n | an object of type type. |
type | the type of objects contained in the fifo |
Iterates over the whole list.
|
inline |
Constructor.
|
inline |
i | a bucket |
v | an object |
stores v in i.
|
inline |
i | a bucket |
|
inline |
Destructor.
b | poor victim |
Free the bucket but does not modifies the object (if any) that was stored in it.
void xbt_fifo_push_item | ( | xbt_fifo_t | l, |
xbt_fifo_item_t | new | ||
) |
Push a bucket.
l | list |
new | bucket |
Hook up this bucket at the tail of the list
xbt_fifo_item_t xbt_fifo_pop_item | ( | xbt_fifo_t | l | ) |
Pop bucket.
l |
Returns NULL if the list was empty.
void xbt_fifo_unshift_item | ( | xbt_fifo_t | l, |
xbt_fifo_item_t | new | ||
) |
Push a bucket.
l | list |
new | bucket |
Hook up this bucket at the head of the list
xbt_fifo_item_t xbt_fifo_shift_item | ( | xbt_fifo_t | l | ) |
Shift bucket.
l |
Returns NULL if the list was empty.
int xbt_fifo_remove | ( | xbt_fifo_t | l, |
void * | t | ||
) |
l | |
t | an objet |
removes the first occurrence of t from l.
int xbt_fifo_remove_all | ( | xbt_fifo_t | l, |
void * | t | ||
) |
l | |
t | an objet |
removes all occurrences of t from l.
void xbt_fifo_remove_item | ( | xbt_fifo_t | l, |
xbt_fifo_item_t | current | ||
) |
l | a list |
current | a bucket |
removes a bucket current from the list l. This function implicitly assumes (and doesn't check!) that this item belongs to this list...
|
inline |
l | a list |
Returns NULL if the list is empty.
|
inline |
l | a list |
Returns NULL if the list is empty.
|
inline |
i | a bucket |
Returns NULL if i is the tail of the list.
|
inline |
i | a bucket |
Returns NULL if i is the head of the list.