mirror of
https://passt.top/passt
synced 2025-08-11 17:53:14 +02:00
util: Rename and make global vu_remove_watch()
vu_remove_watch() is used in vhost_user.c to remove an fd from the global epoll set. There's nothing really vhost user specific about it though, so rename, move to util.c and use it in a bunch of places outside vhost_user.c where it makes things marginally more readable. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
10c4a9e1b3
commit
0349cf637f
9 changed files with 25 additions and 27 deletions
|
@ -200,8 +200,8 @@ static void conn_flag_do(const struct ctx *c, struct tcp_splice_conn *conn,
|
|||
}
|
||||
|
||||
if (flag == CLOSING) {
|
||||
epoll_ctl(c->epollfd, EPOLL_CTL_DEL, conn->s[0], NULL);
|
||||
epoll_ctl(c->epollfd, EPOLL_CTL_DEL, conn->s[1], NULL);
|
||||
epoll_del(c, conn->s[0]);
|
||||
epoll_del(c, conn->s[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue