}
/* Pools used to allocate ref on Promex modules and filters */
-DECLARE_STATIC_POOL(pool_head_promex_mod_ref, "promex_module_ref", sizeof(struct promex_module_ref));
-DECLARE_STATIC_POOL(pool_head_promex_metric_flt, "promex_metric_filter", sizeof(struct promex_metric_filter));
+DECLARE_STATIC_TYPED_POOL(pool_head_promex_mod_ref, "promex_module_ref", struct promex_module_ref);
+DECLARE_STATIC_TYPED_POOL(pool_head_promex_metric_flt, "promex_metric_filter", struct promex_metric_filter);
/* Return the server status. */
enum promex_srv_state promex_srv_status(struct server *sv)
unsigned int nb_applets = 0;
-DECLARE_POOL(pool_head_appctx, "appctx", sizeof(struct appctx));
+DECLARE_TYPED_POOL(pool_head_appctx, "appctx", struct appctx);
/* trace source and events */
static struct list caches_config = LIST_HEAD_INIT(caches_config); /* cache config to init */
static struct cache *tmp_cache_config = NULL;
-DECLARE_STATIC_POOL(pool_head_cache_st, "cache_st", sizeof(struct cache_st));
+DECLARE_STATIC_TYPED_POOL(pool_head_cache_st, "cache_st", struct cache_st);
static struct eb32_node *insert_entry(struct cache *cache, struct cache_tree *tree, struct cache_entry *new_entry);
static void delete_entry(struct cache_entry *del_entry);
}
#if defined(USE_ZLIB) || defined(USE_SLZ)
-DECLARE_STATIC_POOL(pool_comp_ctx, "comp_ctx", sizeof(struct comp_ctx));
+DECLARE_STATIC_TYPED_POOL(pool_comp_ctx, "comp_ctx", struct comp_ctx);
/*
* Alloc the comp_ctx
#include <haproxy/xxhash.h>
-DECLARE_POOL(pool_head_connection, "connection", sizeof(struct connection));
-DECLARE_POOL(pool_head_conn_hash_node, "conn_hash_node", sizeof(struct conn_hash_node));
-DECLARE_POOL(pool_head_sockaddr, "sockaddr", sizeof(struct sockaddr_storage));
-DECLARE_POOL(pool_head_pp_tlv_128, "pp_tlv_128", sizeof(struct conn_tlv_list) + HA_PP2_TLV_VALUE_128);
-DECLARE_POOL(pool_head_pp_tlv_256, "pp_tlv_256", sizeof(struct conn_tlv_list) + HA_PP2_TLV_VALUE_256);
+DECLARE_TYPED_POOL(pool_head_connection, "connection", struct connection);
+DECLARE_TYPED_POOL(pool_head_conn_hash_node, "conn_hash_node", struct conn_hash_node);
+DECLARE_TYPED_POOL(pool_head_sockaddr, "sockaddr", struct sockaddr_storage);
+DECLARE_TYPED_POOL(pool_head_pp_tlv_128, "pp_tlv_128", struct conn_tlv_list, HA_PP2_TLV_VALUE_128);
+DECLARE_TYPED_POOL(pool_head_pp_tlv_256, "pp_tlv_256", struct conn_tlv_list, HA_PP2_TLV_VALUE_256);
struct idle_conns idle_conns[MAX_THREADS] = { };
struct xprt_ops *registered_xprt[XPRT_ENTRIES] = { NULL, };
static THREAD_LOCAL char *dns_msg_trash;
-DECLARE_STATIC_POOL(dns_session_pool, "dns_session", sizeof(struct dns_session));
-DECLARE_STATIC_POOL(dns_query_pool, "dns_query", sizeof(struct dns_query));
+DECLARE_STATIC_TYPED_POOL(dns_session_pool, "dns_session", struct dns_session);
+DECLARE_STATIC_TYPED_POOL(dns_query_pool, "dns_query", struct dns_query);
DECLARE_STATIC_POOL(dns_msg_buf, "dns_msg_buf", DNS_TCP_MSG_RING_MAX_SIZE);
/* Opens an UDP socket on the namesaver's IP/Port, if required. Returns 0 on
};
/* memory pools declarations */
-DECLARE_STATIC_POOL(pool_head_sub, "ehdl_sub", sizeof(struct event_hdl_sub));
-DECLARE_STATIC_POOL(pool_head_sub_event, "ehdl_sub_e", sizeof(struct event_hdl_async_event));
-DECLARE_STATIC_POOL(pool_head_sub_event_data, "ehdl_sub_ed", sizeof(struct event_hdl_async_event_data));
-DECLARE_STATIC_POOL(pool_head_sub_taskctx, "ehdl_sub_tctx", sizeof(struct event_hdl_async_task_default_ctx));
+DECLARE_STATIC_TYPED_POOL(pool_head_sub, "ehdl_sub", struct event_hdl_sub);
+DECLARE_STATIC_TYPED_POOL(pool_head_sub_event, "ehdl_sub_e", struct event_hdl_async_event);
+DECLARE_STATIC_TYPED_POOL(pool_head_sub_event_data, "ehdl_sub_ed", struct event_hdl_async_event_data);
+DECLARE_STATIC_TYPED_POOL(pool_head_sub_taskctx, "ehdl_sub_tctx", struct event_hdl_async_task_default_ctx);
/* global event_hdl tunables (public variable) */
struct event_hdl_tune event_hdl_tune;
struct flt_ops fcgi_flt_ops;
const char *fcgi_flt_id = "FCGI filter";
-DECLARE_STATIC_POOL(pool_head_fcgi_flt_ctx, "fcgi_flt_ctx", sizeof(struct fcgi_flt_ctx));
-DECLARE_STATIC_POOL(pool_head_fcgi_param_rule, "fcgi_param_rule", sizeof(struct fcgi_param_rule));
-DECLARE_STATIC_POOL(pool_head_fcgi_hdr_rule, "fcgi_hdr_rule", sizeof(struct fcgi_hdr_rule));
+DECLARE_STATIC_TYPED_POOL(pool_head_fcgi_flt_ctx, "fcgi_flt_ctx", struct fcgi_flt_ctx);
+DECLARE_STATIC_TYPED_POOL(pool_head_fcgi_param_rule, "fcgi_param_rule", struct fcgi_param_rule);
+DECLARE_STATIC_TYPED_POOL(pool_head_fcgi_hdr_rule, "fcgi_hdr_rule", struct fcgi_hdr_rule);
/**************************************************************************/
/***************************** Uitls **************************************/
#define TRACE_SOURCE &trace_strm
/* Pool used to allocate filters */
-DECLARE_STATIC_POOL(pool_head_filter, "filter", sizeof(struct filter));
+DECLARE_STATIC_TYPED_POOL(pool_head_filter, "filter", struct filter);
static int handle_analyzer_result(struct stream *s, struct channel *chn, unsigned int an_bit, int ret);
/* Pools used to allocate comp_state structs */
-DECLARE_STATIC_POOL(pool_head_bwlim_state, "bwlim_state", sizeof(struct bwlim_state));
+DECLARE_STATIC_TYPED_POOL(pool_head_bwlim_state, "bwlim_state", struct bwlim_state);
/* Apply the bandwidth limitation of the filter <filter>. <len> is the maximum
};
/* Pools used to allocate comp_state structs */
-DECLARE_STATIC_POOL(pool_head_comp_state, "comp_state", sizeof(struct comp_state));
+DECLARE_STATIC_TYPED_POOL(pool_head_comp_state, "comp_state", struct comp_state);
static THREAD_LOCAL struct buffer tmpbuf;
static THREAD_LOCAL struct buffer zbuf;
int curpxopts2;
/* Pools used to allocate SPOE structs */
-DECLARE_STATIC_POOL(pool_head_spoe_ctx, "spoe_ctx", sizeof(struct spoe_context));
-DECLARE_STATIC_POOL(pool_head_spoe_appctx, "spoe_appctx", sizeof(struct spoe_appctx));
+DECLARE_STATIC_TYPED_POOL(pool_head_spoe_ctx, "spoe_ctx", struct spoe_context);
+DECLARE_STATIC_TYPED_POOL(pool_head_spoe_appctx, "spoe_appctx", struct spoe_appctx);
struct flt_ops spoe_ops;
struct h3_counters *prx_counters;
};
-DECLARE_STATIC_POOL(pool_head_h3c, "h3c", sizeof(struct h3c));
+DECLARE_STATIC_TYPED_POOL(pool_head_h3c, "h3c", struct h3c);
#define H3_SF_UNI_INIT 0x00000001 /* stream type not parsed for unidirectional stream */
#define H3_SF_UNI_NO_H3 0x00000002 /* unidirectional stream does not carry H3 frames */
int err; /* used for stream reset */
};
-DECLARE_STATIC_POOL(pool_head_h3s, "h3s", sizeof(struct h3s));
+DECLARE_STATIC_TYPED_POOL(pool_head_h3s, "h3s", struct h3s);
/* Initialize an uni-stream <qcs> by reading its type from <b>.
*
struct hlua_function *fcn;
};
-DECLARE_STATIC_POOL(pool_head_hlua_flt_ctx, "hlua_flt_ctx", sizeof(struct hlua_flt_ctx));
+DECLARE_STATIC_TYPED_POOL(pool_head_hlua_flt_ctx, "hlua_flt_ctx", struct hlua_flt_ctx);
static int hlua_filter_from_payload(struct filter *filter);
/* This is the memory pool containing struct lua for applets
* (including cli).
*/
-DECLARE_STATIC_POOL(pool_head_hlua, "hlua", sizeof(struct hlua));
+DECLARE_STATIC_TYPED_POOL(pool_head_hlua, "hlua", struct hlua);
/* Used for Socket connection. */
static struct proxy *socket_proxy;
/* This is the memory pool containing struct hlua_event_sub
* for event subscriptions from lua
*/
-DECLARE_STATIC_POOL(pool_head_hlua_event_sub, "hlua_esub", sizeof(struct hlua_event_sub));
+DECLARE_STATIC_TYPED_POOL(pool_head_hlua_event_sub, "hlua_esub", struct hlua_event_sub);
/* These functions converts types between HAProxy internal args or
* sample and LUA types. Another function permits to check if the
/* This is the memory pool containing struct hlua_queue_item (queue items)
*/
-DECLARE_STATIC_POOL(pool_head_hlua_queue, "hlua_queue", sizeof(struct hlua_queue_item));
+DECLARE_STATIC_TYPED_POOL(pool_head_hlua_queue, "hlua_queue", struct hlua_queue_item);
static struct hlua_queue *hlua_check_queue(lua_State *L, int ud)
{
}
-DECLARE_POOL(pool_head_http_txn, "http_txn", sizeof(struct http_txn));
+DECLARE_TYPED_POOL(pool_head_http_txn, "http_txn", struct http_txn);
/*
* Local variables:
unsigned int elements;
};
-DECLARE_STATIC_POOL(pool_head_fwlc_elt, "fwlc_tree_elt", sizeof(struct fwlc_tree_elt));
+DECLARE_STATIC_TYPED_POOL(pool_head_fwlc_elt, "fwlc_tree_elt", struct fwlc_tree_elt);
#define FWLC_LBPRM_SEQ(lbprm) ((lbprm) & 0xffffffff)
#define FWLC_LBPRM_SMALLEST(lbprm) ((lbprm) >> 32)
INITCALL1(STG_REGISTER, trace_register_source, TRACE_SOURCE);
/* FCGI connection and stream pools */
-DECLARE_STATIC_POOL(pool_head_fcgi_conn, "fcgi_conn", sizeof(struct fcgi_conn));
-DECLARE_STATIC_POOL(pool_head_fcgi_strm, "fcgi_strm", sizeof(struct fcgi_strm));
+DECLARE_STATIC_TYPED_POOL(pool_head_fcgi_conn, "fcgi_conn", struct fcgi_conn);
+DECLARE_STATIC_TYPED_POOL(pool_head_fcgi_strm, "fcgi_strm", struct fcgi_strm);
struct task *fcgi_timeout_task(struct task *t, void *context, unsigned int state);
static int fcgi_process(struct fcgi_conn *fconn);
/* the h1c and h1s pools */
-DECLARE_STATIC_POOL(pool_head_h1c, "h1c", sizeof(struct h1c));
-DECLARE_STATIC_POOL(pool_head_h1s, "h1s", sizeof(struct h1s));
+DECLARE_STATIC_TYPED_POOL(pool_head_h1c, "h1c", struct h1c);
+DECLARE_STATIC_TYPED_POOL(pool_head_h1s, "h1s", struct h1s);
static int h1_recv(struct h1c *h1c);
static int h1_send(struct h1c *h1c);
INITCALL1(STG_REGISTER, stats_register_module, &h2_stats_module);
/* the h2c connection pool */
-DECLARE_STATIC_POOL(pool_head_h2c, "h2c", sizeof(struct h2c));
+DECLARE_STATIC_TYPED_POOL(pool_head_h2c, "h2c", struct h2c);
/* the h2s stream pool */
-DECLARE_STATIC_POOL(pool_head_h2s, "h2s", sizeof(struct h2s));
+DECLARE_STATIC_TYPED_POOL(pool_head_h2s, "h2s", struct h2s);
/* the shared rx_bufs pool */
struct pool_head *pool_head_h2_rx_bufs __read_mostly = NULL;
struct wait_event wait_event;
};
-DECLARE_STATIC_POOL(pool_head_pt_ctx, "mux_pt", sizeof(struct mux_pt_ctx));
+DECLARE_STATIC_TYPED_POOL(pool_head_pt_ctx, "mux_pt", struct mux_pt_ctx);
/* trace source and events */
static void pt_trace(enum trace_level level, uint64_t mask,
#include <haproxy/trace.h>
#include <haproxy/xref.h>
-DECLARE_POOL(pool_head_qcc, "qcc", sizeof(struct qcc));
-DECLARE_POOL(pool_head_qcs, "qcs", sizeof(struct qcs));
-DECLARE_STATIC_POOL(pool_head_qc_stream_rxbuf, "qc_stream_rxbuf", sizeof(struct qc_stream_rxbuf));
+DECLARE_TYPED_POOL(pool_head_qcc, "qcc", struct qcc);
+DECLARE_TYPED_POOL(pool_head_qcs, "qcs", struct qcs);
+DECLARE_STATIC_TYPED_POOL(pool_head_qc_stream_rxbuf, "qc_stream_rxbuf", struct qc_stream_rxbuf);
static void qmux_ctrl_send(struct qc_stream_desc *, uint64_t data, uint64_t offset);
static void qmux_ctrl_room(struct qc_stream_desc *, uint64_t room);
INITCALL1(STG_REGISTER, trace_register_source, TRACE_SOURCE);
/* SPOP connection and stream pools */
-DECLARE_STATIC_POOL(pool_head_spop_conn, "spop_conn", sizeof(struct spop_conn));
-DECLARE_STATIC_POOL(pool_head_spop_strm, "spop_strm", sizeof(struct spop_strm));
+DECLARE_STATIC_TYPED_POOL(pool_head_spop_conn, "spop_conn", struct spop_conn);
+DECLARE_STATIC_TYPED_POOL(pool_head_spop_strm, "spop_strm", struct spop_strm);
const struct ist spop_err_reasons[SPOP_ERR_ENTRIES] = {
#include <haproxy/thread.h>
-DECLARE_STATIC_POOL(pool_head_pipe, "pipe", sizeof(struct pipe));
+DECLARE_STATIC_TYPED_POOL(pool_head_pipe, "pipe", struct pipe);
struct pipe *pipes_live = NULL; /* pipes which are still ready to use */
#define KEY_CLASS_OFFSET_BOUNDARY(key) (KEY_CLASS(key) | NOW_OFFSET_BOUNDARY())
#define MAKE_KEY(class, offset) (((u32)(class + 0x7ff) << 20) | ((u32)(now_ms + offset) & 0xfffff))
-DECLARE_POOL(pool_head_pendconn, "pendconn", sizeof(struct pendconn));
+DECLARE_TYPED_POOL(pool_head_pendconn, "pendconn", struct pendconn);
/* returns the effective dynamic maxconn for a server, considering the minconn
* and the proxy's usage relative to its dynamic connections limit. It is
#include <haproxy/quic_trace.h>
#include <haproxy/trace.h>
-DECLARE_STATIC_POOL(pool_head_quic_arng, "quic_arng", sizeof(struct quic_arng_node));
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_arng, "quic_arng", struct quic_arng_node);
/* Deallocate <l> list of ACK ranges. */
void quic_free_arngs(struct quic_conn *qc, struct quic_arngs *arngs)
*/
const struct quic_version quic_version_VN_reserved = { .num = 0, };
-DECLARE_STATIC_POOL(pool_head_quic_conn, "quic_conn", sizeof(struct quic_conn));
-DECLARE_STATIC_POOL(pool_head_quic_conn_closed, "quic_conn_closed", sizeof(struct quic_conn_closed));
-DECLARE_STATIC_POOL(pool_head_quic_cids, "quic_cids", sizeof(struct eb_root));
-DECLARE_POOL(pool_head_quic_connection_id,
- "quic_connection_id", sizeof(struct quic_connection_id));
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_conn, "quic_conn", struct quic_conn);
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_conn_closed, "quic_conn_closed", struct quic_conn_closed);
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_cids, "quic_cids", struct eb_root);
+DECLARE_TYPED_POOL(pool_head_quic_connection_id, "quic_connection_id", struct quic_connection_id);
struct task *quic_conn_app_io_cb(struct task *t, void *context, unsigned int state);
static int quic_conn_init_timer(struct quic_conn *qc);
#include <haproxy/quic_tx.h>
#include <haproxy/trace.h>
-DECLARE_POOL(pool_head_quic_frame, "quic_frame", sizeof(struct quic_frame));
-DECLARE_POOL(pool_head_qf_crypto, "qf_crypto", sizeof(struct qf_crypto));
+DECLARE_TYPED_POOL(pool_head_quic_frame, "quic_frame", struct quic_frame);
+DECLARE_TYPED_POOL(pool_head_qf_crypto, "qf_crypto", struct qf_crypto);
const char *quic_frame_type_string(enum quic_frame_type ft)
{
#include <haproxy/trace.h>
DECLARE_POOL(pool_head_quic_conn_rxbuf, "quic_conn_rxbuf", QUIC_CONN_RX_BUFSZ);
-DECLARE_POOL(pool_head_quic_dgram, "quic_dgram", sizeof(struct quic_dgram));
-DECLARE_POOL(pool_head_quic_rx_packet, "quic_rx_packet", sizeof(struct quic_rx_packet));
+DECLARE_TYPED_POOL(pool_head_quic_dgram, "quic_dgram", struct quic_dgram);
+DECLARE_TYPED_POOL(pool_head_quic_rx_packet, "quic_rx_packet", struct quic_rx_packet);
/* Decode an expected packet number from <truncated_on> its truncated value,
* depending on <largest_pn> the largest received packet number, and <pn_nbits>
#include <haproxy/ssl_sock.h>
#include <haproxy/trace.h>
-DECLARE_POOL(pool_head_quic_ssl_sock_ctx, "quic_ssl_sock_ctx", sizeof(struct ssl_sock_ctx));
+DECLARE_TYPED_POOL(pool_head_quic_ssl_sock_ctx, "quic_ssl_sock_ctx", struct ssl_sock_ctx);
const char *quic_ciphers = "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384"
":TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_CCM_SHA256";
#ifdef HAVE_OPENSSL_QUIC
#include <haproxy/quic_utils.h>
#include <haproxy/task.h>
-DECLARE_STATIC_POOL(pool_head_quic_stream_desc, "qc_stream_desc",
- sizeof(struct qc_stream_desc));
-DECLARE_STATIC_POOL(pool_head_quic_stream_buf, "qc_stream_buf",
- sizeof(struct qc_stream_buf));
-DECLARE_STATIC_POOL(pool_head_quic_stream_ack, "qc_stream_ack",
- sizeof(struct qc_stream_ack));
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_stream_desc, "qc_stream_desc", struct qc_stream_desc);
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_stream_buf, "qc_stream_buf", struct qc_stream_buf);
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_stream_ack, "qc_stream_ack", struct qc_stream_ack);
static struct pool_head *pool_head_sbuf;
#include <haproxy/quic_stream.h>
-DECLARE_POOL(pool_head_quic_enc_level, "quic_enc_level", sizeof(struct quic_enc_level));
-DECLARE_POOL(pool_head_quic_pktns, "quic_pktns", sizeof(struct quic_pktns));
-DECLARE_POOL(pool_head_quic_tls_ctx, "quic_tls_ctx", sizeof(struct quic_tls_ctx));
+DECLARE_TYPED_POOL(pool_head_quic_enc_level, "quic_enc_level", struct quic_enc_level);
+DECLARE_TYPED_POOL(pool_head_quic_pktns, "quic_pktns", struct quic_pktns);
+DECLARE_TYPED_POOL(pool_head_quic_tls_ctx, "quic_tls_ctx", struct quic_tls_ctx);
DECLARE_POOL(pool_head_quic_tls_secret, "quic_tls_secret", QUIC_TLS_SECRET_LEN);
DECLARE_POOL(pool_head_quic_tls_iv, "quic_tls_iv", QUIC_TLS_IV_LEN);
DECLARE_POOL(pool_head_quic_tls_key, "quic_tls_key", QUIC_TLS_KEY_LEN);
-DECLARE_POOL(pool_head_quic_crypto_buf, "quic_crypto_buf", sizeof(struct quic_crypto_buf));
-DECLARE_STATIC_POOL(pool_head_quic_cstream, "quic_cstream", sizeof(struct quic_cstream));
+DECLARE_TYPED_POOL(pool_head_quic_crypto_buf, "quic_crypto_buf", struct quic_crypto_buf);
+DECLARE_STATIC_TYPED_POOL(pool_head_quic_cstream, "quic_cstream", struct quic_cstream);
/* Initial salt depending on QUIC version to derive client/server initial secrets.
* This one is for draft-29 QUIC version.
#include <haproxy/quic_tune.h>
#include <haproxy/ssl_sock-t.h>
-DECLARE_POOL(pool_head_quic_tx_packet, "quic_tx_packet", sizeof(struct quic_tx_packet));
+DECLARE_TYPED_POOL(pool_head_quic_tx_packet, "quic_tx_packet", struct quic_tx_packet);
DECLARE_POOL(pool_head_quic_cc_buf, "quic_cc_buf", QUIC_MAX_CC_BUFSIZE);
static struct quic_tx_packet *qc_build_pkt(unsigned char **pos, const unsigned char *buf_end,
static THREAD_LOCAL uint64_t resolv_query_id_seed = 0; /* random seed */
struct resolvers *curr_resolvers = NULL;
-DECLARE_STATIC_POOL(resolv_answer_item_pool, "resolv_answer_item", sizeof(struct resolv_answer_item));
-DECLARE_STATIC_POOL(resolv_resolution_pool, "resolv_resolution", sizeof(struct resolv_resolution));
-DECLARE_POOL(resolv_requester_pool, "resolv_requester", sizeof(struct resolv_requester));
+DECLARE_STATIC_TYPED_POOL(resolv_answer_item_pool, "resolv_answer_item", struct resolv_answer_item);
+DECLARE_STATIC_TYPED_POOL(resolv_resolution_pool, "resolv_resolution", struct resolv_resolution);
+DECLARE_TYPED_POOL(resolv_requester_pool, "resolv_requester", struct resolv_requester);
static unsigned int resolution_uuid = 1;
unsigned int resolv_failed_resolutions = 0;
#include <haproxy/vars.h>
-DECLARE_POOL(pool_head_session, "session", sizeof(struct session));
-DECLARE_POOL(pool_head_sess_priv_conns, "session priv conns list",
- sizeof(struct sess_priv_conns));
+DECLARE_TYPED_POOL(pool_head_session, "session", struct session);
+DECLARE_TYPED_POOL(pool_head_sess_priv_conns, "session priv conns list", struct sess_priv_conns);
int conn_complete_session(struct connection *conn);
sigset_t blocked_sig;
int signal_pending = 0; /* non-zero if t least one signal remains unprocessed */
-DECLARE_STATIC_POOL(pool_head_sig_handlers, "sig_handlers", sizeof(struct sig_handler));
+DECLARE_STATIC_TYPED_POOL(pool_head_sig_handlers, "sig_handlers", struct sig_handler);
/* Common signal handler, used by all signals. Received signals are queued.
* Signal number zero has a specific status, as it cannot be delivered by the
static BIO_METHOD *ha_meth;
-DECLARE_STATIC_POOL(ssl_sock_ctx_pool, "ssl_sock_ctx", sizeof(struct ssl_sock_ctx));
+DECLARE_STATIC_TYPED_POOL(ssl_sock_ctx_pool, "ssl_sock_ctx", struct ssl_sock_ctx);
DECLARE_POOL(ssl_sock_client_sni_pool, "ssl_sock_client_sni", TLSEXT_MAXLEN_host_name + 1);
#include <haproxy/stconn.h>
#include <haproxy/xref.h>
-DECLARE_POOL(pool_head_connstream, "stconn", sizeof(struct stconn));
-DECLARE_POOL(pool_head_sedesc, "sedesc", sizeof(struct sedesc));
+DECLARE_TYPED_POOL(pool_head_connstream, "stconn", struct stconn);
+DECLARE_TYPED_POOL(pool_head_sedesc, "sedesc", struct sedesc);
/* functions used by default on a detached stream connector */
static void sc_app_abort(struct stconn *sc);
#include <haproxy/vars.h>
-DECLARE_POOL(pool_head_stream, "stream", sizeof(struct stream));
+DECLARE_TYPED_POOL(pool_head_stream, "stream", struct stream);
DECLARE_POOL(pool_head_uniqueid, "uniqueid", UNIQUEID_LEN);
/* incremented by each "show sess" to fix a delimiter between streams */
extern struct task *process_stream(struct task *t, void *context, unsigned int state);
extern void stream_update_timings(struct task *t, uint64_t lat, uint64_t cpu);
-DECLARE_POOL(pool_head_task, "task", sizeof(struct task));
-DECLARE_POOL(pool_head_tasklet, "tasklet", sizeof(struct tasklet));
+DECLARE_TYPED_POOL(pool_head_task, "task", struct task);
+DECLARE_TYPED_POOL(pool_head_tasklet, "tasklet", struct tasklet);
/* This is the memory pool containing all the signal structs. These
* struct are used to store each required signal between two tasks.
*/
-DECLARE_POOL(pool_head_notification, "notification", sizeof(struct notification));
+DECLARE_TYPED_POOL(pool_head_notification, "notification", struct notification);
/* The lock protecting all wait queues at once. For now we have no better
* alternative since a task may have to be removed from a queue and placed
struct eb_root shared_tcpchecks = EB_ROOT;
-DECLARE_POOL(pool_head_tcpcheck_rule, "tcpcheck_rule", sizeof(struct tcpcheck_rule));
+DECLARE_TYPED_POOL(pool_head_tcpcheck_rule, "tcpcheck_rule", struct tcpcheck_rule);
/**************************************************************************/
/*************** Init/deinit tcp-check rules and ruleset ******************/
/* This contains a pool of struct vars */
-DECLARE_STATIC_POOL(var_pool, "vars", sizeof(struct var));
+DECLARE_STATIC_TYPED_POOL(var_pool, "vars", struct var);
/* list of variables for the process scope. */
struct vars proc_vars THREAD_ALIGNED(64);
void *xprt_ctx;
};
-DECLARE_STATIC_POOL(xprt_handshake_ctx_pool, "xprt_handshake_ctx", sizeof(struct xprt_handshake_ctx));
+DECLARE_STATIC_TYPED_POOL(xprt_handshake_ctx_pool, "xprt_handshake_ctx", struct xprt_handshake_ctx);
/* This XPRT doesn't take care of sending or receiving data, once its handshake
* is done, it just removes itself