+/**
+ * \param l a list
+ * \return the head of \a l.
+ *
+ * Returns NULL if the list is empty.
+ */
+XBT_INLINE xbt_fifo_item_t xbt_fifo_get_first_item(xbt_fifo_t l)
+{
+ return l->head;
+}
+
+/**
+ * \param l a list
+ * \return the tail of \a l.
+ *
+ * Returns NULL if the list is empty.
+ */
+XBT_INLINE xbt_fifo_item_t xbt_fifo_get_last_item(xbt_fifo_t l)
+{
+ return l->tail;
+}
+
+/** \deprecated Use #xbt_fifo_get_first_item instead.
+ */
+XBT_INLINE xbt_fifo_item_t xbt_fifo_getFirstItem(xbt_fifo_t l)
+{
+ XBT_WARN("This function is deprecated. Use xbt_fifo_get_first_item.");
+ return xbt_fifo_get_first_item(l);
+}
+
+/**
+ * \param i a bucket
+ * \return the bucket that comes next
+ *
+ * Returns NULL if \a i is the tail of the list.
+ */
+XBT_INLINE xbt_fifo_item_t xbt_fifo_get_next_item(xbt_fifo_item_t i)
+{
+ if (i)
+ return i->next;
+ return NULL;
+}
+
+/** \deprecated Use #xbt_fifo_get_next_item instead.
+ */
+xbt_fifo_item_t xbt_fifo_getNextItem(xbt_fifo_item_t i)
+{
+ XBT_WARN("This function is deprecated. Use xbt_fifo_get_next_item.");
+ return xbt_fifo_get_next_item(i);
+}
+
+/**
+ * \param i a bucket
+ * \return the bucket that is just before \a i.
+ *
+ * Returns NULL if \a i is the head of the list.
+ */
+XBT_INLINE xbt_fifo_item_t xbt_fifo_get_prev_item(xbt_fifo_item_t i)
+{
+ if (i)
+ return i->prev;
+ return NULL;
+}
+
+/** \deprecated Use #xbt_fifo_get_prev_item instead.
+ */
+xbt_fifo_item_t xbt_fifo_getPrevItem(xbt_fifo_item_t i)
+{
+ XBT_WARN("This function is deprecated. Use xbt_fifo_get_prev_item.");
+ return xbt_fifo_get_prev_item(i);
+}
+
+/* Module init/exit handling the fifo item mallocator
+ * These are internal XBT functions called by xbt_preinit/postexit().
+ * It can be used several times to recreate the mallocator, for example when you switch to MC mode
+ */
+void xbt_fifo_preinit(void)
+{
+ item_mallocator = xbt_mallocator_new(65536,
+ fifo_item_mallocator_new_f,
+ fifo_item_mallocator_free_f,
+ fifo_item_mallocator_reset_f);
+}
+
+void xbt_fifo_postexit(void)
+{
+ if (item_mallocator != NULL) {
+ xbt_mallocator_free(item_mallocator);
+ item_mallocator = NULL;
+ }
+}