epoll: add global init function
This commit is contained in:
parent
049a7b8be2
commit
16f62017ba
8
src/epoll-init.h
Normal file
8
src/epoll-init.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef EPOLL_EPOLL_INIT_H_
|
||||
#define EPOLL_EPOLL_INIT_H_
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
EPOLL_INTERNAL int epoll_global_init(void);
|
||||
|
||||
#endif /* EPOLL_EPOLL_INIT_H_ */
|
||||
@ -11,6 +11,10 @@
|
||||
|
||||
#define _EPOLL_MAX_COMPLETION_COUNT 64
|
||||
|
||||
int epoll_global_init(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
epoll_t epoll_create(void) {
|
||||
ep_port_t* port_info;
|
||||
HANDLE iocp;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "epoll-init.h"
|
||||
#include "error.h"
|
||||
#include "init.h"
|
||||
#include "nt.h"
|
||||
@ -21,7 +22,7 @@ static int _winsock_global_init(void) {
|
||||
|
||||
static int _init_once(void) {
|
||||
if (_winsock_global_init() < 0 || nt_global_init() < 0 ||
|
||||
reflock_global_init() < 0)
|
||||
reflock_global_init() < 0 || epoll_global_init() < 0)
|
||||
return -1;
|
||||
|
||||
_initialized = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user