X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6760cb07d6b57be16928d95339d71e57c4e24f36..43cfff77113704360f4d55b40e890c65a09d8059:/include/xbt/queue.h diff --git a/include/xbt/queue.h b/include/xbt/queue.h index a3b846a65d..ab918ffb70 100644 --- a/include/xbt/queue.h +++ b/include/xbt/queue.h @@ -1,7 +1,7 @@ /* A (synchronized) message queue. */ /* Popping an empty queue is blocking, as well as pushing a full one */ -/* Copyright (c) 2007, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2007, 2009-2011, 2013-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -16,21 +16,26 @@ SG_BEGIN_DECL() /** @addtogroup XBT_queue - * @brief Synchronized message exchanging queue. + * \brief Synchronized message exchanging queue. * - * These is the classical producer/consumer synchronization scheme, which all concurrent programmer recode one day or another. + * These is the classical producer/consumer synchronization scheme, + * which all concurrent programmer recode one day or another. + * + * The synchronization of this implementation is done within the SimGrid + * realm, switching between SimGrid processes. * * For performance concerns, the content of queue must be homogeneous, - * just like dynars (see the \ref XBT_dynar section). Indeed, queues use a + * just like dynars (see the \ref XBT_dynar section). Actually, queues use a * dynar to store the data, and add the synchronization on top of it. * * @{ */ /** \brief Queue data type (opaque type) */ - typedef struct s_xbt_queue_ *xbt_queue_t; +typedef struct s_xbt_queue_ *xbt_queue_t; -XBT_PUBLIC(xbt_queue_t) xbt_queue_new(int capacity, unsigned long elm_size); +XBT_PUBLIC(xbt_queue_t) xbt_queue_new(int capacity, + unsigned long elm_size); XBT_PUBLIC(void) xbt_queue_free(xbt_queue_t * queue); XBT_PUBLIC(unsigned long) xbt_queue_length(const xbt_queue_t queue); @@ -42,8 +47,8 @@ XBT_PUBLIC(void) xbt_queue_shift(xbt_queue_t queue, void *const dst); XBT_PUBLIC(void) xbt_queue_push_timed(xbt_queue_t queue, const void *src, double delay); -XBT_PUBLIC(void) xbt_queue_unshift_timed(xbt_queue_t queue, const void *src, - double delay); +XBT_PUBLIC(void) xbt_queue_unshift_timed(xbt_queue_t queue, + const void *src, double delay); XBT_PUBLIC(void) xbt_queue_shift_timed(xbt_queue_t queue, void *const dst, double delay); XBT_PUBLIC(void) xbt_queue_pop_timed(xbt_queue_t queue, void *const dst, @@ -52,4 +57,4 @@ XBT_PUBLIC(void) xbt_queue_pop_timed(xbt_queue_t queue, void *const dst, /** @} */ SG_END_DECL() -#endif /* _XBT_QUEUE_H */ +#endif /* _XBT_QUEUE_H */