From: Eric Leblond Date: Thu, 30 Aug 2012 07:54:34 +0000 (+0200) Subject: pool: update doxygen documentation. X-Git-Tag: suricata-1.4beta1~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfd6dea38fd6ad11e56e98f9602513628aa7a3d9;p=thirdparty%2Fsuricata.git pool: update doxygen documentation. --- diff --git a/src/util-pool.c b/src/util-pool.c index 2708426439..e997dc1728 100644 --- a/src/util-pool.c +++ b/src/util-pool.c @@ -15,6 +15,21 @@ * 02110-1301, USA. */ +/** + * \defgroup utilpool Pool + * + * ::Pool are an effective way to maintain a set of ready to use + * structures. + * + * To create a ::Pool, you need to use PoolInit(). You can + * get an item from the ::Pool by using PoolGet(). When you're + * done with it call PoolReturn(). + * To destroy the ::Pool, call PoolFree(), it will free all used + * memory. + * + * @{ + */ + /** * \file * @@ -49,6 +64,11 @@ static int PoolDataPreAllocated(Pool *p, void *data) } /** \brief Init a Pool + * + * PoolInit() creates a ::Pool. The Alloc function must only do + * allocation stuff. The Free function must not try to free + * the PoolBucket::data. This is done by the ::Pool management + * system. * * \param size * \param prealloc_size @@ -629,3 +649,7 @@ void PoolRegisterTests(void) { #endif /* UNITTESTS */ } + +/** + * @} + */ diff --git a/src/util-pool.h b/src/util-pool.h index 3e8ae2e6c8..c768258a34 100644 --- a/src/util-pool.h +++ b/src/util-pool.h @@ -15,6 +15,12 @@ * 02110-1301, USA. */ +/** + * \ingroup utilpool + * + * @{ + */ + /** * \file * @@ -72,3 +78,6 @@ void PoolRegisterTests(void); #endif /* __UTIL_POOL_H__ */ +/** + * @} + */