结构体 | |
struct | epoll_head |
函数 | |
static int | EpollAllocSysFd (int maxfdp, struct epoll_head *head) |
static int | EpollFreeSysFd (int fd) |
static struct epoll_head * | EpollGetDataBuff (int fd) |
static int | CheckFdExist (struct epoll_head *epHead, int fd) |
static VOID | DoEpollClose (struct epoll_head *epHead) |
int | epoll_create1 (int flags) |
int | epoll_close (int epfd) |
int | epoll_ctl (int epfd, int op, int fd, struct epoll_event *ev) |
int | epoll_wait (int epfd, FAR struct epoll_event *evs, int maxevents, int timeout) |
变量 | |
STATIC pthread_mutex_t | g_epollMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP |
STATIC fd_set | g_epollFdSet |
STATIC struct epoll_head * | g_epPrivBuf [MAX_EPOLL_FD] |
|
static |
when do EPOLL_CTL_ADD, need check if fd exist
epHead | epoll control head, find by epoll id . |
fd | ctl add fd. |
在文件 fs_epoll.c 第 135 行定义.
|
static |
epoll_close, called by close
epfd | epoll fd |
在文件 fs_epoll.c 第 219 行定义.
epoll_create unsupported api
epoll_create is implemented by calling epoll_create1, it's parameter 'size' is useless.
epoll_create1, The simple version of epoll does not use red-black trees, so when fd is normal value (greater than 0), actually allocated epoll can manage num of EPOLL_DEFAULT_SIZE
flags | not actually used |
在文件 fs_epoll.c 第 179 行定义.
int epoll_ctl | ( | int | epfd, |
int | op, | ||
int | fd, | ||
struct epoll_event * | ev | ||
) |
int epoll_wait | ( | int | epfd, |
FAR struct epoll_event * | evs, | ||
int | maxevents, | ||
int | timeout | ||
) |
|
static |
Alloc sysFd, storage epoll private data, set using bit.
maxfdp | Maximum allowed application of sysFd. |
head | Private data. |
在文件 fs_epoll.c 第 67 行定义.
free sysFd, delete epoll private data, clear using bit.
fd | epoll fd. |
在文件 fs_epoll.c 第 93 行定义.
|
static |
get private data by epoll fd
fd | epoll fd. |
在文件 fs_epoll.c 第 117 行定义.
STATIC fd_set g_epollFdSet |
在文件 fs_epoll.c 第 55 行定义.
STATIC pthread_mutex_t g_epollMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP |
在文件 fs_epoll.c 第 48 行定义.
STATIC struct epoll_head* g_epPrivBuf[MAX_EPOLL_FD] |
在文件 fs_epoll.c 第 58 行定义.