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

Function fdset_find_fd

dpdk/lib/vhost/fd_man.c:68–77  ·  view source on GitHub ↗

* Returns the index in the fdset for a given fd. * @return * index for the fd, or -1 if fd isn't in the fdset. */

Source from the content-addressed store, hash-verified

66 * index for the fd, or -1 if fd isn't in the fdset.
67 */
68static int
69fdset_find_fd(struct fdset *pfdset, int fd)
70{
71 int i;
72
73 for (i = 0; i < pfdset->num && pfdset->fd[i].fd != fd; i++)
74 ;
75
76 return i == pfdset->num ? -1 : i;
77}
78
79static void
80fdset_add_fd(struct fdset *pfdset, int idx, int fd,

Callers 2

fdset_delFunction · 0.85
fdset_try_delFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected