fs_epoll: support extend the epoll dynamicly.

1. epoll_ctl(EPOLL_CTL_ADD) support extend the epoll
   events dynamicly;
2. enhance the epoll performance by moving some poll setup
   and teardown process to the EPOLL_CTL_ADD/DEL/MOD;

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
This commit is contained in:
wangbowen6
2022-11-13 22:46:00 +08:00
committed by Xiang Xiao
parent 39338ce96c
commit 25bfd437fe
3 changed files with 386 additions and 188 deletions
+3
View File
@@ -28,6 +28,7 @@
#include <nuttx/config.h>
#include <nuttx/compiler.h>
#include <stdbool.h>
#include <stdint.h>
#include <signal.h>
#include <semaphore.h>
@@ -150,6 +151,8 @@ int ppoll(FAR struct pollfd *fds, nfds_t nfds,
FAR const struct timespec *timeout_ts,
FAR const sigset_t *sigmask);
int poll_fdsetup(int fd, FAR struct pollfd *fds, bool setup);
void poll_default_cb(FAR struct pollfd *fds);
void poll_notify(FAR struct pollfd **afds, int nfds, pollevent_t eventset);
#undef EXTERN