+
+ xbt_fifo_push_item(l,new);
+ return new;
+}
+
+/*
+ * xbt_fifo_pop()
+ * from the tail
+ */
+void *xbt_fifo_pop(xbt_fifo_t l)
+{
+ xbt_fifo_item_t item;
+ void *content;
+
+ if(l==NULL) return NULL;
+ if(!(item = xbt_fifo_pop_item(l))) return NULL;
+
+ content = item->content;
+ xbt_fifo_freeitem(item);
+ return content;
+}
+
+/*
+ * xbt_fifo_unshift()
+ * at the head
+ */
+xbt_fifo_item_t xbt_fifo_unshift(xbt_fifo_t l, void *t)
+{
+ xbt_fifo_item_t new;
+
+ new = xbt_fifo_newitem();
+ new->content = t;
+ xbt_fifo_unshift_item(l,new);
+ return new;
+}
+
+/*
+ * xbt_fifo_shift()
+ * from the head
+ */
+void *xbt_fifo_shift(xbt_fifo_t l)
+{
+ xbt_fifo_item_t item;
+ void *content;
+
+ if(l==NULL) return NULL;
+ if(!(item = xbt_fifo_shift_item(l))) return NULL;
+
+ content = item->content;
+ xbt_fifo_freeitem(item);
+ return content;
+}
+
+/*
+ * xbt_fifo_push_item()
+ * at the tail
+ */
+void xbt_fifo_push_item(xbt_fifo_t l, xbt_fifo_item_t new)
+{
+ (l->count)++;