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. */
6 #ifndef _XBT_FIFO_PRIVATE_H
7 #define _XBT_FIFO_PRIVATE_H
10 /* Bucket structure */
11 typedef struct xbt_fifo_item {
13 struct xbt_fifo_item *next;
14 struct xbt_fifo_item *prev;
18 typedef struct xbt_fifo {
25 #define xbt_fifo_getFirstitem(l) ((l)?(l)->head:NULL)
26 #define xbt_fifo_getNextitem(i) ((i)?(i)->next:NULL)
27 #define xbt_fifo_getPrevitem(i) ((i)?(i)->prev:NULL)
28 #define xbt_fifo_getItemcontent(i) ((i)?(i)->content:NULL)
29 #define xbt_fifo_setItemcontent(i,v) (i->content=v)
32 /* static __inline__ xbt_fifo_item_t xbt_fifo_getFirstitem(xbt_fifo_t l) */
36 /* static __inline__ xbt_fifo_item_t xbt_fifo_getNextitem(xbt_fifo_item_t i) */
38 /* if(i) return i->next; */
41 /* static __inline__ xbt_fifo_item_t xbt_fifo_getPrevitem(xbt_fifo_item_t i) */
43 /* if(i) return i->prev; */
47 #endif /* _XBT_FIFO_PRIVATE_H */