diff --git a/include/haproxy/listener.h b/include/haproxy/listener.h index cebc21c88..1be8551c3 100644 --- a/include/haproxy/listener.h +++ b/include/haproxy/listener.h @@ -214,6 +214,7 @@ static inline const char *listener_state_str(const struct listener *l) } struct task *accept_queue_process(struct task *t, void *context, unsigned short state); +struct task *manage_global_listener_queue(struct task *t, void *context, unsigned short state); extern struct accept_queue_ring accept_queue_rings[MAX_THREADS] __attribute__((aligned(64))); diff --git a/src/listener.c b/src/listener.c index 6714e91cf..0b929b906 100644 --- a/src/listener.c +++ b/src/listener.c @@ -45,7 +45,6 @@ static struct bind_kw_list bind_keywords = { /* list of the temporarily limited listeners because of lack of resource */ static struct mt_list global_listener_queue = MT_LIST_HEAD_INIT(global_listener_queue); static struct task *global_listener_queue_task; -static struct task *manage_global_listener_queue(struct task *t, void *context, unsigned short state); #if defined(USE_THREAD) @@ -1150,9 +1149,10 @@ REGISTER_POST_DEINIT(listener_queue_deinit); /* This is the global management task for listeners. It enables listeners waiting * for global resources when there are enough free resource, or at least once in - * a while. It is designed to be called as a task. + * a while. It is designed to be called as a task. It's exported so that it's easy + * to spot in "show tasks" or "show profiling". */ -static struct task *manage_global_listener_queue(struct task *t, void *context, unsigned short state) +struct task *manage_global_listener_queue(struct task *t, void *context, unsigned short state) { /* If there are still too many concurrent connections, let's wait for * some of them to go away. We don't need to re-arm the timer because diff --git a/src/tools.c b/src/tools.c index 4ad6b95e0..8fef15b4d 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4697,6 +4697,7 @@ const void *resolve_sym_name(struct buffer *buf, const char *pfx, const void *ad { .func = sock_conn_iocb, .name = "sock_conn_iocb" }, { .func = dgram_fd_handler, .name = "dgram_fd_handler" }, { .func = listener_accept, .name = "listener_accept" }, + { .func = manage_global_listener_queue, .name = "manage_global_listener_queue" }, { .func = poller_pipe_io_handler, .name = "poller_pipe_io_handler" }, { .func = mworker_accept_wrapper, .name = "mworker_accept_wrapper" }, { .func = session_expire_embryonic, .name = "session_expire_embryonic" },