mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Adding a generic cork mechanism for events
This commit is contained in:
@@ -205,7 +205,7 @@ sk_stop(sock *s)
|
||||
}
|
||||
|
||||
static inline uint sk_want_events(sock *s)
|
||||
{ return (s->rx_hook ? POLLIN : 0) | ((s->ttx != s->tpos) ? POLLOUT : 0); }
|
||||
{ return ((s->rx_hook && !ev_corked(s->cork)) ? POLLIN : 0) | ((s->ttx != s->tpos) ? POLLOUT : 0); }
|
||||
|
||||
/*
|
||||
FIXME: this should be called from sock code
|
||||
|
||||
@@ -2234,7 +2234,7 @@ io_loop(void)
|
||||
{
|
||||
pfd[nfds] = (struct pollfd) { .fd = -1 }; /* everything other set to 0 by this */
|
||||
s = SKIP_BACK(sock, n, n);
|
||||
if (s->rx_hook)
|
||||
if (s->rx_hook && !ev_corked(s->cork))
|
||||
{
|
||||
pfd[nfds].fd = s->fd;
|
||||
pfd[nfds].events |= POLLIN;
|
||||
|
||||
Reference in New Issue
Block a user