From 2f03dcde911192bac77f696490b713a067e3deb6 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 15 Apr 2021 19:54:48 +0200 Subject: [PATCH] CLEANUP: pools: rename __pool_get_first() to pool_get_from_shared_cache() This is exactly what it is, the entry is retrieved from the shared cache when it is defined. The implementation that is enabled with CONFIG_HAP_NO_GLOBAL_POOLS continues to return NULL. --- include/haproxy/pool.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/haproxy/pool.h b/include/haproxy/pool.h index a5c3619..0b1d250 100644 --- a/include/haproxy/pool.h +++ b/include/haproxy/pool.h @@ -131,7 +131,7 @@ static inline void pool_put_to_cache(struct pool_head *pool, void *ptr) * which may sometimes be faster than the local shared pools because it * will maintain its own per-thread arenas. */ -static inline void *__pool_get_first(struct pool_head *pool) +static inline void *pool_get_from_shared_cache(struct pool_head *pool) { return NULL; } @@ -153,7 +153,7 @@ static inline void __pool_free(struct pool_head *pool, void *ptr) * available, otherwise returns NULL. No malloc() is attempted, and poisonning * is never performed. The purpose is to get the fastest possible allocation. */ -static inline void *__pool_get_first(struct pool_head *pool) +static inline void *pool_get_from_shared_cache(struct pool_head *pool) { struct pool_free_list cmp, new; @@ -211,7 +211,7 @@ static inline void __pool_free(struct pool_head *pool, void *ptr) * is never performed. The purpose is to get the fastest possible allocation. * This version takes the pool's lock in order to do this. */ -static inline void *__pool_get_first(struct pool_head *pool) +static inline void *pool_get_from_shared_cache(struct pool_head *pool) { void *p; @@ -280,7 +280,7 @@ static inline void *__pool_alloc(struct pool_head *pool, unsigned int flags) goto ret; #endif - p = __pool_get_first(pool); + p = pool_get_from_shared_cache(pool); if (!p) p = pool_alloc_nocache(pool); ret: -- 1.7.10.4