1 /* Authors: Arnaud Legrand */
3 /* This program is free software; you can redistribute it and/or modify it
4 under the terms of the license (GNU LGPL) which comes with this package. */
10 typedef struct xbt_fifo_item *xbt_fifo_item_t;
13 typedef struct xbt_fifo *xbt_fifo_t;
16 xbt_fifo_t xbt_fifo_new(void);
17 void xbt_fifo_free(xbt_fifo_t);
19 xbt_fifo_item_t xbt_fifo_push(xbt_fifo_t, void *);
20 void *xbt_fifo_pop(xbt_fifo_t);
21 xbt_fifo_item_t xbt_fifo_unshift(xbt_fifo_t, void *);
22 void *xbt_fifo_shift(xbt_fifo_t);
24 void xbt_fifo_push_item(xbt_fifo_t, xbt_fifo_item_t);
25 xbt_fifo_item_t xbt_fifo_pop_item(xbt_fifo_t);
26 void xbt_fifo_unshift_item(xbt_fifo_t, xbt_fifo_item_t);
27 xbt_fifo_item_t xbt_fifo_shift_item(xbt_fifo_t);
29 void xbt_fifo_remove(xbt_fifo_t, void *);
30 void xbt_fifo_remove_item(xbt_fifo_t, xbt_fifo_item_t);
32 int xbt_fifo_is_in(xbt_fifo_t, void *);
34 void **xbt_fifo_to_array(xbt_fifo_t);
35 xbt_fifo_t xbt_fifo_copy(xbt_fifo_t);
37 xbt_fifo_item_t xbt_fifo_newitem(void);
38 void xbt_fifo_set_item_content(xbt_fifo_item_t, void *);
39 void *xbt_fifo_get_item_content(xbt_fifo_item_t);
40 void xbt_fifo_freeitem(xbt_fifo_item_t);
42 int xbt_fifo_size(xbt_fifo_t);
44 /* #define xbt_fifo_foreach(f,i,n,type) \ */
45 /* for(i=xbt_fifo_getFirstitem(f); \ */
46 /* ((i)?(n=(type)(i->content)):(NULL)); \ */
47 /* i=xbt_fifo_getNextitem(i)) */
50 #endif /* _XBT_FIFO_H */