+
+ xbt_fifo_push_item(l,new);
+ return new;
+}
+
+/** Pop
+ * \param l list
+ * \returns the object stored at the tail of the list.
+ *
+ * Removes and returns the object stored at the tail of the list.
+ * Returns NULL if the list is empty.
+ */
+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_free_item(item);
+ return content;
+}
+
+/**
+ * \param l list
+ * \param t element
+ * \return the bucket that was just added
+ *
+ * Add an object at the head of the list
+ */
+xbt_fifo_item_t xbt_fifo_unshift(xbt_fifo_t l, void *t)
+{
+ xbt_fifo_item_t new;
+
+ new = xbt_fifo_new_item();
+ new->content = t;
+ xbt_fifo_unshift_item(l,new);
+ return new;
+}
+
+/** Shift
+ * \param l list
+ * \returns the object stored at the head of the list.
+ *
+ * Removes and returns the object stored at the head of the list.
+ * Returns NULL if the list is empty.
+ */
+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_free_item(item);
+ return content;
+}
+
+/** Push a bucket
+ * \param l list
+ * \param new bucket
+ *
+ * Hook up this bucket at the tail of the list
+ */
+void xbt_fifo_push_item(xbt_fifo_t l, xbt_fifo_item_t new)
+{
+ xbt_assert0((new->next == NULL)&&(new->prev == NULL),"Invalid item!");
+ (l->count)++;