]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: fd: remove the now unused fd_compute_new_polled_status() function
authorWilly Tarreau <w@1wt.eu>
Thu, 25 Jan 2018 16:16:55 +0000 (17:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 5 Feb 2018 15:02:22 +0000 (16:02 +0100)
It's not used anymore since the new state is calculated on the fly
during every update. Let's remove this function.

include/proto/fd.h

index be55f8ab12fdbc3635e6943ba812e3739fb627c2..163c011e8261daf8314ffd0438bd3cba31bf3f98 100644 (file)
@@ -311,28 +311,6 @@ static inline void fd_release_cache_entry(int fd)
                fd_rm_from_fd_list(&fd_cache, fd);
 }
 
-/* Computes the new polled status based on the active and ready statuses, for
- * each direction. This is meant to be used by pollers while processing updates.
- */
-static inline int fd_compute_new_polled_status(int state)
-{
-       if (state & FD_EV_ACTIVE_R) {
-               if (!(state & FD_EV_READY_R))
-                       state |= FD_EV_POLLED_R;
-       }
-       else
-               state &= ~FD_EV_POLLED_R;
-
-       if (state & FD_EV_ACTIVE_W) {
-               if (!(state & FD_EV_READY_W))
-                       state |= FD_EV_POLLED_W;
-       }
-       else
-               state &= ~FD_EV_POLLED_W;
-
-       return state;
-}
-
 /* This function automatically enables/disables caching for an entry depending
  * on its state. It is only called on state changes.
  */