MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fdset_add_fd

Function fdset_add_fd

dpdk/lib/vhost/fd_man.c:79–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79static void
80fdset_add_fd(struct fdset *pfdset, int idx, int fd,
81 fd_cb rcb, fd_cb wcb, void *dat)
82{
83 struct fdentry *pfdentry = &pfdset->fd[idx];
84 struct pollfd *pfd = &pfdset->rwfds[idx];
85
86 pfdentry->fd = fd;
87 pfdentry->rcb = rcb;
88 pfdentry->wcb = wcb;
89 pfdentry->dat = dat;
90
91 pfd->fd = fd;
92 pfd->events = rcb ? POLLIN : 0;
93 pfd->events |= wcb ? POLLOUT : 0;
94 pfd->revents = 0;
95}
96
97void
98fdset_init(struct fdset *pfdset)

Callers 1

fdset_addFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected