]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: listener: export accept_queue_process
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 11:25:23 +0000 (12:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 11:25:23 +0000 (12:25 +0100)
This is only to make it resolve in "show tasks".

include/haproxy/listener.h
src/listener.c
src/tools.c

index 44213630f6eed391fe70ee6f06646c9b58a04580..cebc21c8831ec69db065f7b15667b6ad335a1be9 100644 (file)
@@ -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 */
index 397b3bed546424350ba922727cd8fecb55047b4a..6714e91cfacf1a3c04fa5a8c248a7fa502e72b7d 100644 (file)
@@ -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;
index f2f456fc2a97e926e9421b0ac3572610bfad6f4f..8891d472de8a97273b8926be2a04e4b6964737ac 100644 (file)
@@ -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