xref: /dpdk/lib/vhost/fd_man.h (revision 7917b0d38e92e8b9ec5a870415b791420e10f11a)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4 
5 #ifndef _FD_MAN_H_
6 #define _FD_MAN_H_
7 #include <pthread.h>
8 #include <poll.h>
9 #include <sys/queue.h>
10 
11 struct fdset;
12 
13 #define MAX_FDS 1024
14 
15 typedef void (*fd_cb)(int fd, void *dat, int *remove);
16 
17 struct fdset *fdset_init(const char *name);
18 
19 int fdset_add(struct fdset *pfdset, int fd,
20 	fd_cb rcb, fd_cb wcb, void *dat);
21 
22 void fdset_del(struct fdset *pfdset, int fd);
23 int fdset_try_del(struct fdset *pfdset, int fd);
24 
25 #endif
26