From fb5401f2967fb31a282e5abacc059f5b806366d9 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 29 Jan 2021 12:25:23 +0100 Subject: [PATCH] MINOR: listener: export accept_queue_process This is only to make it resolve in "show tasks". --- include/haproxy/listener.h | 2 ++ src/listener.c | 6 ++++-- src/tools.c | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/haproxy/listener.h b/include/haproxy/listener.h index 4421363..cebc21c 100644 --- a/include/haproxy/listener.h +++ b/include/haproxy/listener.h @@ -213,6 +213,8 @@ static inline const char *listener_state_str(const struct listener *l) return states[st]; } +struct task *accept_queue_process(struct task *t, void *context, unsigned short state); + extern struct accept_queue_ring accept_queue_rings[MAX_THREADS] __attribute__((aligned(64))); #endif /* _HAPROXY_LISTENER_H */ diff --git a/src/listener.c b/src/listener.c index 397b3be..6714e91 100644 --- a/src/listener.c +++ b/src/listener.c @@ -112,8 +112,10 @@ int accept_queue_push_mp(struct accept_queue_ring *ring, struct connection *conn return 1; } -/* proceed with accepting new connections */ -static struct task *accept_queue_process(struct task *t, void *context, unsigned short state) +/* proceed with accepting new connections. Don't mark it static so that it appears + * in task dumps. + */ +struct task *accept_queue_process(struct task *t, void *context, unsigned short state) { struct accept_queue_ring *ring = context; struct connection *conn; diff --git a/src/tools.c b/src/tools.c index f2f456f..8891d47 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4699,6 +4699,9 @@ const void *resolve_sym_name(struct buffer *buf, const char *pfx, const void *ad { .func = listener_accept, .name = "listener_accept" }, { .func = poller_pipe_io_handler, .name = "poller_pipe_io_handler" }, { .func = mworker_accept_wrapper, .name = "mworker_accept_wrapper" }, +#ifdef USE_THREAD + { .func = accept_queue_process, .name = "accept_queue_process" }, +#endif #ifdef USE_LUA { .func = hlua_process_task, .name = "hlua_process_task" }, #endif -- 1.7.10.4