mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: fd: Add fd_active function
This inlined function is used to check if a fd is active for receive or send. It will ease threads support integration.
This commit is contained in:
parent
6988f678cd
commit
8db2fdfaba
@ -241,6 +241,14 @@ static inline int fd_send_polled(const int fd)
|
|||||||
return (unsigned)fdtab[fd].state & FD_EV_POLLED_W;
|
return (unsigned)fdtab[fd].state & FD_EV_POLLED_W;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* returns true if the FD is active for recv or send
|
||||||
|
*/
|
||||||
|
static inline int fd_active(const int fd)
|
||||||
|
{
|
||||||
|
return (unsigned)fdtab[fd].state & FD_EV_ACTIVE_RW;
|
||||||
|
}
|
||||||
|
|
||||||
/* Disable processing recv events on fd <fd> */
|
/* Disable processing recv events on fd <fd> */
|
||||||
static inline void fd_stop_recv(int fd)
|
static inline void fd_stop_recv(int fd)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user