]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/eltpool.h
Update build of manpages, contd.
[libucw.git] / ucw / eltpool.h
index 1b70d440f7548445e1ce606dca04de76a8f92113..0f65186586d38bcf573900ef4655e9afae77f2bd 100644 (file)
 #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
 struct eltpool {
   struct eltpool_chunk *first_chunk;
   struct eltpool_free *first_free;
-  uns elt_size;
-  uns chunk_size;
-  uns elts_per_chunk;
-  uns num_allocated;           // Just for debugging
-  uns num_chunks;
+  uint elt_size;
+  uint chunk_size;
+  uint elts_per_chunk;
+  uint num_allocated;          // Just for debugging
+  uint num_chunks;
 };
 
 struct eltpool_chunk {
@@ -53,7 +60,7 @@ struct eltpool_free {
  *
  * Element pools can be treated as <<trans:respools,resources>>, see <<trans:res_eltpool()>>.
  **/
-struct eltpool *ep_new(uns elt_size, uns elts_per_chunk);
+struct eltpool *ep_new(uint elt_size, uint elts_per_chunk);
 
 /**
  * Release a memory pool created by @ep_new() including all
@@ -81,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;
@@ -101,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