]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: fd: add a bitmask to indicate that an FD is known by the poller
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Jan 2018 17:44:46 +0000 (18:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 23 Jan 2018 14:42:57 +0000 (15:42 +0100)
commitc9c8378c2b7aed45a9b4733d81f69338dad7614a
tree0e1b4fb36b91c20395e91d0278cfd2d51d3cc64b
parentebc78d78a27ac3de7308eeb499c51d638e79ed6b
MINOR: fd: add a bitmask to indicate that an FD is known by the poller

Some pollers like epoll() need to know if the fd is already known or
not in order to compute the operation to perform (add, mod, del). For
now this is performed based on the difference between the previous FD
state and the new state but this will not be usable anymore once threads
become responsible for their own polling.

Here we come with a different approach : a bitmask is stored with the
fd to indicate which pollers already know it, and the pollers will be
able to simply perform the add/mod/del operations based on this bit
combined with the new state.

This patch only adds the bitmask declaration and initialization, it
is it not yet used. It will be needed by the next two fixes and will
need to be backported to 1.8.
include/proto/fd.h
include/types/fd.h
src/fd.c