X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Feltpool.h;h=c6305e99706daf824ff6640e004399ddb8914d27;hb=77c84c65dc22afe21bc52d95cd3996b8e1c7d065;hp=a3a4e427a517d29d92be92c5c88a3866d03ba57f;hpb=a4fe009d3366b0a3e119713b0ecc7fc0070efdfa;p=libucw.git diff --git a/ucw/eltpool.h b/ucw/eltpool.h index a3a4e427..c6305e99 100644 --- a/ucw/eltpool.h +++ b/ucw/eltpool.h @@ -10,6 +10,13 @@ #ifndef _UCW_ELTPOOL_H #define _UCW_ELTPOOL_H +#ifdef CONFIG_UCW_CLEAN_ABI +#define ep_alloc_slow ucw_ep_alloc_slow +#define ep_delete ucw_ep_delete +#define ep_new ucw_ep_new +#define ep_total_size ucw_ep_total_size +#endif + /*** * [[defs]] * Definitions @@ -50,6 +57,8 @@ struct eltpool_free { * The pool will allocate chunks of at least @elts_per_chunk elements. * Higher numbers lead to better allocation times but also to bigger * unused memory blocks. Call @ep_delete() to free all pool's resources. + * + * Element pools can be treated as <>, see <>. **/ struct eltpool *ep_new(uns elt_size, uns elts_per_chunk); @@ -79,7 +88,7 @@ void *ep_alloc_slow(struct eltpool *pool); /* Internal. Do not call directly. */ static inline void *ep_alloc(struct eltpool *pool) { pool->num_allocated++; -#ifdef CONFIG_FAKE_ELTPOOL +#ifdef CONFIG_UCW_FAKE_ELTPOOL return xmalloc(pool->elt_size); #else struct eltpool_free *elt; @@ -99,7 +108,7 @@ static inline void *ep_alloc(struct eltpool *pool) static inline void ep_free(struct eltpool *pool, void *p) { pool->num_allocated--; -#ifdef CONFIG_FAKE_ELTPOOL +#ifdef CONFIG_UCW_FAKE_ELTPOOL (void) pool; xfree(p); #else