X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cfc676704bebcd57e5ea98bb43154245a150948f..a07e0280b245200f483e170d446156f1dea261f3:/include/xbt/swag.h diff --git a/include/xbt/swag.h b/include/xbt/swag.h index fa96ed4d7d..318be64069 100644 --- a/include/xbt/swag.h +++ b/include/xbt/swag.h @@ -24,6 +24,7 @@ SG_BEGIN_DECL() * It is basically a fifo but with restrictions so that it can be used as a set. Any operation (add, remove, belongs) * is O(1) and no call to malloc/free is done. * + * If you are using C++, you might want to use boost::intrusive::set instead. */ /** @defgroup XBT_swag_type Swag types @ingroup XBT_swag @@ -65,12 +66,15 @@ typedef struct foo { */ typedef s_xbt_swag_hookup_t *xbt_swag_hookup_t; -typedef struct xbt_swag { +struct xbt_swag { void *head; void *tail; size_t offset; int count; -} s_xbt_swag_t, *xbt_swag_t; +}; +typedef struct xbt_swag s_xbt_swag_t; +typedef struct xbt_swag* xbt_swag_t; + /**< A typical swag */ /* @} */ @@ -189,4 +193,5 @@ static inline void *xbt_swag_getFirst(xbt_swag_t swag) /* @} */ SG_END_DECL() + #endif /* _XBT_SWAG_H */