BUG/MINOR: sink: fix a race condition between the writer and the reader

This is the same issue as just fixed in b8e0fb97f ("BUG/MINOR: ring/cli:
fix a race condition between the writer and the reader") but this time
for sinks. They're also sucking the ring and present the same race at
high write loads.

This must be backported to 2.2 as well. See comments in the aforementioned
commit for backport hints if needed.

(cherry picked from commit 53bfab080c124181e555f1c8b1f150d673847738)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit aeb71723a16e0ea492a565ac923c6d058e45bfe1)
[wt: s/applet_have_no_more_data/si_rx_endp_done/;
     s/applet_have_more_data/si_rx_endp_more/]
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 49f25f5413d502357d6ef1da17e13da2fe0be2d6)
Signed-off-by: Willy Tarreau <w@1wt.eu>
1 file changed