MINOR: xprt: add new xprt_set_idle and xprt_set_used methods
authorWilly Tarreau <w@1wt.eu>
Tue, 2 Mar 2021 16:27:58 +0000 (17:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 10 Mar 2021 14:11:16 +0000 (15:11 +0100)
commit9a4864dc5bcec78820886ff6a0c078426fade9d6
tree3f67a467032b8da1ba8b065ace665b91104bfc90
parentb360bb887f1410ab0cff570f13a890003fbac61a
MINOR: xprt: add new xprt_set_idle and xprt_set_used methods

These functions are used on the mux layer to indicate that the connection
is becoming idle and that the xprt ought to be careful before checking the
context or that it's not idle anymore and that the context is safe. The
purpose is to allow a mux which is going to release a connection to tell
the xprt to be careful when touching it. At the moment, the xprt are
always careful and that's costly so we want to have the ability to relax
this a bit.

No xprt layer uses this yet.

(cherry picked from commit 4f8cd4397f07389129dd23b07e94018404340731)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/connection-t.h
include/haproxy/connection.h
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c