/src/haproxy/include/haproxy/fd.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * include/haproxy/fd.h |
3 | | * File descriptors states - exported variables and functions |
4 | | * |
5 | | * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu |
6 | | * |
7 | | * This library is free software; you can redistribute it and/or |
8 | | * modify it under the terms of the GNU Lesser General Public |
9 | | * License as published by the Free Software Foundation, version 2.1 |
10 | | * exclusively. |
11 | | * |
12 | | * This library is distributed in the hope that it will be useful, |
13 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | | * Lesser General Public License for more details. |
16 | | * |
17 | | * You should have received a copy of the GNU Lesser General Public |
18 | | * License along with this library; if not, write to the Free Software |
19 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | | */ |
21 | | |
22 | | #ifndef _HAPROXY_FD_H |
23 | | #define _HAPROXY_FD_H |
24 | | |
25 | | #include <sys/time.h> |
26 | | #include <sys/types.h> |
27 | | #include <stdio.h> |
28 | | #include <unistd.h> |
29 | | #include <import/ist.h> |
30 | | #include <haproxy/api.h> |
31 | | #include <haproxy/atomic.h> |
32 | | #include <haproxy/fd-t.h> |
33 | | #include <haproxy/global.h> |
34 | | #include <haproxy/thread.h> |
35 | | |
36 | | /* public variables */ |
37 | | |
38 | | extern struct poller cur_poller; /* the current poller */ |
39 | | extern int nbpollers; |
40 | | extern struct poller pollers[MAX_POLLERS]; /* all registered pollers */ |
41 | | extern struct fdtab *fdtab; /* array of all the file descriptors */ |
42 | | extern struct fdinfo *fdinfo; /* less-often used infos for file descriptors */ |
43 | | extern int totalconn; /* total # of terminated sessions */ |
44 | | extern int actconn; /* # of active sessions */ |
45 | | |
46 | | extern volatile struct fdlist update_list[MAX_TGROUPS]; |
47 | | extern struct polled_mask *polled_mask; |
48 | | |
49 | | extern THREAD_LOCAL int *fd_updt; // FD updates list |
50 | | extern THREAD_LOCAL int fd_nbupdt; // number of updates in the list |
51 | | extern THREAD_LOCAL int fd_highest;// highest FD known by the current thread |
52 | | |
53 | | extern int poller_wr_pipe[MAX_THREADS]; |
54 | | |
55 | | extern volatile int ha_used_fds; // Number of FDs we're currently using |
56 | | |
57 | | /* Deletes an FD from the fdsets. |
58 | | * The file descriptor is also closed. |
59 | | */ |
60 | | void fd_delete(int fd); |
61 | | void _fd_delete_orphan(int fd); |
62 | | |
63 | | /* makes the new fd non-blocking and clears all other O_* flags; |
64 | | * this is meant to be used on new FDs. Returns -1 on failure. |
65 | | */ |
66 | | int fd_set_nonblock(int fd); |
67 | | |
68 | | /* makes the fd close-on-exec; returns -1 on failure. */ |
69 | | int fd_set_cloexec(int fd); |
70 | | |
71 | | /* Migrate a FD to a new thread <new_tid>. */ |
72 | | void fd_migrate_on(int fd, uint new_tid); |
73 | | |
74 | | /* |
75 | | * Take over a FD belonging to another thread. |
76 | | * Returns 0 on success, and -1 on failure. |
77 | | */ |
78 | | int fd_takeover(int fd, void *expected_owner); |
79 | | |
80 | | ssize_t fd_write_frag_line(int fd, size_t maxlen, const struct ist pfx[], size_t npfx, const struct ist msg[], size_t nmsg, int nl); |
81 | | |
82 | | /* close all FDs starting from <start> */ |
83 | | void my_closefrom(int start); |
84 | | |
85 | | int compute_poll_timeout(int next); |
86 | | void fd_leaving_poll(int wait_time, int status); |
87 | | |
88 | | /* disable the specified poller */ |
89 | | void disable_poller(const char *poller_name); |
90 | | |
91 | | void poller_pipe_io_handler(int fd); |
92 | | |
93 | | /* |
94 | | * Initialize the pollers till the best one is found. |
95 | | * If none works, returns 0, otherwise 1. |
96 | | * The pollers register themselves just before main() is called. |
97 | | */ |
98 | | int init_pollers(void); |
99 | | |
100 | | /* |
101 | | * Deinitialize the pollers. |
102 | | */ |
103 | | void deinit_pollers(void); |
104 | | |
105 | | /* |
106 | | * Some pollers may lose their connection after a fork(). It may be necessary |
107 | | * to create initialize part of them again. Returns 0 in case of failure, |
108 | | * otherwise 1. The fork() function may be NULL if unused. In case of error, |
109 | | * the the current poller is destroyed and the caller is responsible for trying |
110 | | * another one by calling init_pollers() again. |
111 | | */ |
112 | | int fork_poller(void); |
113 | | |
114 | | /* |
115 | | * Lists the known pollers on <out>. |
116 | | * Should be performed only before initialization. |
117 | | */ |
118 | | int list_pollers(FILE *out); |
119 | | |
120 | | /* |
121 | | * Runs the polling loop |
122 | | */ |
123 | | void run_poller(); |
124 | | |
125 | | void fd_add_to_fd_list(volatile struct fdlist *list, int fd); |
126 | | void fd_rm_from_fd_list(volatile struct fdlist *list, int fd); |
127 | | void updt_fd_polling(const int fd); |
128 | | int fd_update_events(int fd, uint evts); |
129 | | void fd_reregister_all(int tgrp, ulong mask); |
130 | | |
131 | | /* Called from the poller to acknowledge we read an entry from the global |
132 | | * update list, to remove our bit from the update_mask, and remove it from |
133 | | * the list if we were the last one. |
134 | | */ |
135 | | static inline void done_update_polling(int fd) |
136 | 0 | { |
137 | 0 | unsigned long update_mask; |
138 | 0 |
|
139 | 0 | update_mask = _HA_ATOMIC_AND_FETCH(&fdtab[fd].update_mask, ~ti->ltid_bit); |
140 | 0 | while ((update_mask & _HA_ATOMIC_LOAD(&tg->threads_enabled)) == 0) { |
141 | 0 | /* If we were the last one that had to update that entry, remove it from the list */ |
142 | 0 | fd_rm_from_fd_list(&update_list[tgid - 1], fd); |
143 | 0 | update_mask = _HA_ATOMIC_LOAD(&fdtab[fd].update_mask); |
144 | 0 | if ((update_mask & _HA_ATOMIC_LOAD(&tg->threads_enabled)) != 0) { |
145 | 0 | /* Maybe it's been re-updated in the meanwhile, and we |
146 | 0 | * wrongly removed it from the list, if so, re-add it |
147 | 0 | */ |
148 | 0 | fd_add_to_fd_list(&update_list[tgid - 1], fd); |
149 | 0 | update_mask = _HA_ATOMIC_LOAD(&fdtab[fd].update_mask); |
150 | 0 | /* And then check again, just in case after all it |
151 | 0 | * should be removed, even if it's very unlikely, given |
152 | 0 | * the current thread wouldn't have been able to take |
153 | 0 | * care of it yet */ |
154 | 0 | } else |
155 | 0 | break; |
156 | 0 | } |
157 | 0 | } Unexecuted instantiation: cfgparse.c:done_update_polling Unexecuted instantiation: cli.c:done_update_polling Unexecuted instantiation: connection.c:done_update_polling Unexecuted instantiation: debug.c:done_update_polling Unexecuted instantiation: errors.c:done_update_polling Unexecuted instantiation: fd.c:done_update_polling Unexecuted instantiation: filters.c:done_update_polling Unexecuted instantiation: flt_http_comp.c:done_update_polling Unexecuted instantiation: frontend.c:done_update_polling Unexecuted instantiation: haproxy.c:done_update_polling Unexecuted instantiation: http_ana.c:done_update_polling Unexecuted instantiation: http_ext.c:done_update_polling Unexecuted instantiation: http_htx.c:done_update_polling Unexecuted instantiation: http_rules.c:done_update_polling Unexecuted instantiation: lb_chash.c:done_update_polling Unexecuted instantiation: lb_fwlc.c:done_update_polling Unexecuted instantiation: limits.c:done_update_polling Unexecuted instantiation: listener.c:done_update_polling Unexecuted instantiation: log.c:done_update_polling Unexecuted instantiation: mailers.c:done_update_polling Unexecuted instantiation: mworker.c:done_update_polling Unexecuted instantiation: peers.c:done_update_polling Unexecuted instantiation: pool.c:done_update_polling Unexecuted instantiation: proto_rhttp.c:done_update_polling Unexecuted instantiation: proto_sockpair.c:done_update_polling Unexecuted instantiation: proxy.c:done_update_polling Unexecuted instantiation: queue.c:done_update_polling Unexecuted instantiation: resolvers.c:done_update_polling Unexecuted instantiation: ring.c:done_update_polling Unexecuted instantiation: sample.c:done_update_polling Unexecuted instantiation: server.c:done_update_polling Unexecuted instantiation: session.c:done_update_polling Unexecuted instantiation: signal.c:done_update_polling Unexecuted instantiation: sink.c:done_update_polling Unexecuted instantiation: sock.c:done_update_polling Unexecuted instantiation: sock_inet.c:done_update_polling Unexecuted instantiation: stats-html.c:done_update_polling Unexecuted instantiation: stats.c:done_update_polling Unexecuted instantiation: stconn.c:done_update_polling Unexecuted instantiation: stick_table.c:done_update_polling Unexecuted instantiation: stream.c:done_update_polling Unexecuted instantiation: task.c:done_update_polling Unexecuted instantiation: tcp_rules.c:done_update_polling Unexecuted instantiation: tcpcheck.c:done_update_polling Unexecuted instantiation: thread.c:done_update_polling Unexecuted instantiation: tools.c:done_update_polling Unexecuted instantiation: trace.c:done_update_polling Unexecuted instantiation: vars.c:done_update_polling Unexecuted instantiation: action.c:done_update_polling Unexecuted instantiation: activity.c:done_update_polling Unexecuted instantiation: applet.c:done_update_polling Unexecuted instantiation: backend.c:done_update_polling Unexecuted instantiation: cache.c:done_update_polling Unexecuted instantiation: cfgparse-global.c:done_update_polling Unexecuted instantiation: cfgparse-listen.c:done_update_polling Unexecuted instantiation: channel.c:done_update_polling Unexecuted instantiation: check.c:done_update_polling Unexecuted instantiation: compression.c:done_update_polling Unexecuted instantiation: dgram.c:done_update_polling Unexecuted instantiation: dns.c:done_update_polling Unexecuted instantiation: dns_ring.c:done_update_polling Unexecuted instantiation: event_hdl.c:done_update_polling Unexecuted instantiation: extcheck.c:done_update_polling Unexecuted instantiation: fcgi-app.c:done_update_polling Unexecuted instantiation: http_fetch.c:done_update_polling Unexecuted instantiation: mux_spop.c:done_update_polling Unexecuted instantiation: pattern.c:done_update_polling Unexecuted instantiation: payload.c:done_update_polling Unexecuted instantiation: proto_tcp.c:done_update_polling Unexecuted instantiation: stats-json.c:done_update_polling Unexecuted instantiation: stats-proxy.c:done_update_polling Unexecuted instantiation: flt_spoe.c:done_update_polling |
158 | | |
159 | | /* |
160 | | * returns true if the FD is active for recv |
161 | | */ |
162 | | static inline int fd_recv_active(const int fd) |
163 | 0 | { |
164 | 0 | return (unsigned)fdtab[fd].state & FD_EV_ACTIVE_R; |
165 | 0 | } Unexecuted instantiation: cfgparse.c:fd_recv_active Unexecuted instantiation: cli.c:fd_recv_active Unexecuted instantiation: connection.c:fd_recv_active Unexecuted instantiation: debug.c:fd_recv_active Unexecuted instantiation: errors.c:fd_recv_active Unexecuted instantiation: fd.c:fd_recv_active Unexecuted instantiation: filters.c:fd_recv_active Unexecuted instantiation: flt_http_comp.c:fd_recv_active Unexecuted instantiation: frontend.c:fd_recv_active Unexecuted instantiation: haproxy.c:fd_recv_active Unexecuted instantiation: http_ana.c:fd_recv_active Unexecuted instantiation: http_ext.c:fd_recv_active Unexecuted instantiation: http_htx.c:fd_recv_active Unexecuted instantiation: http_rules.c:fd_recv_active Unexecuted instantiation: lb_chash.c:fd_recv_active Unexecuted instantiation: lb_fwlc.c:fd_recv_active Unexecuted instantiation: limits.c:fd_recv_active Unexecuted instantiation: listener.c:fd_recv_active Unexecuted instantiation: log.c:fd_recv_active Unexecuted instantiation: mailers.c:fd_recv_active Unexecuted instantiation: mworker.c:fd_recv_active Unexecuted instantiation: peers.c:fd_recv_active Unexecuted instantiation: pool.c:fd_recv_active Unexecuted instantiation: proto_rhttp.c:fd_recv_active Unexecuted instantiation: proto_sockpair.c:fd_recv_active Unexecuted instantiation: proxy.c:fd_recv_active Unexecuted instantiation: queue.c:fd_recv_active Unexecuted instantiation: resolvers.c:fd_recv_active Unexecuted instantiation: ring.c:fd_recv_active Unexecuted instantiation: sample.c:fd_recv_active Unexecuted instantiation: server.c:fd_recv_active Unexecuted instantiation: session.c:fd_recv_active Unexecuted instantiation: signal.c:fd_recv_active Unexecuted instantiation: sink.c:fd_recv_active Unexecuted instantiation: sock.c:fd_recv_active Unexecuted instantiation: sock_inet.c:fd_recv_active Unexecuted instantiation: stats-html.c:fd_recv_active Unexecuted instantiation: stats.c:fd_recv_active Unexecuted instantiation: stconn.c:fd_recv_active Unexecuted instantiation: stick_table.c:fd_recv_active Unexecuted instantiation: stream.c:fd_recv_active Unexecuted instantiation: task.c:fd_recv_active Unexecuted instantiation: tcp_rules.c:fd_recv_active Unexecuted instantiation: tcpcheck.c:fd_recv_active Unexecuted instantiation: thread.c:fd_recv_active Unexecuted instantiation: tools.c:fd_recv_active Unexecuted instantiation: trace.c:fd_recv_active Unexecuted instantiation: vars.c:fd_recv_active Unexecuted instantiation: action.c:fd_recv_active Unexecuted instantiation: activity.c:fd_recv_active Unexecuted instantiation: applet.c:fd_recv_active Unexecuted instantiation: backend.c:fd_recv_active Unexecuted instantiation: cache.c:fd_recv_active Unexecuted instantiation: cfgparse-global.c:fd_recv_active Unexecuted instantiation: cfgparse-listen.c:fd_recv_active Unexecuted instantiation: channel.c:fd_recv_active Unexecuted instantiation: check.c:fd_recv_active Unexecuted instantiation: compression.c:fd_recv_active Unexecuted instantiation: dgram.c:fd_recv_active Unexecuted instantiation: dns.c:fd_recv_active Unexecuted instantiation: dns_ring.c:fd_recv_active Unexecuted instantiation: event_hdl.c:fd_recv_active Unexecuted instantiation: extcheck.c:fd_recv_active Unexecuted instantiation: fcgi-app.c:fd_recv_active Unexecuted instantiation: http_fetch.c:fd_recv_active Unexecuted instantiation: mux_spop.c:fd_recv_active Unexecuted instantiation: pattern.c:fd_recv_active Unexecuted instantiation: payload.c:fd_recv_active Unexecuted instantiation: proto_tcp.c:fd_recv_active Unexecuted instantiation: stats-json.c:fd_recv_active Unexecuted instantiation: stats-proxy.c:fd_recv_active Unexecuted instantiation: flt_spoe.c:fd_recv_active |
166 | | |
167 | | /* |
168 | | * returns true if the FD is ready for recv |
169 | | */ |
170 | | static inline int fd_recv_ready(const int fd) |
171 | 0 | { |
172 | 0 | return (unsigned)fdtab[fd].state & FD_EV_READY_R; |
173 | 0 | } Unexecuted instantiation: cfgparse.c:fd_recv_ready Unexecuted instantiation: cli.c:fd_recv_ready Unexecuted instantiation: connection.c:fd_recv_ready Unexecuted instantiation: debug.c:fd_recv_ready Unexecuted instantiation: errors.c:fd_recv_ready Unexecuted instantiation: fd.c:fd_recv_ready Unexecuted instantiation: filters.c:fd_recv_ready Unexecuted instantiation: flt_http_comp.c:fd_recv_ready Unexecuted instantiation: frontend.c:fd_recv_ready Unexecuted instantiation: haproxy.c:fd_recv_ready Unexecuted instantiation: http_ana.c:fd_recv_ready Unexecuted instantiation: http_ext.c:fd_recv_ready Unexecuted instantiation: http_htx.c:fd_recv_ready Unexecuted instantiation: http_rules.c:fd_recv_ready Unexecuted instantiation: lb_chash.c:fd_recv_ready Unexecuted instantiation: lb_fwlc.c:fd_recv_ready Unexecuted instantiation: limits.c:fd_recv_ready Unexecuted instantiation: listener.c:fd_recv_ready Unexecuted instantiation: log.c:fd_recv_ready Unexecuted instantiation: mailers.c:fd_recv_ready Unexecuted instantiation: mworker.c:fd_recv_ready Unexecuted instantiation: peers.c:fd_recv_ready Unexecuted instantiation: pool.c:fd_recv_ready Unexecuted instantiation: proto_rhttp.c:fd_recv_ready Unexecuted instantiation: proto_sockpair.c:fd_recv_ready Unexecuted instantiation: proxy.c:fd_recv_ready Unexecuted instantiation: queue.c:fd_recv_ready Unexecuted instantiation: resolvers.c:fd_recv_ready Unexecuted instantiation: ring.c:fd_recv_ready Unexecuted instantiation: sample.c:fd_recv_ready Unexecuted instantiation: server.c:fd_recv_ready Unexecuted instantiation: session.c:fd_recv_ready Unexecuted instantiation: signal.c:fd_recv_ready Unexecuted instantiation: sink.c:fd_recv_ready Unexecuted instantiation: sock.c:fd_recv_ready Unexecuted instantiation: sock_inet.c:fd_recv_ready Unexecuted instantiation: stats-html.c:fd_recv_ready Unexecuted instantiation: stats.c:fd_recv_ready Unexecuted instantiation: stconn.c:fd_recv_ready Unexecuted instantiation: stick_table.c:fd_recv_ready Unexecuted instantiation: stream.c:fd_recv_ready Unexecuted instantiation: task.c:fd_recv_ready Unexecuted instantiation: tcp_rules.c:fd_recv_ready Unexecuted instantiation: tcpcheck.c:fd_recv_ready Unexecuted instantiation: thread.c:fd_recv_ready Unexecuted instantiation: tools.c:fd_recv_ready Unexecuted instantiation: trace.c:fd_recv_ready Unexecuted instantiation: vars.c:fd_recv_ready Unexecuted instantiation: action.c:fd_recv_ready Unexecuted instantiation: activity.c:fd_recv_ready Unexecuted instantiation: applet.c:fd_recv_ready Unexecuted instantiation: backend.c:fd_recv_ready Unexecuted instantiation: cache.c:fd_recv_ready Unexecuted instantiation: cfgparse-global.c:fd_recv_ready Unexecuted instantiation: cfgparse-listen.c:fd_recv_ready Unexecuted instantiation: channel.c:fd_recv_ready Unexecuted instantiation: check.c:fd_recv_ready Unexecuted instantiation: compression.c:fd_recv_ready Unexecuted instantiation: dgram.c:fd_recv_ready Unexecuted instantiation: dns.c:fd_recv_ready Unexecuted instantiation: dns_ring.c:fd_recv_ready Unexecuted instantiation: event_hdl.c:fd_recv_ready Unexecuted instantiation: extcheck.c:fd_recv_ready Unexecuted instantiation: fcgi-app.c:fd_recv_ready Unexecuted instantiation: http_fetch.c:fd_recv_ready Unexecuted instantiation: mux_spop.c:fd_recv_ready Unexecuted instantiation: pattern.c:fd_recv_ready Unexecuted instantiation: payload.c:fd_recv_ready Unexecuted instantiation: proto_tcp.c:fd_recv_ready Unexecuted instantiation: stats-json.c:fd_recv_ready Unexecuted instantiation: stats-proxy.c:fd_recv_ready Unexecuted instantiation: flt_spoe.c:fd_recv_ready |
174 | | |
175 | | /* |
176 | | * returns true if the FD is active for send |
177 | | */ |
178 | | static inline int fd_send_active(const int fd) |
179 | 0 | { |
180 | 0 | return (unsigned)fdtab[fd].state & FD_EV_ACTIVE_W; |
181 | 0 | } Unexecuted instantiation: cfgparse.c:fd_send_active Unexecuted instantiation: cli.c:fd_send_active Unexecuted instantiation: connection.c:fd_send_active Unexecuted instantiation: debug.c:fd_send_active Unexecuted instantiation: errors.c:fd_send_active Unexecuted instantiation: fd.c:fd_send_active Unexecuted instantiation: filters.c:fd_send_active Unexecuted instantiation: flt_http_comp.c:fd_send_active Unexecuted instantiation: frontend.c:fd_send_active Unexecuted instantiation: haproxy.c:fd_send_active Unexecuted instantiation: http_ana.c:fd_send_active Unexecuted instantiation: http_ext.c:fd_send_active Unexecuted instantiation: http_htx.c:fd_send_active Unexecuted instantiation: http_rules.c:fd_send_active Unexecuted instantiation: lb_chash.c:fd_send_active Unexecuted instantiation: lb_fwlc.c:fd_send_active Unexecuted instantiation: limits.c:fd_send_active Unexecuted instantiation: listener.c:fd_send_active Unexecuted instantiation: log.c:fd_send_active Unexecuted instantiation: mailers.c:fd_send_active Unexecuted instantiation: mworker.c:fd_send_active Unexecuted instantiation: peers.c:fd_send_active Unexecuted instantiation: pool.c:fd_send_active Unexecuted instantiation: proto_rhttp.c:fd_send_active Unexecuted instantiation: proto_sockpair.c:fd_send_active Unexecuted instantiation: proxy.c:fd_send_active Unexecuted instantiation: queue.c:fd_send_active Unexecuted instantiation: resolvers.c:fd_send_active Unexecuted instantiation: ring.c:fd_send_active Unexecuted instantiation: sample.c:fd_send_active Unexecuted instantiation: server.c:fd_send_active Unexecuted instantiation: session.c:fd_send_active Unexecuted instantiation: signal.c:fd_send_active Unexecuted instantiation: sink.c:fd_send_active Unexecuted instantiation: sock.c:fd_send_active Unexecuted instantiation: sock_inet.c:fd_send_active Unexecuted instantiation: stats-html.c:fd_send_active Unexecuted instantiation: stats.c:fd_send_active Unexecuted instantiation: stconn.c:fd_send_active Unexecuted instantiation: stick_table.c:fd_send_active Unexecuted instantiation: stream.c:fd_send_active Unexecuted instantiation: task.c:fd_send_active Unexecuted instantiation: tcp_rules.c:fd_send_active Unexecuted instantiation: tcpcheck.c:fd_send_active Unexecuted instantiation: thread.c:fd_send_active Unexecuted instantiation: tools.c:fd_send_active Unexecuted instantiation: trace.c:fd_send_active Unexecuted instantiation: vars.c:fd_send_active Unexecuted instantiation: action.c:fd_send_active Unexecuted instantiation: activity.c:fd_send_active Unexecuted instantiation: applet.c:fd_send_active Unexecuted instantiation: backend.c:fd_send_active Unexecuted instantiation: cache.c:fd_send_active Unexecuted instantiation: cfgparse-global.c:fd_send_active Unexecuted instantiation: cfgparse-listen.c:fd_send_active Unexecuted instantiation: channel.c:fd_send_active Unexecuted instantiation: check.c:fd_send_active Unexecuted instantiation: compression.c:fd_send_active Unexecuted instantiation: dgram.c:fd_send_active Unexecuted instantiation: dns.c:fd_send_active Unexecuted instantiation: dns_ring.c:fd_send_active Unexecuted instantiation: event_hdl.c:fd_send_active Unexecuted instantiation: extcheck.c:fd_send_active Unexecuted instantiation: fcgi-app.c:fd_send_active Unexecuted instantiation: http_fetch.c:fd_send_active Unexecuted instantiation: mux_spop.c:fd_send_active Unexecuted instantiation: pattern.c:fd_send_active Unexecuted instantiation: payload.c:fd_send_active Unexecuted instantiation: proto_tcp.c:fd_send_active Unexecuted instantiation: stats-json.c:fd_send_active Unexecuted instantiation: stats-proxy.c:fd_send_active Unexecuted instantiation: flt_spoe.c:fd_send_active |
182 | | |
183 | | /* |
184 | | * returns true if the FD is ready for send |
185 | | */ |
186 | | static inline int fd_send_ready(const int fd) |
187 | 0 | { |
188 | 0 | return (unsigned)fdtab[fd].state & FD_EV_READY_W; |
189 | 0 | } Unexecuted instantiation: cfgparse.c:fd_send_ready Unexecuted instantiation: cli.c:fd_send_ready Unexecuted instantiation: connection.c:fd_send_ready Unexecuted instantiation: debug.c:fd_send_ready Unexecuted instantiation: errors.c:fd_send_ready Unexecuted instantiation: fd.c:fd_send_ready Unexecuted instantiation: filters.c:fd_send_ready Unexecuted instantiation: flt_http_comp.c:fd_send_ready Unexecuted instantiation: frontend.c:fd_send_ready Unexecuted instantiation: haproxy.c:fd_send_ready Unexecuted instantiation: http_ana.c:fd_send_ready Unexecuted instantiation: http_ext.c:fd_send_ready Unexecuted instantiation: http_htx.c:fd_send_ready Unexecuted instantiation: http_rules.c:fd_send_ready Unexecuted instantiation: lb_chash.c:fd_send_ready Unexecuted instantiation: lb_fwlc.c:fd_send_ready Unexecuted instantiation: limits.c:fd_send_ready Unexecuted instantiation: listener.c:fd_send_ready Unexecuted instantiation: log.c:fd_send_ready Unexecuted instantiation: mailers.c:fd_send_ready Unexecuted instantiation: mworker.c:fd_send_ready Unexecuted instantiation: peers.c:fd_send_ready Unexecuted instantiation: pool.c:fd_send_ready Unexecuted instantiation: proto_rhttp.c:fd_send_ready Unexecuted instantiation: proto_sockpair.c:fd_send_ready Unexecuted instantiation: proxy.c:fd_send_ready Unexecuted instantiation: queue.c:fd_send_ready Unexecuted instantiation: resolvers.c:fd_send_ready Unexecuted instantiation: ring.c:fd_send_ready Unexecuted instantiation: sample.c:fd_send_ready Unexecuted instantiation: server.c:fd_send_ready Unexecuted instantiation: session.c:fd_send_ready Unexecuted instantiation: signal.c:fd_send_ready Unexecuted instantiation: sink.c:fd_send_ready Unexecuted instantiation: sock.c:fd_send_ready Unexecuted instantiation: sock_inet.c:fd_send_ready Unexecuted instantiation: stats-html.c:fd_send_ready Unexecuted instantiation: stats.c:fd_send_ready Unexecuted instantiation: stconn.c:fd_send_ready Unexecuted instantiation: stick_table.c:fd_send_ready Unexecuted instantiation: stream.c:fd_send_ready Unexecuted instantiation: task.c:fd_send_ready Unexecuted instantiation: tcp_rules.c:fd_send_ready Unexecuted instantiation: tcpcheck.c:fd_send_ready Unexecuted instantiation: thread.c:fd_send_ready Unexecuted instantiation: tools.c:fd_send_ready Unexecuted instantiation: trace.c:fd_send_ready Unexecuted instantiation: vars.c:fd_send_ready Unexecuted instantiation: action.c:fd_send_ready Unexecuted instantiation: activity.c:fd_send_ready Unexecuted instantiation: applet.c:fd_send_ready Unexecuted instantiation: backend.c:fd_send_ready Unexecuted instantiation: cache.c:fd_send_ready Unexecuted instantiation: cfgparse-global.c:fd_send_ready Unexecuted instantiation: cfgparse-listen.c:fd_send_ready Unexecuted instantiation: channel.c:fd_send_ready Unexecuted instantiation: check.c:fd_send_ready Unexecuted instantiation: compression.c:fd_send_ready Unexecuted instantiation: dgram.c:fd_send_ready Unexecuted instantiation: dns.c:fd_send_ready Unexecuted instantiation: dns_ring.c:fd_send_ready Unexecuted instantiation: event_hdl.c:fd_send_ready Unexecuted instantiation: extcheck.c:fd_send_ready Unexecuted instantiation: fcgi-app.c:fd_send_ready Unexecuted instantiation: http_fetch.c:fd_send_ready Unexecuted instantiation: mux_spop.c:fd_send_ready Unexecuted instantiation: pattern.c:fd_send_ready Unexecuted instantiation: payload.c:fd_send_ready Unexecuted instantiation: proto_tcp.c:fd_send_ready Unexecuted instantiation: stats-json.c:fd_send_ready Unexecuted instantiation: stats-proxy.c:fd_send_ready Unexecuted instantiation: flt_spoe.c:fd_send_ready |
190 | | |
191 | | /* |
192 | | * returns true if the FD is active for recv or send |
193 | | */ |
194 | | static inline int fd_active(const int fd) |
195 | 0 | { |
196 | 0 | return (unsigned)fdtab[fd].state & FD_EV_ACTIVE_RW; |
197 | 0 | } Unexecuted instantiation: cfgparse.c:fd_active Unexecuted instantiation: cli.c:fd_active Unexecuted instantiation: connection.c:fd_active Unexecuted instantiation: debug.c:fd_active Unexecuted instantiation: errors.c:fd_active Unexecuted instantiation: fd.c:fd_active Unexecuted instantiation: filters.c:fd_active Unexecuted instantiation: flt_http_comp.c:fd_active Unexecuted instantiation: frontend.c:fd_active Unexecuted instantiation: haproxy.c:fd_active Unexecuted instantiation: http_ana.c:fd_active Unexecuted instantiation: http_ext.c:fd_active Unexecuted instantiation: http_htx.c:fd_active Unexecuted instantiation: http_rules.c:fd_active Unexecuted instantiation: lb_chash.c:fd_active Unexecuted instantiation: lb_fwlc.c:fd_active Unexecuted instantiation: limits.c:fd_active Unexecuted instantiation: listener.c:fd_active Unexecuted instantiation: log.c:fd_active Unexecuted instantiation: mailers.c:fd_active Unexecuted instantiation: mworker.c:fd_active Unexecuted instantiation: peers.c:fd_active Unexecuted instantiation: pool.c:fd_active Unexecuted instantiation: proto_rhttp.c:fd_active Unexecuted instantiation: proto_sockpair.c:fd_active Unexecuted instantiation: proxy.c:fd_active Unexecuted instantiation: queue.c:fd_active Unexecuted instantiation: resolvers.c:fd_active Unexecuted instantiation: ring.c:fd_active Unexecuted instantiation: sample.c:fd_active Unexecuted instantiation: server.c:fd_active Unexecuted instantiation: session.c:fd_active Unexecuted instantiation: signal.c:fd_active Unexecuted instantiation: sink.c:fd_active Unexecuted instantiation: sock.c:fd_active Unexecuted instantiation: sock_inet.c:fd_active Unexecuted instantiation: stats-html.c:fd_active Unexecuted instantiation: stats.c:fd_active Unexecuted instantiation: stconn.c:fd_active Unexecuted instantiation: stick_table.c:fd_active Unexecuted instantiation: stream.c:fd_active Unexecuted instantiation: task.c:fd_active Unexecuted instantiation: tcp_rules.c:fd_active Unexecuted instantiation: tcpcheck.c:fd_active Unexecuted instantiation: thread.c:fd_active Unexecuted instantiation: tools.c:fd_active Unexecuted instantiation: trace.c:fd_active Unexecuted instantiation: vars.c:fd_active Unexecuted instantiation: action.c:fd_active Unexecuted instantiation: activity.c:fd_active Unexecuted instantiation: applet.c:fd_active Unexecuted instantiation: backend.c:fd_active Unexecuted instantiation: cache.c:fd_active Unexecuted instantiation: cfgparse-global.c:fd_active Unexecuted instantiation: cfgparse-listen.c:fd_active Unexecuted instantiation: channel.c:fd_active Unexecuted instantiation: check.c:fd_active Unexecuted instantiation: compression.c:fd_active Unexecuted instantiation: dgram.c:fd_active Unexecuted instantiation: dns.c:fd_active Unexecuted instantiation: dns_ring.c:fd_active Unexecuted instantiation: event_hdl.c:fd_active Unexecuted instantiation: extcheck.c:fd_active Unexecuted instantiation: fcgi-app.c:fd_active Unexecuted instantiation: http_fetch.c:fd_active Unexecuted instantiation: mux_spop.c:fd_active Unexecuted instantiation: pattern.c:fd_active Unexecuted instantiation: payload.c:fd_active Unexecuted instantiation: proto_tcp.c:fd_active Unexecuted instantiation: stats-json.c:fd_active Unexecuted instantiation: stats-proxy.c:fd_active Unexecuted instantiation: flt_spoe.c:fd_active |
198 | | |
199 | | /* Disable processing recv events on fd <fd> */ |
200 | | static inline void fd_stop_recv(int fd) |
201 | 0 | { |
202 | 0 | if (!(fdtab[fd].state & FD_EV_ACTIVE_R) || |
203 | 0 | !HA_ATOMIC_BTR(&fdtab[fd].state, FD_EV_ACTIVE_R_BIT)) |
204 | 0 | return; |
205 | 0 | } Unexecuted instantiation: cfgparse.c:fd_stop_recv Unexecuted instantiation: cli.c:fd_stop_recv Unexecuted instantiation: connection.c:fd_stop_recv Unexecuted instantiation: debug.c:fd_stop_recv Unexecuted instantiation: errors.c:fd_stop_recv Unexecuted instantiation: fd.c:fd_stop_recv Unexecuted instantiation: filters.c:fd_stop_recv Unexecuted instantiation: flt_http_comp.c:fd_stop_recv Unexecuted instantiation: frontend.c:fd_stop_recv Unexecuted instantiation: haproxy.c:fd_stop_recv Unexecuted instantiation: http_ana.c:fd_stop_recv Unexecuted instantiation: http_ext.c:fd_stop_recv Unexecuted instantiation: http_htx.c:fd_stop_recv Unexecuted instantiation: http_rules.c:fd_stop_recv Unexecuted instantiation: lb_chash.c:fd_stop_recv Unexecuted instantiation: lb_fwlc.c:fd_stop_recv Unexecuted instantiation: limits.c:fd_stop_recv Unexecuted instantiation: listener.c:fd_stop_recv Unexecuted instantiation: log.c:fd_stop_recv Unexecuted instantiation: mailers.c:fd_stop_recv Unexecuted instantiation: mworker.c:fd_stop_recv Unexecuted instantiation: peers.c:fd_stop_recv Unexecuted instantiation: pool.c:fd_stop_recv Unexecuted instantiation: proto_rhttp.c:fd_stop_recv Unexecuted instantiation: proto_sockpair.c:fd_stop_recv Unexecuted instantiation: proxy.c:fd_stop_recv Unexecuted instantiation: queue.c:fd_stop_recv Unexecuted instantiation: resolvers.c:fd_stop_recv Unexecuted instantiation: ring.c:fd_stop_recv Unexecuted instantiation: sample.c:fd_stop_recv Unexecuted instantiation: server.c:fd_stop_recv Unexecuted instantiation: session.c:fd_stop_recv Unexecuted instantiation: signal.c:fd_stop_recv Unexecuted instantiation: sink.c:fd_stop_recv Unexecuted instantiation: sock.c:fd_stop_recv Unexecuted instantiation: sock_inet.c:fd_stop_recv Unexecuted instantiation: stats-html.c:fd_stop_recv Unexecuted instantiation: stats.c:fd_stop_recv Unexecuted instantiation: stconn.c:fd_stop_recv Unexecuted instantiation: stick_table.c:fd_stop_recv Unexecuted instantiation: stream.c:fd_stop_recv Unexecuted instantiation: task.c:fd_stop_recv Unexecuted instantiation: tcp_rules.c:fd_stop_recv Unexecuted instantiation: tcpcheck.c:fd_stop_recv Unexecuted instantiation: thread.c:fd_stop_recv Unexecuted instantiation: tools.c:fd_stop_recv Unexecuted instantiation: trace.c:fd_stop_recv Unexecuted instantiation: vars.c:fd_stop_recv Unexecuted instantiation: action.c:fd_stop_recv Unexecuted instantiation: activity.c:fd_stop_recv Unexecuted instantiation: applet.c:fd_stop_recv Unexecuted instantiation: backend.c:fd_stop_recv Unexecuted instantiation: cache.c:fd_stop_recv Unexecuted instantiation: cfgparse-global.c:fd_stop_recv Unexecuted instantiation: cfgparse-listen.c:fd_stop_recv Unexecuted instantiation: channel.c:fd_stop_recv Unexecuted instantiation: check.c:fd_stop_recv Unexecuted instantiation: compression.c:fd_stop_recv Unexecuted instantiation: dgram.c:fd_stop_recv Unexecuted instantiation: dns.c:fd_stop_recv Unexecuted instantiation: dns_ring.c:fd_stop_recv Unexecuted instantiation: event_hdl.c:fd_stop_recv Unexecuted instantiation: extcheck.c:fd_stop_recv Unexecuted instantiation: fcgi-app.c:fd_stop_recv Unexecuted instantiation: http_fetch.c:fd_stop_recv Unexecuted instantiation: mux_spop.c:fd_stop_recv Unexecuted instantiation: pattern.c:fd_stop_recv Unexecuted instantiation: payload.c:fd_stop_recv Unexecuted instantiation: proto_tcp.c:fd_stop_recv Unexecuted instantiation: stats-json.c:fd_stop_recv Unexecuted instantiation: stats-proxy.c:fd_stop_recv Unexecuted instantiation: flt_spoe.c:fd_stop_recv |
206 | | |
207 | | /* Disable processing send events on fd <fd> */ |
208 | | static inline void fd_stop_send(int fd) |
209 | 0 | { |
210 | 0 | if (!(fdtab[fd].state & FD_EV_ACTIVE_W) || |
211 | 0 | !HA_ATOMIC_BTR(&fdtab[fd].state, FD_EV_ACTIVE_W_BIT)) |
212 | 0 | return; |
213 | 0 | } Unexecuted instantiation: cfgparse.c:fd_stop_send Unexecuted instantiation: cli.c:fd_stop_send Unexecuted instantiation: connection.c:fd_stop_send Unexecuted instantiation: debug.c:fd_stop_send Unexecuted instantiation: errors.c:fd_stop_send Unexecuted instantiation: fd.c:fd_stop_send Unexecuted instantiation: filters.c:fd_stop_send Unexecuted instantiation: flt_http_comp.c:fd_stop_send Unexecuted instantiation: frontend.c:fd_stop_send Unexecuted instantiation: haproxy.c:fd_stop_send Unexecuted instantiation: http_ana.c:fd_stop_send Unexecuted instantiation: http_ext.c:fd_stop_send Unexecuted instantiation: http_htx.c:fd_stop_send Unexecuted instantiation: http_rules.c:fd_stop_send Unexecuted instantiation: lb_chash.c:fd_stop_send Unexecuted instantiation: lb_fwlc.c:fd_stop_send Unexecuted instantiation: limits.c:fd_stop_send Unexecuted instantiation: listener.c:fd_stop_send Unexecuted instantiation: log.c:fd_stop_send Unexecuted instantiation: mailers.c:fd_stop_send Unexecuted instantiation: mworker.c:fd_stop_send Unexecuted instantiation: peers.c:fd_stop_send Unexecuted instantiation: pool.c:fd_stop_send Unexecuted instantiation: proto_rhttp.c:fd_stop_send Unexecuted instantiation: proto_sockpair.c:fd_stop_send Unexecuted instantiation: proxy.c:fd_stop_send Unexecuted instantiation: queue.c:fd_stop_send Unexecuted instantiation: resolvers.c:fd_stop_send Unexecuted instantiation: ring.c:fd_stop_send Unexecuted instantiation: sample.c:fd_stop_send Unexecuted instantiation: server.c:fd_stop_send Unexecuted instantiation: session.c:fd_stop_send Unexecuted instantiation: signal.c:fd_stop_send Unexecuted instantiation: sink.c:fd_stop_send Unexecuted instantiation: sock.c:fd_stop_send Unexecuted instantiation: sock_inet.c:fd_stop_send Unexecuted instantiation: stats-html.c:fd_stop_send Unexecuted instantiation: stats.c:fd_stop_send Unexecuted instantiation: stconn.c:fd_stop_send Unexecuted instantiation: stick_table.c:fd_stop_send Unexecuted instantiation: stream.c:fd_stop_send Unexecuted instantiation: task.c:fd_stop_send Unexecuted instantiation: tcp_rules.c:fd_stop_send Unexecuted instantiation: tcpcheck.c:fd_stop_send Unexecuted instantiation: thread.c:fd_stop_send Unexecuted instantiation: tools.c:fd_stop_send Unexecuted instantiation: trace.c:fd_stop_send Unexecuted instantiation: vars.c:fd_stop_send Unexecuted instantiation: action.c:fd_stop_send Unexecuted instantiation: activity.c:fd_stop_send Unexecuted instantiation: applet.c:fd_stop_send Unexecuted instantiation: backend.c:fd_stop_send Unexecuted instantiation: cache.c:fd_stop_send Unexecuted instantiation: cfgparse-global.c:fd_stop_send Unexecuted instantiation: cfgparse-listen.c:fd_stop_send Unexecuted instantiation: channel.c:fd_stop_send Unexecuted instantiation: check.c:fd_stop_send Unexecuted instantiation: compression.c:fd_stop_send Unexecuted instantiation: dgram.c:fd_stop_send Unexecuted instantiation: dns.c:fd_stop_send Unexecuted instantiation: dns_ring.c:fd_stop_send Unexecuted instantiation: event_hdl.c:fd_stop_send Unexecuted instantiation: extcheck.c:fd_stop_send Unexecuted instantiation: fcgi-app.c:fd_stop_send Unexecuted instantiation: http_fetch.c:fd_stop_send Unexecuted instantiation: mux_spop.c:fd_stop_send Unexecuted instantiation: pattern.c:fd_stop_send Unexecuted instantiation: payload.c:fd_stop_send Unexecuted instantiation: proto_tcp.c:fd_stop_send Unexecuted instantiation: stats-json.c:fd_stop_send Unexecuted instantiation: stats-proxy.c:fd_stop_send Unexecuted instantiation: flt_spoe.c:fd_stop_send |
214 | | |
215 | | /* Disable processing of events on fd <fd> for both directions. */ |
216 | | static inline void fd_stop_both(int fd) |
217 | 0 | { |
218 | 0 | uint old, new; |
219 | |
|
220 | 0 | old = fdtab[fd].state; |
221 | 0 | do { |
222 | 0 | if (!(old & FD_EV_ACTIVE_RW)) |
223 | 0 | return; |
224 | 0 | new = old & ~FD_EV_ACTIVE_RW; |
225 | 0 | } while (unlikely(!_HA_ATOMIC_CAS(&fdtab[fd].state, &old, new))); |
226 | 0 | } Unexecuted instantiation: cfgparse.c:fd_stop_both Unexecuted instantiation: cli.c:fd_stop_both Unexecuted instantiation: connection.c:fd_stop_both Unexecuted instantiation: debug.c:fd_stop_both Unexecuted instantiation: errors.c:fd_stop_both Unexecuted instantiation: fd.c:fd_stop_both Unexecuted instantiation: filters.c:fd_stop_both Unexecuted instantiation: flt_http_comp.c:fd_stop_both Unexecuted instantiation: frontend.c:fd_stop_both Unexecuted instantiation: haproxy.c:fd_stop_both Unexecuted instantiation: http_ana.c:fd_stop_both Unexecuted instantiation: http_ext.c:fd_stop_both Unexecuted instantiation: http_htx.c:fd_stop_both Unexecuted instantiation: http_rules.c:fd_stop_both Unexecuted instantiation: lb_chash.c:fd_stop_both Unexecuted instantiation: lb_fwlc.c:fd_stop_both Unexecuted instantiation: limits.c:fd_stop_both Unexecuted instantiation: listener.c:fd_stop_both Unexecuted instantiation: log.c:fd_stop_both Unexecuted instantiation: mailers.c:fd_stop_both Unexecuted instantiation: mworker.c:fd_stop_both Unexecuted instantiation: peers.c:fd_stop_both Unexecuted instantiation: pool.c:fd_stop_both Unexecuted instantiation: proto_rhttp.c:fd_stop_both Unexecuted instantiation: proto_sockpair.c:fd_stop_both Unexecuted instantiation: proxy.c:fd_stop_both Unexecuted instantiation: queue.c:fd_stop_both Unexecuted instantiation: resolvers.c:fd_stop_both Unexecuted instantiation: ring.c:fd_stop_both Unexecuted instantiation: sample.c:fd_stop_both Unexecuted instantiation: server.c:fd_stop_both Unexecuted instantiation: session.c:fd_stop_both Unexecuted instantiation: signal.c:fd_stop_both Unexecuted instantiation: sink.c:fd_stop_both Unexecuted instantiation: sock.c:fd_stop_both Unexecuted instantiation: sock_inet.c:fd_stop_both Unexecuted instantiation: stats-html.c:fd_stop_both Unexecuted instantiation: stats.c:fd_stop_both Unexecuted instantiation: stconn.c:fd_stop_both Unexecuted instantiation: stick_table.c:fd_stop_both Unexecuted instantiation: stream.c:fd_stop_both Unexecuted instantiation: task.c:fd_stop_both Unexecuted instantiation: tcp_rules.c:fd_stop_both Unexecuted instantiation: tcpcheck.c:fd_stop_both Unexecuted instantiation: thread.c:fd_stop_both Unexecuted instantiation: tools.c:fd_stop_both Unexecuted instantiation: trace.c:fd_stop_both Unexecuted instantiation: vars.c:fd_stop_both Unexecuted instantiation: action.c:fd_stop_both Unexecuted instantiation: activity.c:fd_stop_both Unexecuted instantiation: applet.c:fd_stop_both Unexecuted instantiation: backend.c:fd_stop_both Unexecuted instantiation: cache.c:fd_stop_both Unexecuted instantiation: cfgparse-global.c:fd_stop_both Unexecuted instantiation: cfgparse-listen.c:fd_stop_both Unexecuted instantiation: channel.c:fd_stop_both Unexecuted instantiation: check.c:fd_stop_both Unexecuted instantiation: compression.c:fd_stop_both Unexecuted instantiation: dgram.c:fd_stop_both Unexecuted instantiation: dns.c:fd_stop_both Unexecuted instantiation: dns_ring.c:fd_stop_both Unexecuted instantiation: event_hdl.c:fd_stop_both Unexecuted instantiation: extcheck.c:fd_stop_both Unexecuted instantiation: fcgi-app.c:fd_stop_both Unexecuted instantiation: http_fetch.c:fd_stop_both Unexecuted instantiation: mux_spop.c:fd_stop_both Unexecuted instantiation: pattern.c:fd_stop_both Unexecuted instantiation: payload.c:fd_stop_both Unexecuted instantiation: proto_tcp.c:fd_stop_both Unexecuted instantiation: stats-json.c:fd_stop_both Unexecuted instantiation: stats-proxy.c:fd_stop_both Unexecuted instantiation: flt_spoe.c:fd_stop_both |
227 | | |
228 | | /* Report that FD <fd> cannot receive anymore without polling (EAGAIN detected). */ |
229 | | static inline void fd_cant_recv(const int fd) |
230 | 0 | { |
231 | | /* marking ready never changes polled status */ |
232 | 0 | if (!(fdtab[fd].state & FD_EV_READY_R) || |
233 | 0 | !HA_ATOMIC_BTR(&fdtab[fd].state, FD_EV_READY_R_BIT)) |
234 | 0 | return; |
235 | 0 | } Unexecuted instantiation: cfgparse.c:fd_cant_recv Unexecuted instantiation: cli.c:fd_cant_recv Unexecuted instantiation: connection.c:fd_cant_recv Unexecuted instantiation: debug.c:fd_cant_recv Unexecuted instantiation: errors.c:fd_cant_recv Unexecuted instantiation: fd.c:fd_cant_recv Unexecuted instantiation: filters.c:fd_cant_recv Unexecuted instantiation: flt_http_comp.c:fd_cant_recv Unexecuted instantiation: frontend.c:fd_cant_recv Unexecuted instantiation: haproxy.c:fd_cant_recv Unexecuted instantiation: http_ana.c:fd_cant_recv Unexecuted instantiation: http_ext.c:fd_cant_recv Unexecuted instantiation: http_htx.c:fd_cant_recv Unexecuted instantiation: http_rules.c:fd_cant_recv Unexecuted instantiation: lb_chash.c:fd_cant_recv Unexecuted instantiation: lb_fwlc.c:fd_cant_recv Unexecuted instantiation: limits.c:fd_cant_recv Unexecuted instantiation: listener.c:fd_cant_recv Unexecuted instantiation: log.c:fd_cant_recv Unexecuted instantiation: mailers.c:fd_cant_recv Unexecuted instantiation: mworker.c:fd_cant_recv Unexecuted instantiation: peers.c:fd_cant_recv Unexecuted instantiation: pool.c:fd_cant_recv Unexecuted instantiation: proto_rhttp.c:fd_cant_recv Unexecuted instantiation: proto_sockpair.c:fd_cant_recv Unexecuted instantiation: proxy.c:fd_cant_recv Unexecuted instantiation: queue.c:fd_cant_recv Unexecuted instantiation: resolvers.c:fd_cant_recv Unexecuted instantiation: ring.c:fd_cant_recv Unexecuted instantiation: sample.c:fd_cant_recv Unexecuted instantiation: server.c:fd_cant_recv Unexecuted instantiation: session.c:fd_cant_recv Unexecuted instantiation: signal.c:fd_cant_recv Unexecuted instantiation: sink.c:fd_cant_recv Unexecuted instantiation: sock.c:fd_cant_recv Unexecuted instantiation: sock_inet.c:fd_cant_recv Unexecuted instantiation: stats-html.c:fd_cant_recv Unexecuted instantiation: stats.c:fd_cant_recv Unexecuted instantiation: stconn.c:fd_cant_recv Unexecuted instantiation: stick_table.c:fd_cant_recv Unexecuted instantiation: stream.c:fd_cant_recv Unexecuted instantiation: task.c:fd_cant_recv Unexecuted instantiation: tcp_rules.c:fd_cant_recv Unexecuted instantiation: tcpcheck.c:fd_cant_recv Unexecuted instantiation: thread.c:fd_cant_recv Unexecuted instantiation: tools.c:fd_cant_recv Unexecuted instantiation: trace.c:fd_cant_recv Unexecuted instantiation: vars.c:fd_cant_recv Unexecuted instantiation: action.c:fd_cant_recv Unexecuted instantiation: activity.c:fd_cant_recv Unexecuted instantiation: applet.c:fd_cant_recv Unexecuted instantiation: backend.c:fd_cant_recv Unexecuted instantiation: cache.c:fd_cant_recv Unexecuted instantiation: cfgparse-global.c:fd_cant_recv Unexecuted instantiation: cfgparse-listen.c:fd_cant_recv Unexecuted instantiation: channel.c:fd_cant_recv Unexecuted instantiation: check.c:fd_cant_recv Unexecuted instantiation: compression.c:fd_cant_recv Unexecuted instantiation: dgram.c:fd_cant_recv Unexecuted instantiation: dns.c:fd_cant_recv Unexecuted instantiation: dns_ring.c:fd_cant_recv Unexecuted instantiation: event_hdl.c:fd_cant_recv Unexecuted instantiation: extcheck.c:fd_cant_recv Unexecuted instantiation: fcgi-app.c:fd_cant_recv Unexecuted instantiation: http_fetch.c:fd_cant_recv Unexecuted instantiation: mux_spop.c:fd_cant_recv Unexecuted instantiation: pattern.c:fd_cant_recv Unexecuted instantiation: payload.c:fd_cant_recv Unexecuted instantiation: proto_tcp.c:fd_cant_recv Unexecuted instantiation: stats-json.c:fd_cant_recv Unexecuted instantiation: stats-proxy.c:fd_cant_recv Unexecuted instantiation: flt_spoe.c:fd_cant_recv |
236 | | |
237 | | /* Report that FD <fd> may receive again without polling. */ |
238 | | static inline void fd_may_recv(const int fd) |
239 | 0 | { |
240 | 0 | /* marking ready never changes polled status */ |
241 | 0 | if ((fdtab[fd].state & FD_EV_READY_R) || |
242 | 0 | HA_ATOMIC_BTS(&fdtab[fd].state, FD_EV_READY_R_BIT)) |
243 | 0 | return; |
244 | 0 | } Unexecuted instantiation: cfgparse.c:fd_may_recv Unexecuted instantiation: cli.c:fd_may_recv Unexecuted instantiation: connection.c:fd_may_recv Unexecuted instantiation: debug.c:fd_may_recv Unexecuted instantiation: errors.c:fd_may_recv Unexecuted instantiation: fd.c:fd_may_recv Unexecuted instantiation: filters.c:fd_may_recv Unexecuted instantiation: flt_http_comp.c:fd_may_recv Unexecuted instantiation: frontend.c:fd_may_recv Unexecuted instantiation: haproxy.c:fd_may_recv Unexecuted instantiation: http_ana.c:fd_may_recv Unexecuted instantiation: http_ext.c:fd_may_recv Unexecuted instantiation: http_htx.c:fd_may_recv Unexecuted instantiation: http_rules.c:fd_may_recv Unexecuted instantiation: lb_chash.c:fd_may_recv Unexecuted instantiation: lb_fwlc.c:fd_may_recv Unexecuted instantiation: limits.c:fd_may_recv Unexecuted instantiation: listener.c:fd_may_recv Unexecuted instantiation: log.c:fd_may_recv Unexecuted instantiation: mailers.c:fd_may_recv Unexecuted instantiation: mworker.c:fd_may_recv Unexecuted instantiation: peers.c:fd_may_recv Unexecuted instantiation: pool.c:fd_may_recv Unexecuted instantiation: proto_rhttp.c:fd_may_recv Unexecuted instantiation: proto_sockpair.c:fd_may_recv Unexecuted instantiation: proxy.c:fd_may_recv Unexecuted instantiation: queue.c:fd_may_recv Unexecuted instantiation: resolvers.c:fd_may_recv Unexecuted instantiation: ring.c:fd_may_recv Unexecuted instantiation: sample.c:fd_may_recv Unexecuted instantiation: server.c:fd_may_recv Unexecuted instantiation: session.c:fd_may_recv Unexecuted instantiation: signal.c:fd_may_recv Unexecuted instantiation: sink.c:fd_may_recv Unexecuted instantiation: sock.c:fd_may_recv Unexecuted instantiation: sock_inet.c:fd_may_recv Unexecuted instantiation: stats-html.c:fd_may_recv Unexecuted instantiation: stats.c:fd_may_recv Unexecuted instantiation: stconn.c:fd_may_recv Unexecuted instantiation: stick_table.c:fd_may_recv Unexecuted instantiation: stream.c:fd_may_recv Unexecuted instantiation: task.c:fd_may_recv Unexecuted instantiation: tcp_rules.c:fd_may_recv Unexecuted instantiation: tcpcheck.c:fd_may_recv Unexecuted instantiation: thread.c:fd_may_recv Unexecuted instantiation: tools.c:fd_may_recv Unexecuted instantiation: trace.c:fd_may_recv Unexecuted instantiation: vars.c:fd_may_recv Unexecuted instantiation: action.c:fd_may_recv Unexecuted instantiation: activity.c:fd_may_recv Unexecuted instantiation: applet.c:fd_may_recv Unexecuted instantiation: backend.c:fd_may_recv Unexecuted instantiation: cache.c:fd_may_recv Unexecuted instantiation: cfgparse-global.c:fd_may_recv Unexecuted instantiation: cfgparse-listen.c:fd_may_recv Unexecuted instantiation: channel.c:fd_may_recv Unexecuted instantiation: check.c:fd_may_recv Unexecuted instantiation: compression.c:fd_may_recv Unexecuted instantiation: dgram.c:fd_may_recv Unexecuted instantiation: dns.c:fd_may_recv Unexecuted instantiation: dns_ring.c:fd_may_recv Unexecuted instantiation: event_hdl.c:fd_may_recv Unexecuted instantiation: extcheck.c:fd_may_recv Unexecuted instantiation: fcgi-app.c:fd_may_recv Unexecuted instantiation: http_fetch.c:fd_may_recv Unexecuted instantiation: mux_spop.c:fd_may_recv Unexecuted instantiation: pattern.c:fd_may_recv Unexecuted instantiation: payload.c:fd_may_recv Unexecuted instantiation: proto_tcp.c:fd_may_recv Unexecuted instantiation: stats-json.c:fd_may_recv Unexecuted instantiation: stats-proxy.c:fd_may_recv Unexecuted instantiation: flt_spoe.c:fd_may_recv |
245 | | |
246 | | /* Report that FD <fd> may receive again without polling but only if its not |
247 | | * active yet. This is in order to speculatively try to enable I/Os when it's |
248 | | * highly likely that these will succeed, but without interfering with polling. |
249 | | */ |
250 | | static inline void fd_cond_recv(const int fd) |
251 | 0 | { |
252 | 0 | if ((fdtab[fd].state & (FD_EV_ACTIVE_R|FD_EV_READY_R)) == 0) |
253 | 0 | HA_ATOMIC_BTS(&fdtab[fd].state, FD_EV_READY_R_BIT); |
254 | 0 | } Unexecuted instantiation: cfgparse.c:fd_cond_recv Unexecuted instantiation: cli.c:fd_cond_recv Unexecuted instantiation: connection.c:fd_cond_recv Unexecuted instantiation: debug.c:fd_cond_recv Unexecuted instantiation: errors.c:fd_cond_recv Unexecuted instantiation: fd.c:fd_cond_recv Unexecuted instantiation: filters.c:fd_cond_recv Unexecuted instantiation: flt_http_comp.c:fd_cond_recv Unexecuted instantiation: frontend.c:fd_cond_recv Unexecuted instantiation: haproxy.c:fd_cond_recv Unexecuted instantiation: http_ana.c:fd_cond_recv Unexecuted instantiation: http_ext.c:fd_cond_recv Unexecuted instantiation: http_htx.c:fd_cond_recv Unexecuted instantiation: http_rules.c:fd_cond_recv Unexecuted instantiation: lb_chash.c:fd_cond_recv Unexecuted instantiation: lb_fwlc.c:fd_cond_recv Unexecuted instantiation: limits.c:fd_cond_recv Unexecuted instantiation: listener.c:fd_cond_recv Unexecuted instantiation: log.c:fd_cond_recv Unexecuted instantiation: mailers.c:fd_cond_recv Unexecuted instantiation: mworker.c:fd_cond_recv Unexecuted instantiation: peers.c:fd_cond_recv Unexecuted instantiation: pool.c:fd_cond_recv Unexecuted instantiation: proto_rhttp.c:fd_cond_recv Unexecuted instantiation: proto_sockpair.c:fd_cond_recv Unexecuted instantiation: proxy.c:fd_cond_recv Unexecuted instantiation: queue.c:fd_cond_recv Unexecuted instantiation: resolvers.c:fd_cond_recv Unexecuted instantiation: ring.c:fd_cond_recv Unexecuted instantiation: sample.c:fd_cond_recv Unexecuted instantiation: server.c:fd_cond_recv Unexecuted instantiation: session.c:fd_cond_recv Unexecuted instantiation: signal.c:fd_cond_recv Unexecuted instantiation: sink.c:fd_cond_recv Unexecuted instantiation: sock.c:fd_cond_recv Unexecuted instantiation: sock_inet.c:fd_cond_recv Unexecuted instantiation: stats-html.c:fd_cond_recv Unexecuted instantiation: stats.c:fd_cond_recv Unexecuted instantiation: stconn.c:fd_cond_recv Unexecuted instantiation: stick_table.c:fd_cond_recv Unexecuted instantiation: stream.c:fd_cond_recv Unexecuted instantiation: task.c:fd_cond_recv Unexecuted instantiation: tcp_rules.c:fd_cond_recv Unexecuted instantiation: tcpcheck.c:fd_cond_recv Unexecuted instantiation: thread.c:fd_cond_recv Unexecuted instantiation: tools.c:fd_cond_recv Unexecuted instantiation: trace.c:fd_cond_recv Unexecuted instantiation: vars.c:fd_cond_recv Unexecuted instantiation: action.c:fd_cond_recv Unexecuted instantiation: activity.c:fd_cond_recv Unexecuted instantiation: applet.c:fd_cond_recv Unexecuted instantiation: backend.c:fd_cond_recv Unexecuted instantiation: cache.c:fd_cond_recv Unexecuted instantiation: cfgparse-global.c:fd_cond_recv Unexecuted instantiation: cfgparse-listen.c:fd_cond_recv Unexecuted instantiation: channel.c:fd_cond_recv Unexecuted instantiation: check.c:fd_cond_recv Unexecuted instantiation: compression.c:fd_cond_recv Unexecuted instantiation: dgram.c:fd_cond_recv Unexecuted instantiation: dns.c:fd_cond_recv Unexecuted instantiation: dns_ring.c:fd_cond_recv Unexecuted instantiation: event_hdl.c:fd_cond_recv Unexecuted instantiation: extcheck.c:fd_cond_recv Unexecuted instantiation: fcgi-app.c:fd_cond_recv Unexecuted instantiation: http_fetch.c:fd_cond_recv Unexecuted instantiation: mux_spop.c:fd_cond_recv Unexecuted instantiation: pattern.c:fd_cond_recv Unexecuted instantiation: payload.c:fd_cond_recv Unexecuted instantiation: proto_tcp.c:fd_cond_recv Unexecuted instantiation: stats-json.c:fd_cond_recv Unexecuted instantiation: stats-proxy.c:fd_cond_recv Unexecuted instantiation: flt_spoe.c:fd_cond_recv |
255 | | |
256 | | /* Report that FD <fd> may send again without polling but only if its not |
257 | | * active yet. This is in order to speculatively try to enable I/Os when it's |
258 | | * highly likely that these will succeed, but without interfering with polling. |
259 | | */ |
260 | | static inline void fd_cond_send(const int fd) |
261 | 0 | { |
262 | 0 | if ((fdtab[fd].state & (FD_EV_ACTIVE_W|FD_EV_READY_W)) == 0) |
263 | 0 | HA_ATOMIC_BTS(&fdtab[fd].state, FD_EV_READY_W_BIT); |
264 | 0 | } Unexecuted instantiation: cfgparse.c:fd_cond_send Unexecuted instantiation: cli.c:fd_cond_send Unexecuted instantiation: connection.c:fd_cond_send Unexecuted instantiation: debug.c:fd_cond_send Unexecuted instantiation: errors.c:fd_cond_send Unexecuted instantiation: fd.c:fd_cond_send Unexecuted instantiation: filters.c:fd_cond_send Unexecuted instantiation: flt_http_comp.c:fd_cond_send Unexecuted instantiation: frontend.c:fd_cond_send Unexecuted instantiation: haproxy.c:fd_cond_send Unexecuted instantiation: http_ana.c:fd_cond_send Unexecuted instantiation: http_ext.c:fd_cond_send Unexecuted instantiation: http_htx.c:fd_cond_send Unexecuted instantiation: http_rules.c:fd_cond_send Unexecuted instantiation: lb_chash.c:fd_cond_send Unexecuted instantiation: lb_fwlc.c:fd_cond_send Unexecuted instantiation: limits.c:fd_cond_send Unexecuted instantiation: listener.c:fd_cond_send Unexecuted instantiation: log.c:fd_cond_send Unexecuted instantiation: mailers.c:fd_cond_send Unexecuted instantiation: mworker.c:fd_cond_send Unexecuted instantiation: peers.c:fd_cond_send Unexecuted instantiation: pool.c:fd_cond_send Unexecuted instantiation: proto_rhttp.c:fd_cond_send Unexecuted instantiation: proto_sockpair.c:fd_cond_send Unexecuted instantiation: proxy.c:fd_cond_send Unexecuted instantiation: queue.c:fd_cond_send Unexecuted instantiation: resolvers.c:fd_cond_send Unexecuted instantiation: ring.c:fd_cond_send Unexecuted instantiation: sample.c:fd_cond_send Unexecuted instantiation: server.c:fd_cond_send Unexecuted instantiation: session.c:fd_cond_send Unexecuted instantiation: signal.c:fd_cond_send Unexecuted instantiation: sink.c:fd_cond_send Unexecuted instantiation: sock.c:fd_cond_send Unexecuted instantiation: sock_inet.c:fd_cond_send Unexecuted instantiation: stats-html.c:fd_cond_send Unexecuted instantiation: stats.c:fd_cond_send Unexecuted instantiation: stconn.c:fd_cond_send Unexecuted instantiation: stick_table.c:fd_cond_send Unexecuted instantiation: stream.c:fd_cond_send Unexecuted instantiation: task.c:fd_cond_send Unexecuted instantiation: tcp_rules.c:fd_cond_send Unexecuted instantiation: tcpcheck.c:fd_cond_send Unexecuted instantiation: thread.c:fd_cond_send Unexecuted instantiation: tools.c:fd_cond_send Unexecuted instantiation: trace.c:fd_cond_send Unexecuted instantiation: vars.c:fd_cond_send Unexecuted instantiation: action.c:fd_cond_send Unexecuted instantiation: activity.c:fd_cond_send Unexecuted instantiation: applet.c:fd_cond_send Unexecuted instantiation: backend.c:fd_cond_send Unexecuted instantiation: cache.c:fd_cond_send Unexecuted instantiation: cfgparse-global.c:fd_cond_send Unexecuted instantiation: cfgparse-listen.c:fd_cond_send Unexecuted instantiation: channel.c:fd_cond_send Unexecuted instantiation: check.c:fd_cond_send Unexecuted instantiation: compression.c:fd_cond_send Unexecuted instantiation: dgram.c:fd_cond_send Unexecuted instantiation: dns.c:fd_cond_send Unexecuted instantiation: dns_ring.c:fd_cond_send Unexecuted instantiation: event_hdl.c:fd_cond_send Unexecuted instantiation: extcheck.c:fd_cond_send Unexecuted instantiation: fcgi-app.c:fd_cond_send Unexecuted instantiation: http_fetch.c:fd_cond_send Unexecuted instantiation: mux_spop.c:fd_cond_send Unexecuted instantiation: pattern.c:fd_cond_send Unexecuted instantiation: payload.c:fd_cond_send Unexecuted instantiation: proto_tcp.c:fd_cond_send Unexecuted instantiation: stats-json.c:fd_cond_send Unexecuted instantiation: stats-proxy.c:fd_cond_send Unexecuted instantiation: flt_spoe.c:fd_cond_send |
265 | | |
266 | | /* Report that FD <fd> may receive and send without polling. Used at FD |
267 | | * initialization. |
268 | | */ |
269 | | static inline void fd_may_both(const int fd) |
270 | 0 | { |
271 | 0 | HA_ATOMIC_OR(&fdtab[fd].state, FD_EV_READY_RW); |
272 | 0 | } Unexecuted instantiation: cfgparse.c:fd_may_both Unexecuted instantiation: cli.c:fd_may_both Unexecuted instantiation: connection.c:fd_may_both Unexecuted instantiation: debug.c:fd_may_both Unexecuted instantiation: errors.c:fd_may_both Unexecuted instantiation: fd.c:fd_may_both Unexecuted instantiation: filters.c:fd_may_both Unexecuted instantiation: flt_http_comp.c:fd_may_both Unexecuted instantiation: frontend.c:fd_may_both Unexecuted instantiation: haproxy.c:fd_may_both Unexecuted instantiation: http_ana.c:fd_may_both Unexecuted instantiation: http_ext.c:fd_may_both Unexecuted instantiation: http_htx.c:fd_may_both Unexecuted instantiation: http_rules.c:fd_may_both Unexecuted instantiation: lb_chash.c:fd_may_both Unexecuted instantiation: lb_fwlc.c:fd_may_both Unexecuted instantiation: limits.c:fd_may_both Unexecuted instantiation: listener.c:fd_may_both Unexecuted instantiation: log.c:fd_may_both Unexecuted instantiation: mailers.c:fd_may_both Unexecuted instantiation: mworker.c:fd_may_both Unexecuted instantiation: peers.c:fd_may_both Unexecuted instantiation: pool.c:fd_may_both Unexecuted instantiation: proto_rhttp.c:fd_may_both Unexecuted instantiation: proto_sockpair.c:fd_may_both Unexecuted instantiation: proxy.c:fd_may_both Unexecuted instantiation: queue.c:fd_may_both Unexecuted instantiation: resolvers.c:fd_may_both Unexecuted instantiation: ring.c:fd_may_both Unexecuted instantiation: sample.c:fd_may_both Unexecuted instantiation: server.c:fd_may_both Unexecuted instantiation: session.c:fd_may_both Unexecuted instantiation: signal.c:fd_may_both Unexecuted instantiation: sink.c:fd_may_both Unexecuted instantiation: sock.c:fd_may_both Unexecuted instantiation: sock_inet.c:fd_may_both Unexecuted instantiation: stats-html.c:fd_may_both Unexecuted instantiation: stats.c:fd_may_both Unexecuted instantiation: stconn.c:fd_may_both Unexecuted instantiation: stick_table.c:fd_may_both Unexecuted instantiation: stream.c:fd_may_both Unexecuted instantiation: task.c:fd_may_both Unexecuted instantiation: tcp_rules.c:fd_may_both Unexecuted instantiation: tcpcheck.c:fd_may_both Unexecuted instantiation: thread.c:fd_may_both Unexecuted instantiation: tools.c:fd_may_both Unexecuted instantiation: trace.c:fd_may_both Unexecuted instantiation: vars.c:fd_may_both Unexecuted instantiation: action.c:fd_may_both Unexecuted instantiation: activity.c:fd_may_both Unexecuted instantiation: applet.c:fd_may_both Unexecuted instantiation: backend.c:fd_may_both Unexecuted instantiation: cache.c:fd_may_both Unexecuted instantiation: cfgparse-global.c:fd_may_both Unexecuted instantiation: cfgparse-listen.c:fd_may_both Unexecuted instantiation: channel.c:fd_may_both Unexecuted instantiation: check.c:fd_may_both Unexecuted instantiation: compression.c:fd_may_both Unexecuted instantiation: dgram.c:fd_may_both Unexecuted instantiation: dns.c:fd_may_both Unexecuted instantiation: dns_ring.c:fd_may_both Unexecuted instantiation: event_hdl.c:fd_may_both Unexecuted instantiation: extcheck.c:fd_may_both Unexecuted instantiation: fcgi-app.c:fd_may_both Unexecuted instantiation: http_fetch.c:fd_may_both Unexecuted instantiation: mux_spop.c:fd_may_both Unexecuted instantiation: pattern.c:fd_may_both Unexecuted instantiation: payload.c:fd_may_both Unexecuted instantiation: proto_tcp.c:fd_may_both Unexecuted instantiation: stats-json.c:fd_may_both Unexecuted instantiation: stats-proxy.c:fd_may_both Unexecuted instantiation: flt_spoe.c:fd_may_both |
273 | | |
274 | | /* Report that FD <fd> cannot send anymore without polling (EAGAIN detected). */ |
275 | | static inline void fd_cant_send(const int fd) |
276 | 0 | { |
277 | | /* removing ready never changes polled status */ |
278 | 0 | if (!(fdtab[fd].state & FD_EV_READY_W) || |
279 | 0 | !HA_ATOMIC_BTR(&fdtab[fd].state, FD_EV_READY_W_BIT)) |
280 | 0 | return; |
281 | 0 | } Unexecuted instantiation: cfgparse.c:fd_cant_send Unexecuted instantiation: cli.c:fd_cant_send Unexecuted instantiation: connection.c:fd_cant_send Unexecuted instantiation: debug.c:fd_cant_send Unexecuted instantiation: errors.c:fd_cant_send Unexecuted instantiation: fd.c:fd_cant_send Unexecuted instantiation: filters.c:fd_cant_send Unexecuted instantiation: flt_http_comp.c:fd_cant_send Unexecuted instantiation: frontend.c:fd_cant_send Unexecuted instantiation: haproxy.c:fd_cant_send Unexecuted instantiation: http_ana.c:fd_cant_send Unexecuted instantiation: http_ext.c:fd_cant_send Unexecuted instantiation: http_htx.c:fd_cant_send Unexecuted instantiation: http_rules.c:fd_cant_send Unexecuted instantiation: lb_chash.c:fd_cant_send Unexecuted instantiation: lb_fwlc.c:fd_cant_send Unexecuted instantiation: limits.c:fd_cant_send Unexecuted instantiation: listener.c:fd_cant_send Unexecuted instantiation: log.c:fd_cant_send Unexecuted instantiation: mailers.c:fd_cant_send Unexecuted instantiation: mworker.c:fd_cant_send Unexecuted instantiation: peers.c:fd_cant_send Unexecuted instantiation: pool.c:fd_cant_send Unexecuted instantiation: proto_rhttp.c:fd_cant_send Unexecuted instantiation: proto_sockpair.c:fd_cant_send Unexecuted instantiation: proxy.c:fd_cant_send Unexecuted instantiation: queue.c:fd_cant_send Unexecuted instantiation: resolvers.c:fd_cant_send Unexecuted instantiation: ring.c:fd_cant_send Unexecuted instantiation: sample.c:fd_cant_send Unexecuted instantiation: server.c:fd_cant_send Unexecuted instantiation: session.c:fd_cant_send Unexecuted instantiation: signal.c:fd_cant_send Unexecuted instantiation: sink.c:fd_cant_send Unexecuted instantiation: sock.c:fd_cant_send Unexecuted instantiation: sock_inet.c:fd_cant_send Unexecuted instantiation: stats-html.c:fd_cant_send Unexecuted instantiation: stats.c:fd_cant_send Unexecuted instantiation: stconn.c:fd_cant_send Unexecuted instantiation: stick_table.c:fd_cant_send Unexecuted instantiation: stream.c:fd_cant_send Unexecuted instantiation: task.c:fd_cant_send Unexecuted instantiation: tcp_rules.c:fd_cant_send Unexecuted instantiation: tcpcheck.c:fd_cant_send Unexecuted instantiation: thread.c:fd_cant_send Unexecuted instantiation: tools.c:fd_cant_send Unexecuted instantiation: trace.c:fd_cant_send Unexecuted instantiation: vars.c:fd_cant_send Unexecuted instantiation: action.c:fd_cant_send Unexecuted instantiation: activity.c:fd_cant_send Unexecuted instantiation: applet.c:fd_cant_send Unexecuted instantiation: backend.c:fd_cant_send Unexecuted instantiation: cache.c:fd_cant_send Unexecuted instantiation: cfgparse-global.c:fd_cant_send Unexecuted instantiation: cfgparse-listen.c:fd_cant_send Unexecuted instantiation: channel.c:fd_cant_send Unexecuted instantiation: check.c:fd_cant_send Unexecuted instantiation: compression.c:fd_cant_send Unexecuted instantiation: dgram.c:fd_cant_send Unexecuted instantiation: dns.c:fd_cant_send Unexecuted instantiation: dns_ring.c:fd_cant_send Unexecuted instantiation: event_hdl.c:fd_cant_send Unexecuted instantiation: extcheck.c:fd_cant_send Unexecuted instantiation: fcgi-app.c:fd_cant_send Unexecuted instantiation: http_fetch.c:fd_cant_send Unexecuted instantiation: mux_spop.c:fd_cant_send Unexecuted instantiation: pattern.c:fd_cant_send Unexecuted instantiation: payload.c:fd_cant_send Unexecuted instantiation: proto_tcp.c:fd_cant_send Unexecuted instantiation: stats-json.c:fd_cant_send Unexecuted instantiation: stats-proxy.c:fd_cant_send Unexecuted instantiation: flt_spoe.c:fd_cant_send |
282 | | |
283 | | /* Report that FD <fd> may send again without polling (EAGAIN not detected). */ |
284 | | static inline void fd_may_send(const int fd) |
285 | 0 | { |
286 | | /* marking ready never changes polled status */ |
287 | 0 | if ((fdtab[fd].state & FD_EV_READY_W) || |
288 | 0 | HA_ATOMIC_BTS(&fdtab[fd].state, FD_EV_READY_W_BIT)) |
289 | 0 | return; |
290 | 0 | } Unexecuted instantiation: cfgparse.c:fd_may_send Unexecuted instantiation: cli.c:fd_may_send Unexecuted instantiation: connection.c:fd_may_send Unexecuted instantiation: debug.c:fd_may_send Unexecuted instantiation: errors.c:fd_may_send Unexecuted instantiation: fd.c:fd_may_send Unexecuted instantiation: filters.c:fd_may_send Unexecuted instantiation: flt_http_comp.c:fd_may_send Unexecuted instantiation: frontend.c:fd_may_send Unexecuted instantiation: haproxy.c:fd_may_send Unexecuted instantiation: http_ana.c:fd_may_send Unexecuted instantiation: http_ext.c:fd_may_send Unexecuted instantiation: http_htx.c:fd_may_send Unexecuted instantiation: http_rules.c:fd_may_send Unexecuted instantiation: lb_chash.c:fd_may_send Unexecuted instantiation: lb_fwlc.c:fd_may_send Unexecuted instantiation: limits.c:fd_may_send Unexecuted instantiation: listener.c:fd_may_send Unexecuted instantiation: log.c:fd_may_send Unexecuted instantiation: mailers.c:fd_may_send Unexecuted instantiation: mworker.c:fd_may_send Unexecuted instantiation: peers.c:fd_may_send Unexecuted instantiation: pool.c:fd_may_send Unexecuted instantiation: proto_rhttp.c:fd_may_send Unexecuted instantiation: proto_sockpair.c:fd_may_send Unexecuted instantiation: proxy.c:fd_may_send Unexecuted instantiation: queue.c:fd_may_send Unexecuted instantiation: resolvers.c:fd_may_send Unexecuted instantiation: ring.c:fd_may_send Unexecuted instantiation: sample.c:fd_may_send Unexecuted instantiation: server.c:fd_may_send Unexecuted instantiation: session.c:fd_may_send Unexecuted instantiation: signal.c:fd_may_send Unexecuted instantiation: sink.c:fd_may_send Unexecuted instantiation: sock.c:fd_may_send Unexecuted instantiation: sock_inet.c:fd_may_send Unexecuted instantiation: stats-html.c:fd_may_send Unexecuted instantiation: stats.c:fd_may_send Unexecuted instantiation: stconn.c:fd_may_send Unexecuted instantiation: stick_table.c:fd_may_send Unexecuted instantiation: stream.c:fd_may_send Unexecuted instantiation: task.c:fd_may_send Unexecuted instantiation: tcp_rules.c:fd_may_send Unexecuted instantiation: tcpcheck.c:fd_may_send Unexecuted instantiation: thread.c:fd_may_send Unexecuted instantiation: tools.c:fd_may_send Unexecuted instantiation: trace.c:fd_may_send Unexecuted instantiation: vars.c:fd_may_send Unexecuted instantiation: action.c:fd_may_send Unexecuted instantiation: activity.c:fd_may_send Unexecuted instantiation: applet.c:fd_may_send Unexecuted instantiation: backend.c:fd_may_send Unexecuted instantiation: cache.c:fd_may_send Unexecuted instantiation: cfgparse-global.c:fd_may_send Unexecuted instantiation: cfgparse-listen.c:fd_may_send Unexecuted instantiation: channel.c:fd_may_send Unexecuted instantiation: check.c:fd_may_send Unexecuted instantiation: compression.c:fd_may_send Unexecuted instantiation: dgram.c:fd_may_send Unexecuted instantiation: dns.c:fd_may_send Unexecuted instantiation: dns_ring.c:fd_may_send Unexecuted instantiation: event_hdl.c:fd_may_send Unexecuted instantiation: extcheck.c:fd_may_send Unexecuted instantiation: fcgi-app.c:fd_may_send Unexecuted instantiation: http_fetch.c:fd_may_send Unexecuted instantiation: mux_spop.c:fd_may_send Unexecuted instantiation: pattern.c:fd_may_send Unexecuted instantiation: payload.c:fd_may_send Unexecuted instantiation: proto_tcp.c:fd_may_send Unexecuted instantiation: stats-json.c:fd_may_send Unexecuted instantiation: stats-proxy.c:fd_may_send Unexecuted instantiation: flt_spoe.c:fd_may_send |
291 | | |
292 | | /* Prepare FD <fd> to try to receive */ |
293 | | static inline void fd_want_recv(int fd) |
294 | 0 | { |
295 | 0 | if ((fdtab[fd].state & FD_EV_ACTIVE_R) || |
296 | 0 | HA_ATOMIC_BTS(&fdtab[fd].state, FD_EV_ACTIVE_R_BIT)) |
297 | 0 | return; |
298 | 0 | updt_fd_polling(fd); |
299 | 0 | } Unexecuted instantiation: cfgparse.c:fd_want_recv Unexecuted instantiation: cli.c:fd_want_recv Unexecuted instantiation: connection.c:fd_want_recv Unexecuted instantiation: debug.c:fd_want_recv Unexecuted instantiation: errors.c:fd_want_recv Unexecuted instantiation: fd.c:fd_want_recv Unexecuted instantiation: filters.c:fd_want_recv Unexecuted instantiation: flt_http_comp.c:fd_want_recv Unexecuted instantiation: frontend.c:fd_want_recv Unexecuted instantiation: haproxy.c:fd_want_recv Unexecuted instantiation: http_ana.c:fd_want_recv Unexecuted instantiation: http_ext.c:fd_want_recv Unexecuted instantiation: http_htx.c:fd_want_recv Unexecuted instantiation: http_rules.c:fd_want_recv Unexecuted instantiation: lb_chash.c:fd_want_recv Unexecuted instantiation: lb_fwlc.c:fd_want_recv Unexecuted instantiation: limits.c:fd_want_recv Unexecuted instantiation: listener.c:fd_want_recv Unexecuted instantiation: log.c:fd_want_recv Unexecuted instantiation: mailers.c:fd_want_recv Unexecuted instantiation: mworker.c:fd_want_recv Unexecuted instantiation: peers.c:fd_want_recv Unexecuted instantiation: pool.c:fd_want_recv Unexecuted instantiation: proto_rhttp.c:fd_want_recv Unexecuted instantiation: proto_sockpair.c:fd_want_recv Unexecuted instantiation: proxy.c:fd_want_recv Unexecuted instantiation: queue.c:fd_want_recv Unexecuted instantiation: resolvers.c:fd_want_recv Unexecuted instantiation: ring.c:fd_want_recv Unexecuted instantiation: sample.c:fd_want_recv Unexecuted instantiation: server.c:fd_want_recv Unexecuted instantiation: session.c:fd_want_recv Unexecuted instantiation: signal.c:fd_want_recv Unexecuted instantiation: sink.c:fd_want_recv Unexecuted instantiation: sock.c:fd_want_recv Unexecuted instantiation: sock_inet.c:fd_want_recv Unexecuted instantiation: stats-html.c:fd_want_recv Unexecuted instantiation: stats.c:fd_want_recv Unexecuted instantiation: stconn.c:fd_want_recv Unexecuted instantiation: stick_table.c:fd_want_recv Unexecuted instantiation: stream.c:fd_want_recv Unexecuted instantiation: task.c:fd_want_recv Unexecuted instantiation: tcp_rules.c:fd_want_recv Unexecuted instantiation: tcpcheck.c:fd_want_recv Unexecuted instantiation: thread.c:fd_want_recv Unexecuted instantiation: tools.c:fd_want_recv Unexecuted instantiation: trace.c:fd_want_recv Unexecuted instantiation: vars.c:fd_want_recv Unexecuted instantiation: action.c:fd_want_recv Unexecuted instantiation: activity.c:fd_want_recv Unexecuted instantiation: applet.c:fd_want_recv Unexecuted instantiation: backend.c:fd_want_recv Unexecuted instantiation: cache.c:fd_want_recv Unexecuted instantiation: cfgparse-global.c:fd_want_recv Unexecuted instantiation: cfgparse-listen.c:fd_want_recv Unexecuted instantiation: channel.c:fd_want_recv Unexecuted instantiation: check.c:fd_want_recv Unexecuted instantiation: compression.c:fd_want_recv Unexecuted instantiation: dgram.c:fd_want_recv Unexecuted instantiation: dns.c:fd_want_recv Unexecuted instantiation: dns_ring.c:fd_want_recv Unexecuted instantiation: event_hdl.c:fd_want_recv Unexecuted instantiation: extcheck.c:fd_want_recv Unexecuted instantiation: fcgi-app.c:fd_want_recv Unexecuted instantiation: http_fetch.c:fd_want_recv Unexecuted instantiation: mux_spop.c:fd_want_recv Unexecuted instantiation: pattern.c:fd_want_recv Unexecuted instantiation: payload.c:fd_want_recv Unexecuted instantiation: proto_tcp.c:fd_want_recv Unexecuted instantiation: stats-json.c:fd_want_recv Unexecuted instantiation: stats-proxy.c:fd_want_recv Unexecuted instantiation: flt_spoe.c:fd_want_recv |
300 | | |
301 | | /* Prepare FD <fd> to try to receive, and only create update if fd_updt exists |
302 | | * (essentially for receivers during early boot). |
303 | | */ |
304 | | static inline void fd_want_recv_safe(int fd) |
305 | 0 | { |
306 | 0 | if ((fdtab[fd].state & FD_EV_ACTIVE_R) || |
307 | 0 | HA_ATOMIC_BTS(&fdtab[fd].state, FD_EV_ACTIVE_R_BIT)) |
308 | 0 | return; |
309 | 0 | if (fd_updt) |
310 | 0 | updt_fd_polling(fd); |
311 | 0 | } Unexecuted instantiation: cfgparse.c:fd_want_recv_safe Unexecuted instantiation: cli.c:fd_want_recv_safe Unexecuted instantiation: connection.c:fd_want_recv_safe Unexecuted instantiation: debug.c:fd_want_recv_safe Unexecuted instantiation: errors.c:fd_want_recv_safe Unexecuted instantiation: fd.c:fd_want_recv_safe Unexecuted instantiation: filters.c:fd_want_recv_safe Unexecuted instantiation: flt_http_comp.c:fd_want_recv_safe Unexecuted instantiation: frontend.c:fd_want_recv_safe Unexecuted instantiation: haproxy.c:fd_want_recv_safe Unexecuted instantiation: http_ana.c:fd_want_recv_safe Unexecuted instantiation: http_ext.c:fd_want_recv_safe Unexecuted instantiation: http_htx.c:fd_want_recv_safe Unexecuted instantiation: http_rules.c:fd_want_recv_safe Unexecuted instantiation: lb_chash.c:fd_want_recv_safe Unexecuted instantiation: lb_fwlc.c:fd_want_recv_safe Unexecuted instantiation: limits.c:fd_want_recv_safe Unexecuted instantiation: listener.c:fd_want_recv_safe Unexecuted instantiation: log.c:fd_want_recv_safe Unexecuted instantiation: mailers.c:fd_want_recv_safe Unexecuted instantiation: mworker.c:fd_want_recv_safe Unexecuted instantiation: peers.c:fd_want_recv_safe Unexecuted instantiation: pool.c:fd_want_recv_safe Unexecuted instantiation: proto_rhttp.c:fd_want_recv_safe Unexecuted instantiation: proto_sockpair.c:fd_want_recv_safe Unexecuted instantiation: proxy.c:fd_want_recv_safe Unexecuted instantiation: queue.c:fd_want_recv_safe Unexecuted instantiation: resolvers.c:fd_want_recv_safe Unexecuted instantiation: ring.c:fd_want_recv_safe Unexecuted instantiation: sample.c:fd_want_recv_safe Unexecuted instantiation: server.c:fd_want_recv_safe Unexecuted instantiation: session.c:fd_want_recv_safe Unexecuted instantiation: signal.c:fd_want_recv_safe Unexecuted instantiation: sink.c:fd_want_recv_safe Unexecuted instantiation: sock.c:fd_want_recv_safe Unexecuted instantiation: sock_inet.c:fd_want_recv_safe Unexecuted instantiation: stats-html.c:fd_want_recv_safe Unexecuted instantiation: stats.c:fd_want_recv_safe Unexecuted instantiation: stconn.c:fd_want_recv_safe Unexecuted instantiation: stick_table.c:fd_want_recv_safe Unexecuted instantiation: stream.c:fd_want_recv_safe Unexecuted instantiation: task.c:fd_want_recv_safe Unexecuted instantiation: tcp_rules.c:fd_want_recv_safe Unexecuted instantiation: tcpcheck.c:fd_want_recv_safe Unexecuted instantiation: thread.c:fd_want_recv_safe Unexecuted instantiation: tools.c:fd_want_recv_safe Unexecuted instantiation: trace.c:fd_want_recv_safe Unexecuted instantiation: vars.c:fd_want_recv_safe Unexecuted instantiation: action.c:fd_want_recv_safe Unexecuted instantiation: activity.c:fd_want_recv_safe Unexecuted instantiation: applet.c:fd_want_recv_safe Unexecuted instantiation: backend.c:fd_want_recv_safe Unexecuted instantiation: cache.c:fd_want_recv_safe Unexecuted instantiation: cfgparse-global.c:fd_want_recv_safe Unexecuted instantiation: cfgparse-listen.c:fd_want_recv_safe Unexecuted instantiation: channel.c:fd_want_recv_safe Unexecuted instantiation: check.c:fd_want_recv_safe Unexecuted instantiation: compression.c:fd_want_recv_safe Unexecuted instantiation: dgram.c:fd_want_recv_safe Unexecuted instantiation: dns.c:fd_want_recv_safe Unexecuted instantiation: dns_ring.c:fd_want_recv_safe Unexecuted instantiation: event_hdl.c:fd_want_recv_safe Unexecuted instantiation: extcheck.c:fd_want_recv_safe Unexecuted instantiation: fcgi-app.c:fd_want_recv_safe Unexecuted instantiation: http_fetch.c:fd_want_recv_safe Unexecuted instantiation: mux_spop.c:fd_want_recv_safe Unexecuted instantiation: pattern.c:fd_want_recv_safe Unexecuted instantiation: payload.c:fd_want_recv_safe Unexecuted instantiation: proto_tcp.c:fd_want_recv_safe Unexecuted instantiation: stats-json.c:fd_want_recv_safe Unexecuted instantiation: stats-proxy.c:fd_want_recv_safe Unexecuted instantiation: flt_spoe.c:fd_want_recv_safe |
312 | | |
313 | | /* Prepare FD <fd> to try to send */ |
314 | | static inline void fd_want_send(int fd) |
315 | 0 | { |
316 | 0 | if ((fdtab[fd].state & FD_EV_ACTIVE_W) || |
317 | 0 | HA_ATOMIC_BTS(&fdtab[fd].state, FD_EV_ACTIVE_W_BIT)) |
318 | 0 | return; |
319 | 0 | updt_fd_polling(fd); |
320 | 0 | } Unexecuted instantiation: cfgparse.c:fd_want_send Unexecuted instantiation: cli.c:fd_want_send Unexecuted instantiation: connection.c:fd_want_send Unexecuted instantiation: debug.c:fd_want_send Unexecuted instantiation: errors.c:fd_want_send Unexecuted instantiation: fd.c:fd_want_send Unexecuted instantiation: filters.c:fd_want_send Unexecuted instantiation: flt_http_comp.c:fd_want_send Unexecuted instantiation: frontend.c:fd_want_send Unexecuted instantiation: haproxy.c:fd_want_send Unexecuted instantiation: http_ana.c:fd_want_send Unexecuted instantiation: http_ext.c:fd_want_send Unexecuted instantiation: http_htx.c:fd_want_send Unexecuted instantiation: http_rules.c:fd_want_send Unexecuted instantiation: lb_chash.c:fd_want_send Unexecuted instantiation: lb_fwlc.c:fd_want_send Unexecuted instantiation: limits.c:fd_want_send Unexecuted instantiation: listener.c:fd_want_send Unexecuted instantiation: log.c:fd_want_send Unexecuted instantiation: mailers.c:fd_want_send Unexecuted instantiation: mworker.c:fd_want_send Unexecuted instantiation: peers.c:fd_want_send Unexecuted instantiation: pool.c:fd_want_send Unexecuted instantiation: proto_rhttp.c:fd_want_send Unexecuted instantiation: proto_sockpair.c:fd_want_send Unexecuted instantiation: proxy.c:fd_want_send Unexecuted instantiation: queue.c:fd_want_send Unexecuted instantiation: resolvers.c:fd_want_send Unexecuted instantiation: ring.c:fd_want_send Unexecuted instantiation: sample.c:fd_want_send Unexecuted instantiation: server.c:fd_want_send Unexecuted instantiation: session.c:fd_want_send Unexecuted instantiation: signal.c:fd_want_send Unexecuted instantiation: sink.c:fd_want_send Unexecuted instantiation: sock.c:fd_want_send Unexecuted instantiation: sock_inet.c:fd_want_send Unexecuted instantiation: stats-html.c:fd_want_send Unexecuted instantiation: stats.c:fd_want_send Unexecuted instantiation: stconn.c:fd_want_send Unexecuted instantiation: stick_table.c:fd_want_send Unexecuted instantiation: stream.c:fd_want_send Unexecuted instantiation: task.c:fd_want_send Unexecuted instantiation: tcp_rules.c:fd_want_send Unexecuted instantiation: tcpcheck.c:fd_want_send Unexecuted instantiation: thread.c:fd_want_send Unexecuted instantiation: tools.c:fd_want_send Unexecuted instantiation: trace.c:fd_want_send Unexecuted instantiation: vars.c:fd_want_send Unexecuted instantiation: action.c:fd_want_send Unexecuted instantiation: activity.c:fd_want_send Unexecuted instantiation: applet.c:fd_want_send Unexecuted instantiation: backend.c:fd_want_send Unexecuted instantiation: cache.c:fd_want_send Unexecuted instantiation: cfgparse-global.c:fd_want_send Unexecuted instantiation: cfgparse-listen.c:fd_want_send Unexecuted instantiation: channel.c:fd_want_send Unexecuted instantiation: check.c:fd_want_send Unexecuted instantiation: compression.c:fd_want_send Unexecuted instantiation: dgram.c:fd_want_send Unexecuted instantiation: dns.c:fd_want_send Unexecuted instantiation: dns_ring.c:fd_want_send Unexecuted instantiation: event_hdl.c:fd_want_send Unexecuted instantiation: extcheck.c:fd_want_send Unexecuted instantiation: fcgi-app.c:fd_want_send Unexecuted instantiation: http_fetch.c:fd_want_send Unexecuted instantiation: mux_spop.c:fd_want_send Unexecuted instantiation: pattern.c:fd_want_send Unexecuted instantiation: payload.c:fd_want_send Unexecuted instantiation: proto_tcp.c:fd_want_send Unexecuted instantiation: stats-json.c:fd_want_send Unexecuted instantiation: stats-proxy.c:fd_want_send Unexecuted instantiation: flt_spoe.c:fd_want_send |
321 | | |
322 | | /* returns the tgid from an fd (masks the refcount) */ |
323 | | static forceinline int fd_tgid(int fd) |
324 | 0 | { |
325 | 0 | return _HA_ATOMIC_LOAD(&fdtab[fd].refc_tgid) & 0xFFFF; |
326 | 0 | } Unexecuted instantiation: cfgparse.c:fd_tgid Unexecuted instantiation: cli.c:fd_tgid Unexecuted instantiation: connection.c:fd_tgid Unexecuted instantiation: debug.c:fd_tgid Unexecuted instantiation: errors.c:fd_tgid Unexecuted instantiation: fd.c:fd_tgid Unexecuted instantiation: filters.c:fd_tgid Unexecuted instantiation: flt_http_comp.c:fd_tgid Unexecuted instantiation: frontend.c:fd_tgid Unexecuted instantiation: haproxy.c:fd_tgid Unexecuted instantiation: http_ana.c:fd_tgid Unexecuted instantiation: http_ext.c:fd_tgid Unexecuted instantiation: http_htx.c:fd_tgid Unexecuted instantiation: http_rules.c:fd_tgid Unexecuted instantiation: lb_chash.c:fd_tgid Unexecuted instantiation: lb_fwlc.c:fd_tgid Unexecuted instantiation: limits.c:fd_tgid Unexecuted instantiation: listener.c:fd_tgid Unexecuted instantiation: log.c:fd_tgid Unexecuted instantiation: mailers.c:fd_tgid Unexecuted instantiation: mworker.c:fd_tgid Unexecuted instantiation: peers.c:fd_tgid Unexecuted instantiation: pool.c:fd_tgid Unexecuted instantiation: proto_rhttp.c:fd_tgid Unexecuted instantiation: proto_sockpair.c:fd_tgid Unexecuted instantiation: proxy.c:fd_tgid Unexecuted instantiation: queue.c:fd_tgid Unexecuted instantiation: resolvers.c:fd_tgid Unexecuted instantiation: ring.c:fd_tgid Unexecuted instantiation: sample.c:fd_tgid Unexecuted instantiation: server.c:fd_tgid Unexecuted instantiation: session.c:fd_tgid Unexecuted instantiation: signal.c:fd_tgid Unexecuted instantiation: sink.c:fd_tgid Unexecuted instantiation: sock.c:fd_tgid Unexecuted instantiation: sock_inet.c:fd_tgid Unexecuted instantiation: stats-html.c:fd_tgid Unexecuted instantiation: stats.c:fd_tgid Unexecuted instantiation: stconn.c:fd_tgid Unexecuted instantiation: stick_table.c:fd_tgid Unexecuted instantiation: stream.c:fd_tgid Unexecuted instantiation: task.c:fd_tgid Unexecuted instantiation: tcp_rules.c:fd_tgid Unexecuted instantiation: tcpcheck.c:fd_tgid Unexecuted instantiation: thread.c:fd_tgid Unexecuted instantiation: tools.c:fd_tgid Unexecuted instantiation: trace.c:fd_tgid Unexecuted instantiation: vars.c:fd_tgid Unexecuted instantiation: action.c:fd_tgid Unexecuted instantiation: activity.c:fd_tgid Unexecuted instantiation: applet.c:fd_tgid Unexecuted instantiation: backend.c:fd_tgid Unexecuted instantiation: cache.c:fd_tgid Unexecuted instantiation: cfgparse-global.c:fd_tgid Unexecuted instantiation: cfgparse-listen.c:fd_tgid Unexecuted instantiation: channel.c:fd_tgid Unexecuted instantiation: check.c:fd_tgid Unexecuted instantiation: compression.c:fd_tgid Unexecuted instantiation: dgram.c:fd_tgid Unexecuted instantiation: dns.c:fd_tgid Unexecuted instantiation: dns_ring.c:fd_tgid Unexecuted instantiation: event_hdl.c:fd_tgid Unexecuted instantiation: extcheck.c:fd_tgid Unexecuted instantiation: fcgi-app.c:fd_tgid Unexecuted instantiation: http_fetch.c:fd_tgid Unexecuted instantiation: mux_spop.c:fd_tgid Unexecuted instantiation: pattern.c:fd_tgid Unexecuted instantiation: payload.c:fd_tgid Unexecuted instantiation: proto_tcp.c:fd_tgid Unexecuted instantiation: stats-json.c:fd_tgid Unexecuted instantiation: stats-proxy.c:fd_tgid Unexecuted instantiation: flt_spoe.c:fd_tgid |
327 | | |
328 | | /* Release a tgid previously taken by fd_grab_tgid() */ |
329 | | static forceinline void fd_drop_tgid(int fd) |
330 | 0 | { |
331 | 0 | HA_ATOMIC_SUB(&fdtab[fd].refc_tgid, 0x10000); |
332 | 0 | } Unexecuted instantiation: cfgparse.c:fd_drop_tgid Unexecuted instantiation: cli.c:fd_drop_tgid Unexecuted instantiation: connection.c:fd_drop_tgid Unexecuted instantiation: debug.c:fd_drop_tgid Unexecuted instantiation: errors.c:fd_drop_tgid Unexecuted instantiation: fd.c:fd_drop_tgid Unexecuted instantiation: filters.c:fd_drop_tgid Unexecuted instantiation: flt_http_comp.c:fd_drop_tgid Unexecuted instantiation: frontend.c:fd_drop_tgid Unexecuted instantiation: haproxy.c:fd_drop_tgid Unexecuted instantiation: http_ana.c:fd_drop_tgid Unexecuted instantiation: http_ext.c:fd_drop_tgid Unexecuted instantiation: http_htx.c:fd_drop_tgid Unexecuted instantiation: http_rules.c:fd_drop_tgid Unexecuted instantiation: lb_chash.c:fd_drop_tgid Unexecuted instantiation: lb_fwlc.c:fd_drop_tgid Unexecuted instantiation: limits.c:fd_drop_tgid Unexecuted instantiation: listener.c:fd_drop_tgid Unexecuted instantiation: log.c:fd_drop_tgid Unexecuted instantiation: mailers.c:fd_drop_tgid Unexecuted instantiation: mworker.c:fd_drop_tgid Unexecuted instantiation: peers.c:fd_drop_tgid Unexecuted instantiation: pool.c:fd_drop_tgid Unexecuted instantiation: proto_rhttp.c:fd_drop_tgid Unexecuted instantiation: proto_sockpair.c:fd_drop_tgid Unexecuted instantiation: proxy.c:fd_drop_tgid Unexecuted instantiation: queue.c:fd_drop_tgid Unexecuted instantiation: resolvers.c:fd_drop_tgid Unexecuted instantiation: ring.c:fd_drop_tgid Unexecuted instantiation: sample.c:fd_drop_tgid Unexecuted instantiation: server.c:fd_drop_tgid Unexecuted instantiation: session.c:fd_drop_tgid Unexecuted instantiation: signal.c:fd_drop_tgid Unexecuted instantiation: sink.c:fd_drop_tgid Unexecuted instantiation: sock.c:fd_drop_tgid Unexecuted instantiation: sock_inet.c:fd_drop_tgid Unexecuted instantiation: stats-html.c:fd_drop_tgid Unexecuted instantiation: stats.c:fd_drop_tgid Unexecuted instantiation: stconn.c:fd_drop_tgid Unexecuted instantiation: stick_table.c:fd_drop_tgid Unexecuted instantiation: stream.c:fd_drop_tgid Unexecuted instantiation: task.c:fd_drop_tgid Unexecuted instantiation: tcp_rules.c:fd_drop_tgid Unexecuted instantiation: tcpcheck.c:fd_drop_tgid Unexecuted instantiation: thread.c:fd_drop_tgid Unexecuted instantiation: tools.c:fd_drop_tgid Unexecuted instantiation: trace.c:fd_drop_tgid Unexecuted instantiation: vars.c:fd_drop_tgid Unexecuted instantiation: action.c:fd_drop_tgid Unexecuted instantiation: activity.c:fd_drop_tgid Unexecuted instantiation: applet.c:fd_drop_tgid Unexecuted instantiation: backend.c:fd_drop_tgid Unexecuted instantiation: cache.c:fd_drop_tgid Unexecuted instantiation: cfgparse-global.c:fd_drop_tgid Unexecuted instantiation: cfgparse-listen.c:fd_drop_tgid Unexecuted instantiation: channel.c:fd_drop_tgid Unexecuted instantiation: check.c:fd_drop_tgid Unexecuted instantiation: compression.c:fd_drop_tgid Unexecuted instantiation: dgram.c:fd_drop_tgid Unexecuted instantiation: dns.c:fd_drop_tgid Unexecuted instantiation: dns_ring.c:fd_drop_tgid Unexecuted instantiation: event_hdl.c:fd_drop_tgid Unexecuted instantiation: extcheck.c:fd_drop_tgid Unexecuted instantiation: fcgi-app.c:fd_drop_tgid Unexecuted instantiation: http_fetch.c:fd_drop_tgid Unexecuted instantiation: mux_spop.c:fd_drop_tgid Unexecuted instantiation: pattern.c:fd_drop_tgid Unexecuted instantiation: payload.c:fd_drop_tgid Unexecuted instantiation: proto_tcp.c:fd_drop_tgid Unexecuted instantiation: stats-json.c:fd_drop_tgid Unexecuted instantiation: stats-proxy.c:fd_drop_tgid Unexecuted instantiation: flt_spoe.c:fd_drop_tgid |
333 | | |
334 | | /* Unlock a tgid currently locked by fd_lock_tgid(). This will effectively |
335 | | * allow threads from the FD's tgid to check the masks and manipulate the FD. |
336 | | */ |
337 | | static forceinline void fd_unlock_tgid(int fd) |
338 | 0 | { |
339 | 0 | HA_ATOMIC_AND(&fdtab[fd].refc_tgid, 0xffff7fffU); |
340 | 0 | } Unexecuted instantiation: cfgparse.c:fd_unlock_tgid Unexecuted instantiation: cli.c:fd_unlock_tgid Unexecuted instantiation: connection.c:fd_unlock_tgid Unexecuted instantiation: debug.c:fd_unlock_tgid Unexecuted instantiation: errors.c:fd_unlock_tgid Unexecuted instantiation: fd.c:fd_unlock_tgid Unexecuted instantiation: filters.c:fd_unlock_tgid Unexecuted instantiation: flt_http_comp.c:fd_unlock_tgid Unexecuted instantiation: frontend.c:fd_unlock_tgid Unexecuted instantiation: haproxy.c:fd_unlock_tgid Unexecuted instantiation: http_ana.c:fd_unlock_tgid Unexecuted instantiation: http_ext.c:fd_unlock_tgid Unexecuted instantiation: http_htx.c:fd_unlock_tgid Unexecuted instantiation: http_rules.c:fd_unlock_tgid Unexecuted instantiation: lb_chash.c:fd_unlock_tgid Unexecuted instantiation: lb_fwlc.c:fd_unlock_tgid Unexecuted instantiation: limits.c:fd_unlock_tgid Unexecuted instantiation: listener.c:fd_unlock_tgid Unexecuted instantiation: log.c:fd_unlock_tgid Unexecuted instantiation: mailers.c:fd_unlock_tgid Unexecuted instantiation: mworker.c:fd_unlock_tgid Unexecuted instantiation: peers.c:fd_unlock_tgid Unexecuted instantiation: pool.c:fd_unlock_tgid Unexecuted instantiation: proto_rhttp.c:fd_unlock_tgid Unexecuted instantiation: proto_sockpair.c:fd_unlock_tgid Unexecuted instantiation: proxy.c:fd_unlock_tgid Unexecuted instantiation: queue.c:fd_unlock_tgid Unexecuted instantiation: resolvers.c:fd_unlock_tgid Unexecuted instantiation: ring.c:fd_unlock_tgid Unexecuted instantiation: sample.c:fd_unlock_tgid Unexecuted instantiation: server.c:fd_unlock_tgid Unexecuted instantiation: session.c:fd_unlock_tgid Unexecuted instantiation: signal.c:fd_unlock_tgid Unexecuted instantiation: sink.c:fd_unlock_tgid Unexecuted instantiation: sock.c:fd_unlock_tgid Unexecuted instantiation: sock_inet.c:fd_unlock_tgid Unexecuted instantiation: stats-html.c:fd_unlock_tgid Unexecuted instantiation: stats.c:fd_unlock_tgid Unexecuted instantiation: stconn.c:fd_unlock_tgid Unexecuted instantiation: stick_table.c:fd_unlock_tgid Unexecuted instantiation: stream.c:fd_unlock_tgid Unexecuted instantiation: task.c:fd_unlock_tgid Unexecuted instantiation: tcp_rules.c:fd_unlock_tgid Unexecuted instantiation: tcpcheck.c:fd_unlock_tgid Unexecuted instantiation: thread.c:fd_unlock_tgid Unexecuted instantiation: tools.c:fd_unlock_tgid Unexecuted instantiation: trace.c:fd_unlock_tgid Unexecuted instantiation: vars.c:fd_unlock_tgid Unexecuted instantiation: action.c:fd_unlock_tgid Unexecuted instantiation: activity.c:fd_unlock_tgid Unexecuted instantiation: applet.c:fd_unlock_tgid Unexecuted instantiation: backend.c:fd_unlock_tgid Unexecuted instantiation: cache.c:fd_unlock_tgid Unexecuted instantiation: cfgparse-global.c:fd_unlock_tgid Unexecuted instantiation: cfgparse-listen.c:fd_unlock_tgid Unexecuted instantiation: channel.c:fd_unlock_tgid Unexecuted instantiation: check.c:fd_unlock_tgid Unexecuted instantiation: compression.c:fd_unlock_tgid Unexecuted instantiation: dgram.c:fd_unlock_tgid Unexecuted instantiation: dns.c:fd_unlock_tgid Unexecuted instantiation: dns_ring.c:fd_unlock_tgid Unexecuted instantiation: event_hdl.c:fd_unlock_tgid Unexecuted instantiation: extcheck.c:fd_unlock_tgid Unexecuted instantiation: fcgi-app.c:fd_unlock_tgid Unexecuted instantiation: http_fetch.c:fd_unlock_tgid Unexecuted instantiation: mux_spop.c:fd_unlock_tgid Unexecuted instantiation: pattern.c:fd_unlock_tgid Unexecuted instantiation: payload.c:fd_unlock_tgid Unexecuted instantiation: proto_tcp.c:fd_unlock_tgid Unexecuted instantiation: stats-json.c:fd_unlock_tgid Unexecuted instantiation: stats-proxy.c:fd_unlock_tgid Unexecuted instantiation: flt_spoe.c:fd_unlock_tgid |
341 | | |
342 | | /* Switch the FD's TGID to the new value with a refcount of 1 and the lock bit |
343 | | * set. It doesn't care about the current TGID, except that it will wait for |
344 | | * the FD not to be already switching and having its refcount cleared. After |
345 | | * the function returns, the caller is free to manipulate the masks, and it |
346 | | * must call fd_unlock_tgid() to drop the lock, allowing threads from the |
347 | | * designated group to use the FD. Finally a call to fd_drop_tgid() will be |
348 | | * needed to drop the reference. |
349 | | */ |
350 | | static inline void fd_lock_tgid(int fd, uint desired_tgid) |
351 | 0 | { |
352 | 0 | uint old; |
353 | |
|
354 | 0 | BUG_ON(!desired_tgid); |
355 | | |
356 | 0 | old = tgid; // assume we start from the caller's tgid |
357 | 0 | desired_tgid |= 0x18000; // refcount=1, lock bit=1. |
358 | |
|
359 | 0 | while (1) { |
360 | 0 | old &= 0x7fff; // expect no lock and refcount==0 |
361 | 0 | if (_HA_ATOMIC_CAS(&fdtab[fd].refc_tgid, &old, desired_tgid)) |
362 | 0 | break; |
363 | 0 | __ha_cpu_relax(); |
364 | 0 | } |
365 | 0 | } Unexecuted instantiation: cfgparse.c:fd_lock_tgid Unexecuted instantiation: cli.c:fd_lock_tgid Unexecuted instantiation: connection.c:fd_lock_tgid Unexecuted instantiation: debug.c:fd_lock_tgid Unexecuted instantiation: errors.c:fd_lock_tgid Unexecuted instantiation: fd.c:fd_lock_tgid Unexecuted instantiation: filters.c:fd_lock_tgid Unexecuted instantiation: flt_http_comp.c:fd_lock_tgid Unexecuted instantiation: frontend.c:fd_lock_tgid Unexecuted instantiation: haproxy.c:fd_lock_tgid Unexecuted instantiation: http_ana.c:fd_lock_tgid Unexecuted instantiation: http_ext.c:fd_lock_tgid Unexecuted instantiation: http_htx.c:fd_lock_tgid Unexecuted instantiation: http_rules.c:fd_lock_tgid Unexecuted instantiation: lb_chash.c:fd_lock_tgid Unexecuted instantiation: lb_fwlc.c:fd_lock_tgid Unexecuted instantiation: limits.c:fd_lock_tgid Unexecuted instantiation: listener.c:fd_lock_tgid Unexecuted instantiation: log.c:fd_lock_tgid Unexecuted instantiation: mailers.c:fd_lock_tgid Unexecuted instantiation: mworker.c:fd_lock_tgid Unexecuted instantiation: peers.c:fd_lock_tgid Unexecuted instantiation: pool.c:fd_lock_tgid Unexecuted instantiation: proto_rhttp.c:fd_lock_tgid Unexecuted instantiation: proto_sockpair.c:fd_lock_tgid Unexecuted instantiation: proxy.c:fd_lock_tgid Unexecuted instantiation: queue.c:fd_lock_tgid Unexecuted instantiation: resolvers.c:fd_lock_tgid Unexecuted instantiation: ring.c:fd_lock_tgid Unexecuted instantiation: sample.c:fd_lock_tgid Unexecuted instantiation: server.c:fd_lock_tgid Unexecuted instantiation: session.c:fd_lock_tgid Unexecuted instantiation: signal.c:fd_lock_tgid Unexecuted instantiation: sink.c:fd_lock_tgid Unexecuted instantiation: sock.c:fd_lock_tgid Unexecuted instantiation: sock_inet.c:fd_lock_tgid Unexecuted instantiation: stats-html.c:fd_lock_tgid Unexecuted instantiation: stats.c:fd_lock_tgid Unexecuted instantiation: stconn.c:fd_lock_tgid Unexecuted instantiation: stick_table.c:fd_lock_tgid Unexecuted instantiation: stream.c:fd_lock_tgid Unexecuted instantiation: task.c:fd_lock_tgid Unexecuted instantiation: tcp_rules.c:fd_lock_tgid Unexecuted instantiation: tcpcheck.c:fd_lock_tgid Unexecuted instantiation: thread.c:fd_lock_tgid Unexecuted instantiation: tools.c:fd_lock_tgid Unexecuted instantiation: trace.c:fd_lock_tgid Unexecuted instantiation: vars.c:fd_lock_tgid Unexecuted instantiation: action.c:fd_lock_tgid Unexecuted instantiation: activity.c:fd_lock_tgid Unexecuted instantiation: applet.c:fd_lock_tgid Unexecuted instantiation: backend.c:fd_lock_tgid Unexecuted instantiation: cache.c:fd_lock_tgid Unexecuted instantiation: cfgparse-global.c:fd_lock_tgid Unexecuted instantiation: cfgparse-listen.c:fd_lock_tgid Unexecuted instantiation: channel.c:fd_lock_tgid Unexecuted instantiation: check.c:fd_lock_tgid Unexecuted instantiation: compression.c:fd_lock_tgid Unexecuted instantiation: dgram.c:fd_lock_tgid Unexecuted instantiation: dns.c:fd_lock_tgid Unexecuted instantiation: dns_ring.c:fd_lock_tgid Unexecuted instantiation: event_hdl.c:fd_lock_tgid Unexecuted instantiation: extcheck.c:fd_lock_tgid Unexecuted instantiation: fcgi-app.c:fd_lock_tgid Unexecuted instantiation: http_fetch.c:fd_lock_tgid Unexecuted instantiation: mux_spop.c:fd_lock_tgid Unexecuted instantiation: pattern.c:fd_lock_tgid Unexecuted instantiation: payload.c:fd_lock_tgid Unexecuted instantiation: proto_tcp.c:fd_lock_tgid Unexecuted instantiation: stats-json.c:fd_lock_tgid Unexecuted instantiation: stats-proxy.c:fd_lock_tgid Unexecuted instantiation: flt_spoe.c:fd_lock_tgid |
366 | | |
367 | | /* |
368 | | * Try to lock the tgid, keeping the current tgid value. |
369 | | * Returns 1 on success, or 0 on failure. |
370 | | */ |
371 | | static inline int fd_lock_tgid_cur(int fd) |
372 | 0 | { |
373 | 0 | uint old = _HA_ATOMIC_LOAD(&fdtab[fd].refc_tgid) & 0x7fff; |
374 | |
|
375 | 0 | if (_HA_ATOMIC_CAS(&fdtab[fd].refc_tgid, &old, (old | 0x8000) + 0x10000)) |
376 | 0 | return 1; |
377 | 0 | return 0; |
378 | 0 | } Unexecuted instantiation: cfgparse.c:fd_lock_tgid_cur Unexecuted instantiation: cli.c:fd_lock_tgid_cur Unexecuted instantiation: connection.c:fd_lock_tgid_cur Unexecuted instantiation: debug.c:fd_lock_tgid_cur Unexecuted instantiation: errors.c:fd_lock_tgid_cur Unexecuted instantiation: fd.c:fd_lock_tgid_cur Unexecuted instantiation: filters.c:fd_lock_tgid_cur Unexecuted instantiation: flt_http_comp.c:fd_lock_tgid_cur Unexecuted instantiation: frontend.c:fd_lock_tgid_cur Unexecuted instantiation: haproxy.c:fd_lock_tgid_cur Unexecuted instantiation: http_ana.c:fd_lock_tgid_cur Unexecuted instantiation: http_ext.c:fd_lock_tgid_cur Unexecuted instantiation: http_htx.c:fd_lock_tgid_cur Unexecuted instantiation: http_rules.c:fd_lock_tgid_cur Unexecuted instantiation: lb_chash.c:fd_lock_tgid_cur Unexecuted instantiation: lb_fwlc.c:fd_lock_tgid_cur Unexecuted instantiation: limits.c:fd_lock_tgid_cur Unexecuted instantiation: listener.c:fd_lock_tgid_cur Unexecuted instantiation: log.c:fd_lock_tgid_cur Unexecuted instantiation: mailers.c:fd_lock_tgid_cur Unexecuted instantiation: mworker.c:fd_lock_tgid_cur Unexecuted instantiation: peers.c:fd_lock_tgid_cur Unexecuted instantiation: pool.c:fd_lock_tgid_cur Unexecuted instantiation: proto_rhttp.c:fd_lock_tgid_cur Unexecuted instantiation: proto_sockpair.c:fd_lock_tgid_cur Unexecuted instantiation: proxy.c:fd_lock_tgid_cur Unexecuted instantiation: queue.c:fd_lock_tgid_cur Unexecuted instantiation: resolvers.c:fd_lock_tgid_cur Unexecuted instantiation: ring.c:fd_lock_tgid_cur Unexecuted instantiation: sample.c:fd_lock_tgid_cur Unexecuted instantiation: server.c:fd_lock_tgid_cur Unexecuted instantiation: session.c:fd_lock_tgid_cur Unexecuted instantiation: signal.c:fd_lock_tgid_cur Unexecuted instantiation: sink.c:fd_lock_tgid_cur Unexecuted instantiation: sock.c:fd_lock_tgid_cur Unexecuted instantiation: sock_inet.c:fd_lock_tgid_cur Unexecuted instantiation: stats-html.c:fd_lock_tgid_cur Unexecuted instantiation: stats.c:fd_lock_tgid_cur Unexecuted instantiation: stconn.c:fd_lock_tgid_cur Unexecuted instantiation: stick_table.c:fd_lock_tgid_cur Unexecuted instantiation: stream.c:fd_lock_tgid_cur Unexecuted instantiation: task.c:fd_lock_tgid_cur Unexecuted instantiation: tcp_rules.c:fd_lock_tgid_cur Unexecuted instantiation: tcpcheck.c:fd_lock_tgid_cur Unexecuted instantiation: thread.c:fd_lock_tgid_cur Unexecuted instantiation: tools.c:fd_lock_tgid_cur Unexecuted instantiation: trace.c:fd_lock_tgid_cur Unexecuted instantiation: vars.c:fd_lock_tgid_cur Unexecuted instantiation: action.c:fd_lock_tgid_cur Unexecuted instantiation: activity.c:fd_lock_tgid_cur Unexecuted instantiation: applet.c:fd_lock_tgid_cur Unexecuted instantiation: backend.c:fd_lock_tgid_cur Unexecuted instantiation: cache.c:fd_lock_tgid_cur Unexecuted instantiation: cfgparse-global.c:fd_lock_tgid_cur Unexecuted instantiation: cfgparse-listen.c:fd_lock_tgid_cur Unexecuted instantiation: channel.c:fd_lock_tgid_cur Unexecuted instantiation: check.c:fd_lock_tgid_cur Unexecuted instantiation: compression.c:fd_lock_tgid_cur Unexecuted instantiation: dgram.c:fd_lock_tgid_cur Unexecuted instantiation: dns.c:fd_lock_tgid_cur Unexecuted instantiation: dns_ring.c:fd_lock_tgid_cur Unexecuted instantiation: event_hdl.c:fd_lock_tgid_cur Unexecuted instantiation: extcheck.c:fd_lock_tgid_cur Unexecuted instantiation: fcgi-app.c:fd_lock_tgid_cur Unexecuted instantiation: http_fetch.c:fd_lock_tgid_cur Unexecuted instantiation: mux_spop.c:fd_lock_tgid_cur Unexecuted instantiation: pattern.c:fd_lock_tgid_cur Unexecuted instantiation: payload.c:fd_lock_tgid_cur Unexecuted instantiation: proto_tcp.c:fd_lock_tgid_cur Unexecuted instantiation: stats-json.c:fd_lock_tgid_cur Unexecuted instantiation: stats-proxy.c:fd_lock_tgid_cur Unexecuted instantiation: flt_spoe.c:fd_lock_tgid_cur |
379 | | |
380 | | |
381 | | /* Grab a reference to the FD's TGID, and return the tgid. Note that a TGID of |
382 | | * zero indicates the FD was closed, thus also fails (i.e. no need to drop it). |
383 | | * On non-zero (success), the caller must release it using fd_drop_tgid(). |
384 | | */ |
385 | | static inline uint fd_take_tgid(int fd) |
386 | 0 | { |
387 | 0 | uint old; |
388 | |
|
389 | 0 | old = _HA_ATOMIC_FETCH_ADD(&fdtab[fd].refc_tgid, 0x10000) & 0xffff; |
390 | 0 | while (old & 0x8000) { |
391 | 0 | old = _HA_ATOMIC_LOAD(&fdtab[fd].refc_tgid) & 0xffff; |
392 | 0 | __ha_cpu_relax(); |
393 | 0 | } |
394 | 0 | if (likely(old)) |
395 | 0 | return old; |
396 | 0 | HA_ATOMIC_SUB(&fdtab[fd].refc_tgid, 0x10000); |
397 | 0 | return 0; |
398 | 0 | } Unexecuted instantiation: cfgparse.c:fd_take_tgid Unexecuted instantiation: cli.c:fd_take_tgid Unexecuted instantiation: connection.c:fd_take_tgid Unexecuted instantiation: debug.c:fd_take_tgid Unexecuted instantiation: errors.c:fd_take_tgid Unexecuted instantiation: fd.c:fd_take_tgid Unexecuted instantiation: filters.c:fd_take_tgid Unexecuted instantiation: flt_http_comp.c:fd_take_tgid Unexecuted instantiation: frontend.c:fd_take_tgid Unexecuted instantiation: haproxy.c:fd_take_tgid Unexecuted instantiation: http_ana.c:fd_take_tgid Unexecuted instantiation: http_ext.c:fd_take_tgid Unexecuted instantiation: http_htx.c:fd_take_tgid Unexecuted instantiation: http_rules.c:fd_take_tgid Unexecuted instantiation: lb_chash.c:fd_take_tgid Unexecuted instantiation: lb_fwlc.c:fd_take_tgid Unexecuted instantiation: limits.c:fd_take_tgid Unexecuted instantiation: listener.c:fd_take_tgid Unexecuted instantiation: log.c:fd_take_tgid Unexecuted instantiation: mailers.c:fd_take_tgid Unexecuted instantiation: mworker.c:fd_take_tgid Unexecuted instantiation: peers.c:fd_take_tgid Unexecuted instantiation: pool.c:fd_take_tgid Unexecuted instantiation: proto_rhttp.c:fd_take_tgid Unexecuted instantiation: proto_sockpair.c:fd_take_tgid Unexecuted instantiation: proxy.c:fd_take_tgid Unexecuted instantiation: queue.c:fd_take_tgid Unexecuted instantiation: resolvers.c:fd_take_tgid Unexecuted instantiation: ring.c:fd_take_tgid Unexecuted instantiation: sample.c:fd_take_tgid Unexecuted instantiation: server.c:fd_take_tgid Unexecuted instantiation: session.c:fd_take_tgid Unexecuted instantiation: signal.c:fd_take_tgid Unexecuted instantiation: sink.c:fd_take_tgid Unexecuted instantiation: sock.c:fd_take_tgid Unexecuted instantiation: sock_inet.c:fd_take_tgid Unexecuted instantiation: stats-html.c:fd_take_tgid Unexecuted instantiation: stats.c:fd_take_tgid Unexecuted instantiation: stconn.c:fd_take_tgid Unexecuted instantiation: stick_table.c:fd_take_tgid Unexecuted instantiation: stream.c:fd_take_tgid Unexecuted instantiation: task.c:fd_take_tgid Unexecuted instantiation: tcp_rules.c:fd_take_tgid Unexecuted instantiation: tcpcheck.c:fd_take_tgid Unexecuted instantiation: thread.c:fd_take_tgid Unexecuted instantiation: tools.c:fd_take_tgid Unexecuted instantiation: trace.c:fd_take_tgid Unexecuted instantiation: vars.c:fd_take_tgid Unexecuted instantiation: action.c:fd_take_tgid Unexecuted instantiation: activity.c:fd_take_tgid Unexecuted instantiation: applet.c:fd_take_tgid Unexecuted instantiation: backend.c:fd_take_tgid Unexecuted instantiation: cache.c:fd_take_tgid Unexecuted instantiation: cfgparse-global.c:fd_take_tgid Unexecuted instantiation: cfgparse-listen.c:fd_take_tgid Unexecuted instantiation: channel.c:fd_take_tgid Unexecuted instantiation: check.c:fd_take_tgid Unexecuted instantiation: compression.c:fd_take_tgid Unexecuted instantiation: dgram.c:fd_take_tgid Unexecuted instantiation: dns.c:fd_take_tgid Unexecuted instantiation: dns_ring.c:fd_take_tgid Unexecuted instantiation: event_hdl.c:fd_take_tgid Unexecuted instantiation: extcheck.c:fd_take_tgid Unexecuted instantiation: fcgi-app.c:fd_take_tgid Unexecuted instantiation: http_fetch.c:fd_take_tgid Unexecuted instantiation: mux_spop.c:fd_take_tgid Unexecuted instantiation: pattern.c:fd_take_tgid Unexecuted instantiation: payload.c:fd_take_tgid Unexecuted instantiation: proto_tcp.c:fd_take_tgid Unexecuted instantiation: stats-json.c:fd_take_tgid Unexecuted instantiation: stats-proxy.c:fd_take_tgid Unexecuted instantiation: flt_spoe.c:fd_take_tgid |
399 | | |
400 | | /* Reset a tgid without affecting the refcount */ |
401 | | static forceinline void fd_reset_tgid(int fd) |
402 | 0 | { |
403 | 0 | HA_ATOMIC_AND(&fdtab[fd].refc_tgid, 0xffff0000U); |
404 | 0 | } Unexecuted instantiation: cfgparse.c:fd_reset_tgid Unexecuted instantiation: cli.c:fd_reset_tgid Unexecuted instantiation: connection.c:fd_reset_tgid Unexecuted instantiation: debug.c:fd_reset_tgid Unexecuted instantiation: errors.c:fd_reset_tgid Unexecuted instantiation: fd.c:fd_reset_tgid Unexecuted instantiation: filters.c:fd_reset_tgid Unexecuted instantiation: flt_http_comp.c:fd_reset_tgid Unexecuted instantiation: frontend.c:fd_reset_tgid Unexecuted instantiation: haproxy.c:fd_reset_tgid Unexecuted instantiation: http_ana.c:fd_reset_tgid Unexecuted instantiation: http_ext.c:fd_reset_tgid Unexecuted instantiation: http_htx.c:fd_reset_tgid Unexecuted instantiation: http_rules.c:fd_reset_tgid Unexecuted instantiation: lb_chash.c:fd_reset_tgid Unexecuted instantiation: lb_fwlc.c:fd_reset_tgid Unexecuted instantiation: limits.c:fd_reset_tgid Unexecuted instantiation: listener.c:fd_reset_tgid Unexecuted instantiation: log.c:fd_reset_tgid Unexecuted instantiation: mailers.c:fd_reset_tgid Unexecuted instantiation: mworker.c:fd_reset_tgid Unexecuted instantiation: peers.c:fd_reset_tgid Unexecuted instantiation: pool.c:fd_reset_tgid Unexecuted instantiation: proto_rhttp.c:fd_reset_tgid Unexecuted instantiation: proto_sockpair.c:fd_reset_tgid Unexecuted instantiation: proxy.c:fd_reset_tgid Unexecuted instantiation: queue.c:fd_reset_tgid Unexecuted instantiation: resolvers.c:fd_reset_tgid Unexecuted instantiation: ring.c:fd_reset_tgid Unexecuted instantiation: sample.c:fd_reset_tgid Unexecuted instantiation: server.c:fd_reset_tgid Unexecuted instantiation: session.c:fd_reset_tgid Unexecuted instantiation: signal.c:fd_reset_tgid Unexecuted instantiation: sink.c:fd_reset_tgid Unexecuted instantiation: sock.c:fd_reset_tgid Unexecuted instantiation: sock_inet.c:fd_reset_tgid Unexecuted instantiation: stats-html.c:fd_reset_tgid Unexecuted instantiation: stats.c:fd_reset_tgid Unexecuted instantiation: stconn.c:fd_reset_tgid Unexecuted instantiation: stick_table.c:fd_reset_tgid Unexecuted instantiation: stream.c:fd_reset_tgid Unexecuted instantiation: task.c:fd_reset_tgid Unexecuted instantiation: tcp_rules.c:fd_reset_tgid Unexecuted instantiation: tcpcheck.c:fd_reset_tgid Unexecuted instantiation: thread.c:fd_reset_tgid Unexecuted instantiation: tools.c:fd_reset_tgid Unexecuted instantiation: trace.c:fd_reset_tgid Unexecuted instantiation: vars.c:fd_reset_tgid Unexecuted instantiation: action.c:fd_reset_tgid Unexecuted instantiation: activity.c:fd_reset_tgid Unexecuted instantiation: applet.c:fd_reset_tgid Unexecuted instantiation: backend.c:fd_reset_tgid Unexecuted instantiation: cache.c:fd_reset_tgid Unexecuted instantiation: cfgparse-global.c:fd_reset_tgid Unexecuted instantiation: cfgparse-listen.c:fd_reset_tgid Unexecuted instantiation: channel.c:fd_reset_tgid Unexecuted instantiation: check.c:fd_reset_tgid Unexecuted instantiation: compression.c:fd_reset_tgid Unexecuted instantiation: dgram.c:fd_reset_tgid Unexecuted instantiation: dns.c:fd_reset_tgid Unexecuted instantiation: dns_ring.c:fd_reset_tgid Unexecuted instantiation: event_hdl.c:fd_reset_tgid Unexecuted instantiation: extcheck.c:fd_reset_tgid Unexecuted instantiation: fcgi-app.c:fd_reset_tgid Unexecuted instantiation: http_fetch.c:fd_reset_tgid Unexecuted instantiation: mux_spop.c:fd_reset_tgid Unexecuted instantiation: pattern.c:fd_reset_tgid Unexecuted instantiation: payload.c:fd_reset_tgid Unexecuted instantiation: proto_tcp.c:fd_reset_tgid Unexecuted instantiation: stats-json.c:fd_reset_tgid Unexecuted instantiation: stats-proxy.c:fd_reset_tgid Unexecuted instantiation: flt_spoe.c:fd_reset_tgid |
405 | | |
406 | | /* Try to grab a reference to the FD's TGID, but only if it matches the |
407 | | * requested one (i.e. it succeeds with TGID refcnt held, or fails). Note that |
408 | | * a TGID of zero indicates the FD was closed, thus also fails. It returns |
409 | | * non-zero on success, in which case the caller must then release it using |
410 | | * fd_drop_tgid(), or zero on failure. The function is optimized for use |
411 | | * when it's likely that the tgid matches the desired one as it's by far |
412 | | * the most common. |
413 | | */ |
414 | | static inline uint fd_grab_tgid(int fd, uint desired_tgid) |
415 | 0 | { |
416 | 0 | uint old; |
417 | |
|
418 | 0 | old = _HA_ATOMIC_FETCH_ADD(&fdtab[fd].refc_tgid, 0x10000) & 0xffff; |
419 | | /* If the tgid is locked, wait until it no longer is */ |
420 | 0 | while (old & 0x8000) { |
421 | 0 | old = _HA_ATOMIC_LOAD(&fdtab[fd].refc_tgid) & 0xffff; |
422 | 0 | __ha_cpu_relax(); |
423 | 0 | } |
424 | 0 | if (likely(old == desired_tgid)) |
425 | 0 | return 1; |
426 | 0 | HA_ATOMIC_SUB(&fdtab[fd].refc_tgid, 0x10000); |
427 | 0 | return 0; |
428 | 0 | } Unexecuted instantiation: cfgparse.c:fd_grab_tgid Unexecuted instantiation: cli.c:fd_grab_tgid Unexecuted instantiation: connection.c:fd_grab_tgid Unexecuted instantiation: debug.c:fd_grab_tgid Unexecuted instantiation: errors.c:fd_grab_tgid Unexecuted instantiation: fd.c:fd_grab_tgid Unexecuted instantiation: filters.c:fd_grab_tgid Unexecuted instantiation: flt_http_comp.c:fd_grab_tgid Unexecuted instantiation: frontend.c:fd_grab_tgid Unexecuted instantiation: haproxy.c:fd_grab_tgid Unexecuted instantiation: http_ana.c:fd_grab_tgid Unexecuted instantiation: http_ext.c:fd_grab_tgid Unexecuted instantiation: http_htx.c:fd_grab_tgid Unexecuted instantiation: http_rules.c:fd_grab_tgid Unexecuted instantiation: lb_chash.c:fd_grab_tgid Unexecuted instantiation: lb_fwlc.c:fd_grab_tgid Unexecuted instantiation: limits.c:fd_grab_tgid Unexecuted instantiation: listener.c:fd_grab_tgid Unexecuted instantiation: log.c:fd_grab_tgid Unexecuted instantiation: mailers.c:fd_grab_tgid Unexecuted instantiation: mworker.c:fd_grab_tgid Unexecuted instantiation: peers.c:fd_grab_tgid Unexecuted instantiation: pool.c:fd_grab_tgid Unexecuted instantiation: proto_rhttp.c:fd_grab_tgid Unexecuted instantiation: proto_sockpair.c:fd_grab_tgid Unexecuted instantiation: proxy.c:fd_grab_tgid Unexecuted instantiation: queue.c:fd_grab_tgid Unexecuted instantiation: resolvers.c:fd_grab_tgid Unexecuted instantiation: ring.c:fd_grab_tgid Unexecuted instantiation: sample.c:fd_grab_tgid Unexecuted instantiation: server.c:fd_grab_tgid Unexecuted instantiation: session.c:fd_grab_tgid Unexecuted instantiation: signal.c:fd_grab_tgid Unexecuted instantiation: sink.c:fd_grab_tgid Unexecuted instantiation: sock.c:fd_grab_tgid Unexecuted instantiation: sock_inet.c:fd_grab_tgid Unexecuted instantiation: stats-html.c:fd_grab_tgid Unexecuted instantiation: stats.c:fd_grab_tgid Unexecuted instantiation: stconn.c:fd_grab_tgid Unexecuted instantiation: stick_table.c:fd_grab_tgid Unexecuted instantiation: stream.c:fd_grab_tgid Unexecuted instantiation: task.c:fd_grab_tgid Unexecuted instantiation: tcp_rules.c:fd_grab_tgid Unexecuted instantiation: tcpcheck.c:fd_grab_tgid Unexecuted instantiation: thread.c:fd_grab_tgid Unexecuted instantiation: tools.c:fd_grab_tgid Unexecuted instantiation: trace.c:fd_grab_tgid Unexecuted instantiation: vars.c:fd_grab_tgid Unexecuted instantiation: action.c:fd_grab_tgid Unexecuted instantiation: activity.c:fd_grab_tgid Unexecuted instantiation: applet.c:fd_grab_tgid Unexecuted instantiation: backend.c:fd_grab_tgid Unexecuted instantiation: cache.c:fd_grab_tgid Unexecuted instantiation: cfgparse-global.c:fd_grab_tgid Unexecuted instantiation: cfgparse-listen.c:fd_grab_tgid Unexecuted instantiation: channel.c:fd_grab_tgid Unexecuted instantiation: check.c:fd_grab_tgid Unexecuted instantiation: compression.c:fd_grab_tgid Unexecuted instantiation: dgram.c:fd_grab_tgid Unexecuted instantiation: dns.c:fd_grab_tgid Unexecuted instantiation: dns_ring.c:fd_grab_tgid Unexecuted instantiation: event_hdl.c:fd_grab_tgid Unexecuted instantiation: extcheck.c:fd_grab_tgid Unexecuted instantiation: fcgi-app.c:fd_grab_tgid Unexecuted instantiation: http_fetch.c:fd_grab_tgid Unexecuted instantiation: mux_spop.c:fd_grab_tgid Unexecuted instantiation: pattern.c:fd_grab_tgid Unexecuted instantiation: payload.c:fd_grab_tgid Unexecuted instantiation: proto_tcp.c:fd_grab_tgid Unexecuted instantiation: stats-json.c:fd_grab_tgid Unexecuted instantiation: stats-proxy.c:fd_grab_tgid Unexecuted instantiation: flt_spoe.c:fd_grab_tgid |
429 | | |
430 | | /* Set the FD's TGID to the new value with a refcount of 1, waiting for the |
431 | | * current refcount to become 0, to cover the rare possibly that a late |
432 | | * competing thread would be touching the tgid or the running mask in parallel. |
433 | | * The caller must call fd_drop_tgid() once done. |
434 | | */ |
435 | | static inline void fd_claim_tgid(int fd, uint desired_tgid) |
436 | 0 | { |
437 | 0 | uint old; |
438 | |
|
439 | 0 | BUG_ON(!desired_tgid); |
440 | | |
441 | 0 | desired_tgid += 0x10000; // refcount=1 |
442 | 0 | old = 0; // assume unused (most likely) |
443 | 0 | while (1) { |
444 | 0 | if (_HA_ATOMIC_CAS(&fdtab[fd].refc_tgid, &old, desired_tgid)) |
445 | 0 | break; |
446 | 0 | __ha_cpu_relax(); |
447 | 0 | old &= 0x7fff; // keep only the tgid and drop the lock |
448 | 0 | } |
449 | 0 | } Unexecuted instantiation: cfgparse.c:fd_claim_tgid Unexecuted instantiation: cli.c:fd_claim_tgid Unexecuted instantiation: connection.c:fd_claim_tgid Unexecuted instantiation: debug.c:fd_claim_tgid Unexecuted instantiation: errors.c:fd_claim_tgid Unexecuted instantiation: fd.c:fd_claim_tgid Unexecuted instantiation: filters.c:fd_claim_tgid Unexecuted instantiation: flt_http_comp.c:fd_claim_tgid Unexecuted instantiation: frontend.c:fd_claim_tgid Unexecuted instantiation: haproxy.c:fd_claim_tgid Unexecuted instantiation: http_ana.c:fd_claim_tgid Unexecuted instantiation: http_ext.c:fd_claim_tgid Unexecuted instantiation: http_htx.c:fd_claim_tgid Unexecuted instantiation: http_rules.c:fd_claim_tgid Unexecuted instantiation: lb_chash.c:fd_claim_tgid Unexecuted instantiation: lb_fwlc.c:fd_claim_tgid Unexecuted instantiation: limits.c:fd_claim_tgid Unexecuted instantiation: listener.c:fd_claim_tgid Unexecuted instantiation: log.c:fd_claim_tgid Unexecuted instantiation: mailers.c:fd_claim_tgid Unexecuted instantiation: mworker.c:fd_claim_tgid Unexecuted instantiation: peers.c:fd_claim_tgid Unexecuted instantiation: pool.c:fd_claim_tgid Unexecuted instantiation: proto_rhttp.c:fd_claim_tgid Unexecuted instantiation: proto_sockpair.c:fd_claim_tgid Unexecuted instantiation: proxy.c:fd_claim_tgid Unexecuted instantiation: queue.c:fd_claim_tgid Unexecuted instantiation: resolvers.c:fd_claim_tgid Unexecuted instantiation: ring.c:fd_claim_tgid Unexecuted instantiation: sample.c:fd_claim_tgid Unexecuted instantiation: server.c:fd_claim_tgid Unexecuted instantiation: session.c:fd_claim_tgid Unexecuted instantiation: signal.c:fd_claim_tgid Unexecuted instantiation: sink.c:fd_claim_tgid Unexecuted instantiation: sock.c:fd_claim_tgid Unexecuted instantiation: sock_inet.c:fd_claim_tgid Unexecuted instantiation: stats-html.c:fd_claim_tgid Unexecuted instantiation: stats.c:fd_claim_tgid Unexecuted instantiation: stconn.c:fd_claim_tgid Unexecuted instantiation: stick_table.c:fd_claim_tgid Unexecuted instantiation: stream.c:fd_claim_tgid Unexecuted instantiation: task.c:fd_claim_tgid Unexecuted instantiation: tcp_rules.c:fd_claim_tgid Unexecuted instantiation: tcpcheck.c:fd_claim_tgid Unexecuted instantiation: thread.c:fd_claim_tgid Unexecuted instantiation: tools.c:fd_claim_tgid Unexecuted instantiation: trace.c:fd_claim_tgid Unexecuted instantiation: vars.c:fd_claim_tgid Unexecuted instantiation: action.c:fd_claim_tgid Unexecuted instantiation: activity.c:fd_claim_tgid Unexecuted instantiation: applet.c:fd_claim_tgid Unexecuted instantiation: backend.c:fd_claim_tgid Unexecuted instantiation: cache.c:fd_claim_tgid Unexecuted instantiation: cfgparse-global.c:fd_claim_tgid Unexecuted instantiation: cfgparse-listen.c:fd_claim_tgid Unexecuted instantiation: channel.c:fd_claim_tgid Unexecuted instantiation: check.c:fd_claim_tgid Unexecuted instantiation: compression.c:fd_claim_tgid Unexecuted instantiation: dgram.c:fd_claim_tgid Unexecuted instantiation: dns.c:fd_claim_tgid Unexecuted instantiation: dns_ring.c:fd_claim_tgid Unexecuted instantiation: event_hdl.c:fd_claim_tgid Unexecuted instantiation: extcheck.c:fd_claim_tgid Unexecuted instantiation: fcgi-app.c:fd_claim_tgid Unexecuted instantiation: http_fetch.c:fd_claim_tgid Unexecuted instantiation: mux_spop.c:fd_claim_tgid Unexecuted instantiation: pattern.c:fd_claim_tgid Unexecuted instantiation: payload.c:fd_claim_tgid Unexecuted instantiation: proto_tcp.c:fd_claim_tgid Unexecuted instantiation: stats-json.c:fd_claim_tgid Unexecuted instantiation: stats-proxy.c:fd_claim_tgid Unexecuted instantiation: flt_spoe.c:fd_claim_tgid |
450 | | |
451 | | /* |
452 | | * Update the FD's TGID. |
453 | | * This should be called with the lock held, and will drop the lock once |
454 | | * the TGID is updated. |
455 | | * The reference counter is however preserved. |
456 | | */ |
457 | | static inline void fd_update_tgid(int fd, uint desired_tgid) |
458 | 0 | { |
459 | 0 | unsigned int orig_tgid = fdtab[fd].refc_tgid; |
460 | 0 | unsigned int new_tgid; |
461 | | /* Remove the lock, and switch to the new tgid */ |
462 | 0 | do { |
463 | 0 | new_tgid = (orig_tgid & 0xffff0000) | desired_tgid; |
464 | 0 | } while (!_HA_ATOMIC_CAS(&fdtab[fd].refc_tgid, &orig_tgid, new_tgid) && __ha_cpu_relax()); |
465 | 0 | } Unexecuted instantiation: cfgparse.c:fd_update_tgid Unexecuted instantiation: cli.c:fd_update_tgid Unexecuted instantiation: connection.c:fd_update_tgid Unexecuted instantiation: debug.c:fd_update_tgid Unexecuted instantiation: errors.c:fd_update_tgid Unexecuted instantiation: fd.c:fd_update_tgid Unexecuted instantiation: filters.c:fd_update_tgid Unexecuted instantiation: flt_http_comp.c:fd_update_tgid Unexecuted instantiation: frontend.c:fd_update_tgid Unexecuted instantiation: haproxy.c:fd_update_tgid Unexecuted instantiation: http_ana.c:fd_update_tgid Unexecuted instantiation: http_ext.c:fd_update_tgid Unexecuted instantiation: http_htx.c:fd_update_tgid Unexecuted instantiation: http_rules.c:fd_update_tgid Unexecuted instantiation: lb_chash.c:fd_update_tgid Unexecuted instantiation: lb_fwlc.c:fd_update_tgid Unexecuted instantiation: limits.c:fd_update_tgid Unexecuted instantiation: listener.c:fd_update_tgid Unexecuted instantiation: log.c:fd_update_tgid Unexecuted instantiation: mailers.c:fd_update_tgid Unexecuted instantiation: mworker.c:fd_update_tgid Unexecuted instantiation: peers.c:fd_update_tgid Unexecuted instantiation: pool.c:fd_update_tgid Unexecuted instantiation: proto_rhttp.c:fd_update_tgid Unexecuted instantiation: proto_sockpair.c:fd_update_tgid Unexecuted instantiation: proxy.c:fd_update_tgid Unexecuted instantiation: queue.c:fd_update_tgid Unexecuted instantiation: resolvers.c:fd_update_tgid Unexecuted instantiation: ring.c:fd_update_tgid Unexecuted instantiation: sample.c:fd_update_tgid Unexecuted instantiation: server.c:fd_update_tgid Unexecuted instantiation: session.c:fd_update_tgid Unexecuted instantiation: signal.c:fd_update_tgid Unexecuted instantiation: sink.c:fd_update_tgid Unexecuted instantiation: sock.c:fd_update_tgid Unexecuted instantiation: sock_inet.c:fd_update_tgid Unexecuted instantiation: stats-html.c:fd_update_tgid Unexecuted instantiation: stats.c:fd_update_tgid Unexecuted instantiation: stconn.c:fd_update_tgid Unexecuted instantiation: stick_table.c:fd_update_tgid Unexecuted instantiation: stream.c:fd_update_tgid Unexecuted instantiation: task.c:fd_update_tgid Unexecuted instantiation: tcp_rules.c:fd_update_tgid Unexecuted instantiation: tcpcheck.c:fd_update_tgid Unexecuted instantiation: thread.c:fd_update_tgid Unexecuted instantiation: tools.c:fd_update_tgid Unexecuted instantiation: trace.c:fd_update_tgid Unexecuted instantiation: vars.c:fd_update_tgid Unexecuted instantiation: action.c:fd_update_tgid Unexecuted instantiation: activity.c:fd_update_tgid Unexecuted instantiation: applet.c:fd_update_tgid Unexecuted instantiation: backend.c:fd_update_tgid Unexecuted instantiation: cache.c:fd_update_tgid Unexecuted instantiation: cfgparse-global.c:fd_update_tgid Unexecuted instantiation: cfgparse-listen.c:fd_update_tgid Unexecuted instantiation: channel.c:fd_update_tgid Unexecuted instantiation: check.c:fd_update_tgid Unexecuted instantiation: compression.c:fd_update_tgid Unexecuted instantiation: dgram.c:fd_update_tgid Unexecuted instantiation: dns.c:fd_update_tgid Unexecuted instantiation: dns_ring.c:fd_update_tgid Unexecuted instantiation: event_hdl.c:fd_update_tgid Unexecuted instantiation: extcheck.c:fd_update_tgid Unexecuted instantiation: fcgi-app.c:fd_update_tgid Unexecuted instantiation: http_fetch.c:fd_update_tgid Unexecuted instantiation: mux_spop.c:fd_update_tgid Unexecuted instantiation: pattern.c:fd_update_tgid Unexecuted instantiation: payload.c:fd_update_tgid Unexecuted instantiation: proto_tcp.c:fd_update_tgid Unexecuted instantiation: stats-json.c:fd_update_tgid Unexecuted instantiation: stats-proxy.c:fd_update_tgid Unexecuted instantiation: flt_spoe.c:fd_update_tgid |
466 | | |
467 | | /* atomically read the running mask if the tgid matches, or returns zero if it |
468 | | * does not match. This is meant for use in code paths where the bit is expected |
469 | | * to be present and will be sufficient to protect against a short-term group |
470 | | * migration (e.g. takss and return from iocb). |
471 | | */ |
472 | | static inline ulong fd_get_running(int fd, uint desired_tgid) |
473 | 0 | { |
474 | 0 | ulong ret = 0; |
475 | 0 | uint old; |
476 | 0 |
|
477 | 0 | /* TODO: may also be checked using an atomic double-load from a DWCAS |
478 | 0 | * on compatible architectures, which wouldn't require to modify nor |
479 | 0 | * restore the original value. |
480 | 0 | */ |
481 | 0 | old = _HA_ATOMIC_ADD_FETCH(&fdtab[fd].refc_tgid, 0x10000); |
482 | 0 | if (likely((old & 0xffff) == desired_tgid)) |
483 | 0 | ret = _HA_ATOMIC_LOAD(&fdtab[fd].running_mask); |
484 | 0 | _HA_ATOMIC_SUB(&fdtab[fd].refc_tgid, 0x10000); |
485 | 0 | return ret; |
486 | 0 | } Unexecuted instantiation: cfgparse.c:fd_get_running Unexecuted instantiation: cli.c:fd_get_running Unexecuted instantiation: connection.c:fd_get_running Unexecuted instantiation: debug.c:fd_get_running Unexecuted instantiation: errors.c:fd_get_running Unexecuted instantiation: fd.c:fd_get_running Unexecuted instantiation: filters.c:fd_get_running Unexecuted instantiation: flt_http_comp.c:fd_get_running Unexecuted instantiation: frontend.c:fd_get_running Unexecuted instantiation: haproxy.c:fd_get_running Unexecuted instantiation: http_ana.c:fd_get_running Unexecuted instantiation: http_ext.c:fd_get_running Unexecuted instantiation: http_htx.c:fd_get_running Unexecuted instantiation: http_rules.c:fd_get_running Unexecuted instantiation: lb_chash.c:fd_get_running Unexecuted instantiation: lb_fwlc.c:fd_get_running Unexecuted instantiation: limits.c:fd_get_running Unexecuted instantiation: listener.c:fd_get_running Unexecuted instantiation: log.c:fd_get_running Unexecuted instantiation: mailers.c:fd_get_running Unexecuted instantiation: mworker.c:fd_get_running Unexecuted instantiation: peers.c:fd_get_running Unexecuted instantiation: pool.c:fd_get_running Unexecuted instantiation: proto_rhttp.c:fd_get_running Unexecuted instantiation: proto_sockpair.c:fd_get_running Unexecuted instantiation: proxy.c:fd_get_running Unexecuted instantiation: queue.c:fd_get_running Unexecuted instantiation: resolvers.c:fd_get_running Unexecuted instantiation: ring.c:fd_get_running Unexecuted instantiation: sample.c:fd_get_running Unexecuted instantiation: server.c:fd_get_running Unexecuted instantiation: session.c:fd_get_running Unexecuted instantiation: signal.c:fd_get_running Unexecuted instantiation: sink.c:fd_get_running Unexecuted instantiation: sock.c:fd_get_running Unexecuted instantiation: sock_inet.c:fd_get_running Unexecuted instantiation: stats-html.c:fd_get_running Unexecuted instantiation: stats.c:fd_get_running Unexecuted instantiation: stconn.c:fd_get_running Unexecuted instantiation: stick_table.c:fd_get_running Unexecuted instantiation: stream.c:fd_get_running Unexecuted instantiation: task.c:fd_get_running Unexecuted instantiation: tcp_rules.c:fd_get_running Unexecuted instantiation: tcpcheck.c:fd_get_running Unexecuted instantiation: thread.c:fd_get_running Unexecuted instantiation: tools.c:fd_get_running Unexecuted instantiation: trace.c:fd_get_running Unexecuted instantiation: vars.c:fd_get_running Unexecuted instantiation: action.c:fd_get_running Unexecuted instantiation: activity.c:fd_get_running Unexecuted instantiation: applet.c:fd_get_running Unexecuted instantiation: backend.c:fd_get_running Unexecuted instantiation: cache.c:fd_get_running Unexecuted instantiation: cfgparse-global.c:fd_get_running Unexecuted instantiation: cfgparse-listen.c:fd_get_running Unexecuted instantiation: channel.c:fd_get_running Unexecuted instantiation: check.c:fd_get_running Unexecuted instantiation: compression.c:fd_get_running Unexecuted instantiation: dgram.c:fd_get_running Unexecuted instantiation: dns.c:fd_get_running Unexecuted instantiation: dns_ring.c:fd_get_running Unexecuted instantiation: event_hdl.c:fd_get_running Unexecuted instantiation: extcheck.c:fd_get_running Unexecuted instantiation: fcgi-app.c:fd_get_running Unexecuted instantiation: http_fetch.c:fd_get_running Unexecuted instantiation: mux_spop.c:fd_get_running Unexecuted instantiation: pattern.c:fd_get_running Unexecuted instantiation: payload.c:fd_get_running Unexecuted instantiation: proto_tcp.c:fd_get_running Unexecuted instantiation: stats-json.c:fd_get_running Unexecuted instantiation: stats-proxy.c:fd_get_running Unexecuted instantiation: flt_spoe.c:fd_get_running |
487 | | |
488 | | /* remove tid_bit from the fd's running mask and returns the value before the |
489 | | * atomic operation, so that the caller can know if it was present. |
490 | | */ |
491 | | static inline long fd_clr_running(int fd) |
492 | 0 | { |
493 | 0 | return _HA_ATOMIC_FETCH_AND(&fdtab[fd].running_mask, ~ti->ltid_bit); |
494 | 0 | } Unexecuted instantiation: cfgparse.c:fd_clr_running Unexecuted instantiation: cli.c:fd_clr_running Unexecuted instantiation: connection.c:fd_clr_running Unexecuted instantiation: debug.c:fd_clr_running Unexecuted instantiation: errors.c:fd_clr_running Unexecuted instantiation: fd.c:fd_clr_running Unexecuted instantiation: filters.c:fd_clr_running Unexecuted instantiation: flt_http_comp.c:fd_clr_running Unexecuted instantiation: frontend.c:fd_clr_running Unexecuted instantiation: haproxy.c:fd_clr_running Unexecuted instantiation: http_ana.c:fd_clr_running Unexecuted instantiation: http_ext.c:fd_clr_running Unexecuted instantiation: http_htx.c:fd_clr_running Unexecuted instantiation: http_rules.c:fd_clr_running Unexecuted instantiation: lb_chash.c:fd_clr_running Unexecuted instantiation: lb_fwlc.c:fd_clr_running Unexecuted instantiation: limits.c:fd_clr_running Unexecuted instantiation: listener.c:fd_clr_running Unexecuted instantiation: log.c:fd_clr_running Unexecuted instantiation: mailers.c:fd_clr_running Unexecuted instantiation: mworker.c:fd_clr_running Unexecuted instantiation: peers.c:fd_clr_running Unexecuted instantiation: pool.c:fd_clr_running Unexecuted instantiation: proto_rhttp.c:fd_clr_running Unexecuted instantiation: proto_sockpair.c:fd_clr_running Unexecuted instantiation: proxy.c:fd_clr_running Unexecuted instantiation: queue.c:fd_clr_running Unexecuted instantiation: resolvers.c:fd_clr_running Unexecuted instantiation: ring.c:fd_clr_running Unexecuted instantiation: sample.c:fd_clr_running Unexecuted instantiation: server.c:fd_clr_running Unexecuted instantiation: session.c:fd_clr_running Unexecuted instantiation: signal.c:fd_clr_running Unexecuted instantiation: sink.c:fd_clr_running Unexecuted instantiation: sock.c:fd_clr_running Unexecuted instantiation: sock_inet.c:fd_clr_running Unexecuted instantiation: stats-html.c:fd_clr_running Unexecuted instantiation: stats.c:fd_clr_running Unexecuted instantiation: stconn.c:fd_clr_running Unexecuted instantiation: stick_table.c:fd_clr_running Unexecuted instantiation: stream.c:fd_clr_running Unexecuted instantiation: task.c:fd_clr_running Unexecuted instantiation: tcp_rules.c:fd_clr_running Unexecuted instantiation: tcpcheck.c:fd_clr_running Unexecuted instantiation: thread.c:fd_clr_running Unexecuted instantiation: tools.c:fd_clr_running Unexecuted instantiation: trace.c:fd_clr_running Unexecuted instantiation: vars.c:fd_clr_running Unexecuted instantiation: action.c:fd_clr_running Unexecuted instantiation: activity.c:fd_clr_running Unexecuted instantiation: applet.c:fd_clr_running Unexecuted instantiation: backend.c:fd_clr_running Unexecuted instantiation: cache.c:fd_clr_running Unexecuted instantiation: cfgparse-global.c:fd_clr_running Unexecuted instantiation: cfgparse-listen.c:fd_clr_running Unexecuted instantiation: channel.c:fd_clr_running Unexecuted instantiation: check.c:fd_clr_running Unexecuted instantiation: compression.c:fd_clr_running Unexecuted instantiation: dgram.c:fd_clr_running Unexecuted instantiation: dns.c:fd_clr_running Unexecuted instantiation: dns_ring.c:fd_clr_running Unexecuted instantiation: event_hdl.c:fd_clr_running Unexecuted instantiation: extcheck.c:fd_clr_running Unexecuted instantiation: fcgi-app.c:fd_clr_running Unexecuted instantiation: http_fetch.c:fd_clr_running Unexecuted instantiation: mux_spop.c:fd_clr_running Unexecuted instantiation: pattern.c:fd_clr_running Unexecuted instantiation: payload.c:fd_clr_running Unexecuted instantiation: proto_tcp.c:fd_clr_running Unexecuted instantiation: stats-json.c:fd_clr_running Unexecuted instantiation: stats-proxy.c:fd_clr_running Unexecuted instantiation: flt_spoe.c:fd_clr_running |
495 | | |
496 | | /* Prepares <fd> for being polled on all permitted threads of this group ID |
497 | | * (these will then be refined to only cover running ones). |
498 | | */ |
499 | | static inline void fd_insert(int fd, void *owner, void (*iocb)(int fd), int tgid, unsigned long thread_mask) |
500 | 0 | { |
501 | 0 | extern void sock_conn_iocb(int); |
502 | 0 | struct tgroup_info *tginfo = &ha_tgroup_info[tgid - 1]; |
503 | 0 | int newstate; |
504 | | |
505 | | /* conn_fd_handler should support edge-triggered FDs */ |
506 | 0 | newstate = 0; |
507 | 0 | if ((global.tune.options & GTUNE_FD_ET) && iocb == sock_conn_iocb) |
508 | 0 | newstate |= FD_ET_POSSIBLE; |
509 | | |
510 | | /* We must update fd_highest to reflect the highest known FD for this |
511 | | * thread. It's important to note that it's not necessarily the highest |
512 | | * FD the thread will see, it's the highest FD that was inserted by |
513 | | * this thread or by the main thread. The purpose is essentially to |
514 | | * let all threads know the highest known FD at boot, that will be |
515 | | * cloned into each thread, in order to limit the work range for init |
516 | | * functions such as fork_poller() and fd_reregister_all(). Keeping the |
517 | | * value thread-local substantially limits the cost, since after a few |
518 | | * thousand calls the value will just stop changing. |
519 | | */ |
520 | 0 | if (unlikely(fd > fd_highest)) |
521 | 0 | fd_highest = fd; |
522 | | |
523 | | /* This must never happen and would definitely indicate a bug, in |
524 | | * addition to overwriting some unexpected memory areas. |
525 | | */ |
526 | 0 | BUG_ON(fd < 0); |
527 | 0 | BUG_ON(fd >= global.maxsock); |
528 | 0 | BUG_ON(fdtab[fd].owner != NULL); |
529 | 0 | BUG_ON(fdtab[fd].state != 0); |
530 | 0 | BUG_ON(tgid < 1 || tgid > MAX_TGROUPS); |
531 | | |
532 | 0 | thread_mask &= tginfo->threads_enabled; |
533 | 0 | BUG_ON(thread_mask == 0); |
534 | | |
535 | 0 | fd_claim_tgid(fd, tgid); |
536 | |
|
537 | 0 | BUG_ON(fdtab[fd].running_mask); |
538 | | |
539 | 0 | fdtab[fd].owner = owner; |
540 | 0 | fdtab[fd].iocb = iocb; |
541 | 0 | fdtab[fd].state = newstate; |
542 | 0 | fdtab[fd].thread_mask = thread_mask; |
543 | | |
544 | | /* just for debugging: how many times taken over since last fd_insert() */ |
545 | 0 | fdtab[fd].nb_takeover = 0; |
546 | |
|
547 | 0 | fd_drop_tgid(fd); |
548 | |
|
549 | | #ifdef DEBUG_FD |
550 | | fdtab[fd].event_count = 0; |
551 | | #endif |
552 | | |
553 | | /* note: do not reset polled_mask here as it indicates which poller |
554 | | * still knows this FD from a possible previous round. |
555 | | */ |
556 | | |
557 | | /* the two directions are ready until proven otherwise */ |
558 | 0 | fd_may_both(fd); |
559 | 0 | _HA_ATOMIC_INC(&ha_used_fds); |
560 | 0 | } Unexecuted instantiation: cfgparse.c:fd_insert Unexecuted instantiation: cli.c:fd_insert Unexecuted instantiation: connection.c:fd_insert Unexecuted instantiation: debug.c:fd_insert Unexecuted instantiation: errors.c:fd_insert Unexecuted instantiation: fd.c:fd_insert Unexecuted instantiation: filters.c:fd_insert Unexecuted instantiation: flt_http_comp.c:fd_insert Unexecuted instantiation: frontend.c:fd_insert Unexecuted instantiation: haproxy.c:fd_insert Unexecuted instantiation: http_ana.c:fd_insert Unexecuted instantiation: http_ext.c:fd_insert Unexecuted instantiation: http_htx.c:fd_insert Unexecuted instantiation: http_rules.c:fd_insert Unexecuted instantiation: lb_chash.c:fd_insert Unexecuted instantiation: lb_fwlc.c:fd_insert Unexecuted instantiation: limits.c:fd_insert Unexecuted instantiation: listener.c:fd_insert Unexecuted instantiation: log.c:fd_insert Unexecuted instantiation: mailers.c:fd_insert Unexecuted instantiation: mworker.c:fd_insert Unexecuted instantiation: peers.c:fd_insert Unexecuted instantiation: pool.c:fd_insert Unexecuted instantiation: proto_rhttp.c:fd_insert Unexecuted instantiation: proto_sockpair.c:fd_insert Unexecuted instantiation: proxy.c:fd_insert Unexecuted instantiation: queue.c:fd_insert Unexecuted instantiation: resolvers.c:fd_insert Unexecuted instantiation: ring.c:fd_insert Unexecuted instantiation: sample.c:fd_insert Unexecuted instantiation: server.c:fd_insert Unexecuted instantiation: session.c:fd_insert Unexecuted instantiation: signal.c:fd_insert Unexecuted instantiation: sink.c:fd_insert Unexecuted instantiation: sock.c:fd_insert Unexecuted instantiation: sock_inet.c:fd_insert Unexecuted instantiation: stats-html.c:fd_insert Unexecuted instantiation: stats.c:fd_insert Unexecuted instantiation: stconn.c:fd_insert Unexecuted instantiation: stick_table.c:fd_insert Unexecuted instantiation: stream.c:fd_insert Unexecuted instantiation: task.c:fd_insert Unexecuted instantiation: tcp_rules.c:fd_insert Unexecuted instantiation: tcpcheck.c:fd_insert Unexecuted instantiation: thread.c:fd_insert Unexecuted instantiation: tools.c:fd_insert Unexecuted instantiation: trace.c:fd_insert Unexecuted instantiation: vars.c:fd_insert Unexecuted instantiation: action.c:fd_insert Unexecuted instantiation: activity.c:fd_insert Unexecuted instantiation: applet.c:fd_insert Unexecuted instantiation: backend.c:fd_insert Unexecuted instantiation: cache.c:fd_insert Unexecuted instantiation: cfgparse-global.c:fd_insert Unexecuted instantiation: cfgparse-listen.c:fd_insert Unexecuted instantiation: channel.c:fd_insert Unexecuted instantiation: check.c:fd_insert Unexecuted instantiation: compression.c:fd_insert Unexecuted instantiation: dgram.c:fd_insert Unexecuted instantiation: dns.c:fd_insert Unexecuted instantiation: dns_ring.c:fd_insert Unexecuted instantiation: event_hdl.c:fd_insert Unexecuted instantiation: extcheck.c:fd_insert Unexecuted instantiation: fcgi-app.c:fd_insert Unexecuted instantiation: http_fetch.c:fd_insert Unexecuted instantiation: mux_spop.c:fd_insert Unexecuted instantiation: pattern.c:fd_insert Unexecuted instantiation: payload.c:fd_insert Unexecuted instantiation: proto_tcp.c:fd_insert Unexecuted instantiation: stats-json.c:fd_insert Unexecuted instantiation: stats-proxy.c:fd_insert Unexecuted instantiation: flt_spoe.c:fd_insert |
561 | | |
562 | | /* These are replacements for FD_SET, FD_CLR, FD_ISSET, working on uints */ |
563 | | static inline void hap_fd_set(int fd, unsigned int *evts) |
564 | 0 | { |
565 | 0 | _HA_ATOMIC_OR(&evts[fd / (8*sizeof(*evts))], 1U << (fd & (8*sizeof(*evts) - 1))); |
566 | 0 | } Unexecuted instantiation: cfgparse.c:hap_fd_set Unexecuted instantiation: cli.c:hap_fd_set Unexecuted instantiation: connection.c:hap_fd_set Unexecuted instantiation: debug.c:hap_fd_set Unexecuted instantiation: errors.c:hap_fd_set Unexecuted instantiation: fd.c:hap_fd_set Unexecuted instantiation: filters.c:hap_fd_set Unexecuted instantiation: flt_http_comp.c:hap_fd_set Unexecuted instantiation: frontend.c:hap_fd_set Unexecuted instantiation: haproxy.c:hap_fd_set Unexecuted instantiation: http_ana.c:hap_fd_set Unexecuted instantiation: http_ext.c:hap_fd_set Unexecuted instantiation: http_htx.c:hap_fd_set Unexecuted instantiation: http_rules.c:hap_fd_set Unexecuted instantiation: lb_chash.c:hap_fd_set Unexecuted instantiation: lb_fwlc.c:hap_fd_set Unexecuted instantiation: limits.c:hap_fd_set Unexecuted instantiation: listener.c:hap_fd_set Unexecuted instantiation: log.c:hap_fd_set Unexecuted instantiation: mailers.c:hap_fd_set Unexecuted instantiation: mworker.c:hap_fd_set Unexecuted instantiation: peers.c:hap_fd_set Unexecuted instantiation: pool.c:hap_fd_set Unexecuted instantiation: proto_rhttp.c:hap_fd_set Unexecuted instantiation: proto_sockpair.c:hap_fd_set Unexecuted instantiation: proxy.c:hap_fd_set Unexecuted instantiation: queue.c:hap_fd_set Unexecuted instantiation: resolvers.c:hap_fd_set Unexecuted instantiation: ring.c:hap_fd_set Unexecuted instantiation: sample.c:hap_fd_set Unexecuted instantiation: server.c:hap_fd_set Unexecuted instantiation: session.c:hap_fd_set Unexecuted instantiation: signal.c:hap_fd_set Unexecuted instantiation: sink.c:hap_fd_set Unexecuted instantiation: sock.c:hap_fd_set Unexecuted instantiation: sock_inet.c:hap_fd_set Unexecuted instantiation: stats-html.c:hap_fd_set Unexecuted instantiation: stats.c:hap_fd_set Unexecuted instantiation: stconn.c:hap_fd_set Unexecuted instantiation: stick_table.c:hap_fd_set Unexecuted instantiation: stream.c:hap_fd_set Unexecuted instantiation: task.c:hap_fd_set Unexecuted instantiation: tcp_rules.c:hap_fd_set Unexecuted instantiation: tcpcheck.c:hap_fd_set Unexecuted instantiation: thread.c:hap_fd_set Unexecuted instantiation: tools.c:hap_fd_set Unexecuted instantiation: trace.c:hap_fd_set Unexecuted instantiation: vars.c:hap_fd_set Unexecuted instantiation: action.c:hap_fd_set Unexecuted instantiation: activity.c:hap_fd_set Unexecuted instantiation: applet.c:hap_fd_set Unexecuted instantiation: backend.c:hap_fd_set Unexecuted instantiation: cache.c:hap_fd_set Unexecuted instantiation: cfgparse-global.c:hap_fd_set Unexecuted instantiation: cfgparse-listen.c:hap_fd_set Unexecuted instantiation: channel.c:hap_fd_set Unexecuted instantiation: check.c:hap_fd_set Unexecuted instantiation: compression.c:hap_fd_set Unexecuted instantiation: dgram.c:hap_fd_set Unexecuted instantiation: dns.c:hap_fd_set Unexecuted instantiation: dns_ring.c:hap_fd_set Unexecuted instantiation: event_hdl.c:hap_fd_set Unexecuted instantiation: extcheck.c:hap_fd_set Unexecuted instantiation: fcgi-app.c:hap_fd_set Unexecuted instantiation: http_fetch.c:hap_fd_set Unexecuted instantiation: mux_spop.c:hap_fd_set Unexecuted instantiation: pattern.c:hap_fd_set Unexecuted instantiation: payload.c:hap_fd_set Unexecuted instantiation: proto_tcp.c:hap_fd_set Unexecuted instantiation: stats-json.c:hap_fd_set Unexecuted instantiation: stats-proxy.c:hap_fd_set Unexecuted instantiation: flt_spoe.c:hap_fd_set |
567 | | |
568 | | static inline void hap_fd_clr(int fd, unsigned int *evts) |
569 | 0 | { |
570 | 0 | _HA_ATOMIC_AND(&evts[fd / (8*sizeof(*evts))], ~(1U << (fd & (8*sizeof(*evts) - 1)))); |
571 | 0 | } Unexecuted instantiation: cfgparse.c:hap_fd_clr Unexecuted instantiation: cli.c:hap_fd_clr Unexecuted instantiation: connection.c:hap_fd_clr Unexecuted instantiation: debug.c:hap_fd_clr Unexecuted instantiation: errors.c:hap_fd_clr Unexecuted instantiation: fd.c:hap_fd_clr Unexecuted instantiation: filters.c:hap_fd_clr Unexecuted instantiation: flt_http_comp.c:hap_fd_clr Unexecuted instantiation: frontend.c:hap_fd_clr Unexecuted instantiation: haproxy.c:hap_fd_clr Unexecuted instantiation: http_ana.c:hap_fd_clr Unexecuted instantiation: http_ext.c:hap_fd_clr Unexecuted instantiation: http_htx.c:hap_fd_clr Unexecuted instantiation: http_rules.c:hap_fd_clr Unexecuted instantiation: lb_chash.c:hap_fd_clr Unexecuted instantiation: lb_fwlc.c:hap_fd_clr Unexecuted instantiation: limits.c:hap_fd_clr Unexecuted instantiation: listener.c:hap_fd_clr Unexecuted instantiation: log.c:hap_fd_clr Unexecuted instantiation: mailers.c:hap_fd_clr Unexecuted instantiation: mworker.c:hap_fd_clr Unexecuted instantiation: peers.c:hap_fd_clr Unexecuted instantiation: pool.c:hap_fd_clr Unexecuted instantiation: proto_rhttp.c:hap_fd_clr Unexecuted instantiation: proto_sockpair.c:hap_fd_clr Unexecuted instantiation: proxy.c:hap_fd_clr Unexecuted instantiation: queue.c:hap_fd_clr Unexecuted instantiation: resolvers.c:hap_fd_clr Unexecuted instantiation: ring.c:hap_fd_clr Unexecuted instantiation: sample.c:hap_fd_clr Unexecuted instantiation: server.c:hap_fd_clr Unexecuted instantiation: session.c:hap_fd_clr Unexecuted instantiation: signal.c:hap_fd_clr Unexecuted instantiation: sink.c:hap_fd_clr Unexecuted instantiation: sock.c:hap_fd_clr Unexecuted instantiation: sock_inet.c:hap_fd_clr Unexecuted instantiation: stats-html.c:hap_fd_clr Unexecuted instantiation: stats.c:hap_fd_clr Unexecuted instantiation: stconn.c:hap_fd_clr Unexecuted instantiation: stick_table.c:hap_fd_clr Unexecuted instantiation: stream.c:hap_fd_clr Unexecuted instantiation: task.c:hap_fd_clr Unexecuted instantiation: tcp_rules.c:hap_fd_clr Unexecuted instantiation: tcpcheck.c:hap_fd_clr Unexecuted instantiation: thread.c:hap_fd_clr Unexecuted instantiation: tools.c:hap_fd_clr Unexecuted instantiation: trace.c:hap_fd_clr Unexecuted instantiation: vars.c:hap_fd_clr Unexecuted instantiation: action.c:hap_fd_clr Unexecuted instantiation: activity.c:hap_fd_clr Unexecuted instantiation: applet.c:hap_fd_clr Unexecuted instantiation: backend.c:hap_fd_clr Unexecuted instantiation: cache.c:hap_fd_clr Unexecuted instantiation: cfgparse-global.c:hap_fd_clr Unexecuted instantiation: cfgparse-listen.c:hap_fd_clr Unexecuted instantiation: channel.c:hap_fd_clr Unexecuted instantiation: check.c:hap_fd_clr Unexecuted instantiation: compression.c:hap_fd_clr Unexecuted instantiation: dgram.c:hap_fd_clr Unexecuted instantiation: dns.c:hap_fd_clr Unexecuted instantiation: dns_ring.c:hap_fd_clr Unexecuted instantiation: event_hdl.c:hap_fd_clr Unexecuted instantiation: extcheck.c:hap_fd_clr Unexecuted instantiation: fcgi-app.c:hap_fd_clr Unexecuted instantiation: http_fetch.c:hap_fd_clr Unexecuted instantiation: mux_spop.c:hap_fd_clr Unexecuted instantiation: pattern.c:hap_fd_clr Unexecuted instantiation: payload.c:hap_fd_clr Unexecuted instantiation: proto_tcp.c:hap_fd_clr Unexecuted instantiation: stats-json.c:hap_fd_clr Unexecuted instantiation: stats-proxy.c:hap_fd_clr Unexecuted instantiation: flt_spoe.c:hap_fd_clr |
572 | | |
573 | | static inline unsigned int hap_fd_isset(int fd, unsigned int *evts) |
574 | 0 | { |
575 | 0 | return evts[fd / (8*sizeof(*evts))] & (1U << (fd & (8*sizeof(*evts) - 1))); |
576 | 0 | } Unexecuted instantiation: cfgparse.c:hap_fd_isset Unexecuted instantiation: cli.c:hap_fd_isset Unexecuted instantiation: connection.c:hap_fd_isset Unexecuted instantiation: debug.c:hap_fd_isset Unexecuted instantiation: errors.c:hap_fd_isset Unexecuted instantiation: fd.c:hap_fd_isset Unexecuted instantiation: filters.c:hap_fd_isset Unexecuted instantiation: flt_http_comp.c:hap_fd_isset Unexecuted instantiation: frontend.c:hap_fd_isset Unexecuted instantiation: haproxy.c:hap_fd_isset Unexecuted instantiation: http_ana.c:hap_fd_isset Unexecuted instantiation: http_ext.c:hap_fd_isset Unexecuted instantiation: http_htx.c:hap_fd_isset Unexecuted instantiation: http_rules.c:hap_fd_isset Unexecuted instantiation: lb_chash.c:hap_fd_isset Unexecuted instantiation: lb_fwlc.c:hap_fd_isset Unexecuted instantiation: limits.c:hap_fd_isset Unexecuted instantiation: listener.c:hap_fd_isset Unexecuted instantiation: log.c:hap_fd_isset Unexecuted instantiation: mailers.c:hap_fd_isset Unexecuted instantiation: mworker.c:hap_fd_isset Unexecuted instantiation: peers.c:hap_fd_isset Unexecuted instantiation: pool.c:hap_fd_isset Unexecuted instantiation: proto_rhttp.c:hap_fd_isset Unexecuted instantiation: proto_sockpair.c:hap_fd_isset Unexecuted instantiation: proxy.c:hap_fd_isset Unexecuted instantiation: queue.c:hap_fd_isset Unexecuted instantiation: resolvers.c:hap_fd_isset Unexecuted instantiation: ring.c:hap_fd_isset Unexecuted instantiation: sample.c:hap_fd_isset Unexecuted instantiation: server.c:hap_fd_isset Unexecuted instantiation: session.c:hap_fd_isset Unexecuted instantiation: signal.c:hap_fd_isset Unexecuted instantiation: sink.c:hap_fd_isset Unexecuted instantiation: sock.c:hap_fd_isset Unexecuted instantiation: sock_inet.c:hap_fd_isset Unexecuted instantiation: stats-html.c:hap_fd_isset Unexecuted instantiation: stats.c:hap_fd_isset Unexecuted instantiation: stconn.c:hap_fd_isset Unexecuted instantiation: stick_table.c:hap_fd_isset Unexecuted instantiation: stream.c:hap_fd_isset Unexecuted instantiation: task.c:hap_fd_isset Unexecuted instantiation: tcp_rules.c:hap_fd_isset Unexecuted instantiation: tcpcheck.c:hap_fd_isset Unexecuted instantiation: thread.c:hap_fd_isset Unexecuted instantiation: tools.c:hap_fd_isset Unexecuted instantiation: trace.c:hap_fd_isset Unexecuted instantiation: vars.c:hap_fd_isset Unexecuted instantiation: action.c:hap_fd_isset Unexecuted instantiation: activity.c:hap_fd_isset Unexecuted instantiation: applet.c:hap_fd_isset Unexecuted instantiation: backend.c:hap_fd_isset Unexecuted instantiation: cache.c:hap_fd_isset Unexecuted instantiation: cfgparse-global.c:hap_fd_isset Unexecuted instantiation: cfgparse-listen.c:hap_fd_isset Unexecuted instantiation: channel.c:hap_fd_isset Unexecuted instantiation: check.c:hap_fd_isset Unexecuted instantiation: compression.c:hap_fd_isset Unexecuted instantiation: dgram.c:hap_fd_isset Unexecuted instantiation: dns.c:hap_fd_isset Unexecuted instantiation: dns_ring.c:hap_fd_isset Unexecuted instantiation: event_hdl.c:hap_fd_isset Unexecuted instantiation: extcheck.c:hap_fd_isset Unexecuted instantiation: fcgi-app.c:hap_fd_isset Unexecuted instantiation: http_fetch.c:hap_fd_isset Unexecuted instantiation: mux_spop.c:hap_fd_isset Unexecuted instantiation: pattern.c:hap_fd_isset Unexecuted instantiation: payload.c:hap_fd_isset Unexecuted instantiation: proto_tcp.c:hap_fd_isset Unexecuted instantiation: stats-json.c:hap_fd_isset Unexecuted instantiation: stats-proxy.c:hap_fd_isset Unexecuted instantiation: flt_spoe.c:hap_fd_isset |
577 | | |
578 | | /* send a wake-up event to this thread, only if it's asleep and not notified yet */ |
579 | | static inline void wake_thread(int thr) |
580 | 0 | { |
581 | 0 | struct thread_ctx *ctx = &ha_thread_ctx[thr]; |
582 | |
|
583 | 0 | if ((_HA_ATOMIC_FETCH_OR(&ctx->flags, TH_FL_NOTIFIED) & (TH_FL_SLEEPING|TH_FL_NOTIFIED)) == TH_FL_SLEEPING) { |
584 | 0 | char c = 'c'; |
585 | 0 | DISGUISE(write(poller_wr_pipe[thr], &c, 1)); |
586 | 0 | } |
587 | 0 | } Unexecuted instantiation: cfgparse.c:wake_thread Unexecuted instantiation: cli.c:wake_thread Unexecuted instantiation: connection.c:wake_thread Unexecuted instantiation: debug.c:wake_thread Unexecuted instantiation: errors.c:wake_thread Unexecuted instantiation: fd.c:wake_thread Unexecuted instantiation: filters.c:wake_thread Unexecuted instantiation: flt_http_comp.c:wake_thread Unexecuted instantiation: frontend.c:wake_thread Unexecuted instantiation: haproxy.c:wake_thread Unexecuted instantiation: http_ana.c:wake_thread Unexecuted instantiation: http_ext.c:wake_thread Unexecuted instantiation: http_htx.c:wake_thread Unexecuted instantiation: http_rules.c:wake_thread Unexecuted instantiation: lb_chash.c:wake_thread Unexecuted instantiation: lb_fwlc.c:wake_thread Unexecuted instantiation: limits.c:wake_thread Unexecuted instantiation: listener.c:wake_thread Unexecuted instantiation: log.c:wake_thread Unexecuted instantiation: mailers.c:wake_thread Unexecuted instantiation: mworker.c:wake_thread Unexecuted instantiation: peers.c:wake_thread Unexecuted instantiation: pool.c:wake_thread Unexecuted instantiation: proto_rhttp.c:wake_thread Unexecuted instantiation: proto_sockpair.c:wake_thread Unexecuted instantiation: proxy.c:wake_thread Unexecuted instantiation: queue.c:wake_thread Unexecuted instantiation: resolvers.c:wake_thread Unexecuted instantiation: ring.c:wake_thread Unexecuted instantiation: sample.c:wake_thread Unexecuted instantiation: server.c:wake_thread Unexecuted instantiation: session.c:wake_thread Unexecuted instantiation: signal.c:wake_thread Unexecuted instantiation: sink.c:wake_thread Unexecuted instantiation: sock.c:wake_thread Unexecuted instantiation: sock_inet.c:wake_thread Unexecuted instantiation: stats-html.c:wake_thread Unexecuted instantiation: stats.c:wake_thread Unexecuted instantiation: stconn.c:wake_thread Unexecuted instantiation: stick_table.c:wake_thread Unexecuted instantiation: stream.c:wake_thread Unexecuted instantiation: task.c:wake_thread Unexecuted instantiation: tcp_rules.c:wake_thread Unexecuted instantiation: tcpcheck.c:wake_thread Unexecuted instantiation: thread.c:wake_thread Unexecuted instantiation: tools.c:wake_thread Unexecuted instantiation: trace.c:wake_thread Unexecuted instantiation: vars.c:wake_thread Unexecuted instantiation: action.c:wake_thread Unexecuted instantiation: activity.c:wake_thread Unexecuted instantiation: applet.c:wake_thread Unexecuted instantiation: backend.c:wake_thread Unexecuted instantiation: cache.c:wake_thread Unexecuted instantiation: cfgparse-global.c:wake_thread Unexecuted instantiation: cfgparse-listen.c:wake_thread Unexecuted instantiation: channel.c:wake_thread Unexecuted instantiation: check.c:wake_thread Unexecuted instantiation: compression.c:wake_thread Unexecuted instantiation: dgram.c:wake_thread Unexecuted instantiation: dns.c:wake_thread Unexecuted instantiation: dns_ring.c:wake_thread Unexecuted instantiation: event_hdl.c:wake_thread Unexecuted instantiation: extcheck.c:wake_thread Unexecuted instantiation: fcgi-app.c:wake_thread Unexecuted instantiation: http_fetch.c:wake_thread Unexecuted instantiation: mux_spop.c:wake_thread Unexecuted instantiation: pattern.c:wake_thread Unexecuted instantiation: payload.c:wake_thread Unexecuted instantiation: proto_tcp.c:wake_thread Unexecuted instantiation: stats-json.c:wake_thread Unexecuted instantiation: stats-proxy.c:wake_thread Unexecuted instantiation: flt_spoe.c:wake_thread |
588 | | |
589 | | |
590 | | #endif /* _HAPROXY_FD_H */ |
591 | | |
592 | | /* |
593 | | * Local variables: |
594 | | * c-indent-level: 8 |
595 | | * c-basic-offset: 8 |
596 | | * End: |
597 | | */ |