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 void xbt_fifo_push(xbt_fifo_t, void *);
20 void *xbt_fifo_pop(xbt_fifo_t);
21 void xbt_fifo_unshift(xbt_fifo_t, void *);
22 void *xbt_fifo_shift(xbt_fifo_t);
24 void xbt_fifo_remove(xbt_fifo_t, void *);
25 void xbt_fifo_remove_item(xbt_fifo_t, xbt_fifo_item_t);
27 int xbt_fifo_is_in(xbt_fifo_t, void *);
29 void **xbt_fifo_to_array(xbt_fifo_t);
30 xbt_fifo_t xbt_fifo_copy(xbt_fifo_t);
32 xbt_fifo_item_t xbt_fifo_newitem(void);
33 void xbt_fifo_set_item_content(xbt_fifo_item_t, void *);
34 void *xbt_fifo_get_item_content(xbt_fifo_item_t);
35 void xbt_fifo_freeitem(xbt_fifo_item_t);
37 int xbt_fifo_size(xbt_fifo_t);
39 /* #define xbt_fifo_foreach(f,i,n,type) \ */
40 /* for(i=xbt_fifo_getFirstitem(f); \ */
41 /* ((i)?(n=(type)(i->content)):(NULL)); \ */
42 /* i=xbt_fifo_getNextitem(i)) */
45 #endif /* _XBT_FIFO_H */