3 /* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #ifndef _XBT_FIFO_PRIVATE_H
9 #define _XBT_FIFO_PRIVATE_H
12 /* Bucket structure */
13 typedef struct xbt_fifo_item {
15 struct xbt_fifo_item *next;
16 struct xbt_fifo_item *prev;
20 typedef struct xbt_fifo {
27 #define xbt_fifo_getFirstitem(l) ((l)?(l)->head:NULL)
28 #define xbt_fifo_getNextitem(i) ((i)?(i)->next:NULL)
29 #define xbt_fifo_getPrevitem(i) ((i)?(i)->prev:NULL)
30 #define xbt_fifo_getItemcontent(i) ((i)?(i)->content:NULL)
31 #define xbt_fifo_Itemcontent(i) ((i)->content)
32 #define xbt_fifo_setItemcontent(i,v) (i->content=v)
35 /* static __inline__ xbt_fifo_item_t xbt_fifo_getFirstitem(xbt_fifo_t l) */
39 /* static __inline__ xbt_fifo_item_t xbt_fifo_getNextitem(xbt_fifo_item_t i) */
41 /* if(i) return i->next; */
44 /* static __inline__ xbt_fifo_item_t xbt_fifo_getPrevitem(xbt_fifo_item_t i) */
46 /* if(i) return i->prev; */
50 #endif /* _XBT_FIFO_PRIVATE_H */