X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c69057bd07befcfb1fafa975dc9d4e76889c82cd..f9df6a0ce7023e4e22d83bb6c50f27bd21fab329:/include/xbt/fifo.h?ds=sidebyside diff --git a/include/xbt/fifo.h b/include/xbt/fifo.h index c373926d1f..ab8a16076a 100644 --- a/include/xbt/fifo.h +++ b/include/xbt/fifo.h @@ -14,9 +14,13 @@ SG_BEGIN_DECL() /** @addtogroup XBT_fifo * @brief This section describes the API to generic workqueue. * - * These functions provide the same kind of functionality as dynamic arrays but in time O(1). - * However these functions use malloc/free way too much often. + * These functions provide the same kind of functionality as dynamic arrays + * but in time O(1). However these functions use malloc/free way too much often. + * + * @deprecated If you are using C++, you might want to used `std::list`, + * `std::deque` or `std::queue instead`. */ + /** @defgroup XBT_fifo_cons Fifo constructor and destructor * @ingroup XBT_fifo * @@ -30,7 +34,7 @@ typedef struct xbt_fifo_item *xbt_fifo_item_t; */ typedef struct xbt_fifo *xbt_fifo_t; -XBT_PUBLIC(xbt_fifo_t) xbt_fifo_new(void); +XBT_PUBLIC(xbt_fifo_t) xbt_fifo_new(); XBT_PUBLIC(void) xbt_fifo_free(xbt_fifo_t l); XBT_PUBLIC(void) xbt_fifo_reset(xbt_fifo_t l); /** @} */ @@ -55,7 +59,7 @@ XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_search_item(xbt_fifo_t f, int_f_pvoid_pvoid * @{ */ -XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(void); +XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(); XBT_PUBLIC(void) xbt_fifo_set_item_content(xbt_fifo_item_t i, void *v); XBT_PUBLIC(void *) xbt_fifo_get_item_content(xbt_fifo_item_t i); XBT_PUBLIC(void) xbt_fifo_free_item(xbt_fifo_item_t i); @@ -102,7 +106,7 @@ XBT_PUBLIC(xbt_fifo_t) xbt_fifo_copy(xbt_fifo_t l); /** @} */ /* Deprecated functions: don't use! */ -XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_newitem(void); +XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_newitem(); XBT_PUBLIC(void) xbt_fifo_freeitem(xbt_fifo_item_t l); XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_getFirstItem(xbt_fifo_t l);