Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New function: xbt_fifo_get_last_item()
[simgrid.git] / src / xbt / fifo.c
index ba7c0b2..8cdd401 100644 (file)
@@ -1,6 +1,5 @@
-/*     $Id$     */
-
-/* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -456,6 +455,15 @@ 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.
+ */
+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)