/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#ifndef _XBT_FIFO_H
#define _XBT_FIFO_H
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#ifndef _XBT_FIFO_H
#define _XBT_FIFO_H
* These functions provide the same kind of functionnality as dynamic arrays but in time O(1).
* However these functions use malloc/free way too much often.
*/
* These functions provide the same kind of functionnality as dynamic arrays but in time O(1).
* However these functions use malloc/free way too much often.
*/
XBT_PUBLIC(int) xbt_fifo_size(xbt_fifo_t);
XBT_PUBLIC(int) xbt_fifo_is_in(xbt_fifo_t, void *);
XBT_PUBLIC(int) xbt_fifo_size(xbt_fifo_t);
XBT_PUBLIC(int) xbt_fifo_is_in(xbt_fifo_t, void *);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(void);
XBT_PUBLIC(void) xbt_fifo_set_item_content(xbt_fifo_item_t, void *);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(void);
XBT_PUBLIC(void) xbt_fifo_set_item_content(xbt_fifo_item_t, void *);
XBT_PUBLIC(void) xbt_fifo_free_item(xbt_fifo_item_t);
XBT_PUBLIC(void) xbt_fifo_push_item(xbt_fifo_t, xbt_fifo_item_t);
XBT_PUBLIC(void) xbt_fifo_free_item(xbt_fifo_item_t);
XBT_PUBLIC(void) xbt_fifo_push_item(xbt_fifo_t, xbt_fifo_item_t);
XBT_PUBLIC(void) xbt_fifo_unshift_item(xbt_fifo_t, xbt_fifo_item_t);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_shift_item(xbt_fifo_t);
XBT_PUBLIC(void) xbt_fifo_unshift_item(xbt_fifo_t, xbt_fifo_item_t);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_shift_item(xbt_fifo_t);
-XBT_PUBLIC(void) xbt_fifo_remove(xbt_fifo_t, void *);
+XBT_PUBLIC(int) xbt_fifo_remove(xbt_fifo_t, void *);
+XBT_PUBLIC(int) xbt_fifo_remove_all(xbt_fifo_t, void *);
XBT_PUBLIC(void) xbt_fifo_remove_item(xbt_fifo_t, xbt_fifo_item_t);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_first_item(xbt_fifo_t l);
XBT_PUBLIC(void) xbt_fifo_remove_item(xbt_fifo_t, xbt_fifo_item_t);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_first_item(xbt_fifo_t l);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_next_item(xbt_fifo_item_t i);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_prev_item(xbt_fifo_item_t i);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_next_item(xbt_fifo_item_t i);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_prev_item(xbt_fifo_item_t i);
*/
#define xbt_fifo_foreach(f,i,n,type) \
for(i=xbt_fifo_get_first_item(f); \
*/
#define xbt_fifo_foreach(f,i,n,type) \
for(i=xbt_fifo_get_first_item(f); \