mirror of https://git.kore.io/kore.git
Missing parts from last commit
This commit is contained in:
parent
8313a31eba
commit
478c008c99
|
@ -346,11 +346,11 @@ void kore_worker_connection_remove(struct connection *);
|
||||||
|
|
||||||
void kore_platform_init(void);
|
void kore_platform_init(void);
|
||||||
void kore_platform_event_init(void);
|
void kore_platform_event_init(void);
|
||||||
void kore_platform_event_wait(void);
|
|
||||||
void kore_platform_proctitle(char *);
|
void kore_platform_proctitle(char *);
|
||||||
void kore_platform_disable_read(int);
|
void kore_platform_disable_read(int);
|
||||||
void kore_platform_enable_accept(void);
|
void kore_platform_enable_accept(void);
|
||||||
void kore_platform_disable_accept(void);
|
void kore_platform_disable_accept(void);
|
||||||
|
void kore_platform_event_wait(u_int64_t);
|
||||||
void kore_platform_schedule_read(int, void *);
|
void kore_platform_schedule_read(int, void *);
|
||||||
void kore_platform_event_schedule(int, int, int, void *);
|
void kore_platform_event_schedule(int, int, int, void *);
|
||||||
void kore_platform_worker_setcpu(struct kore_worker *);
|
void kore_platform_worker_setcpu(struct kore_worker *);
|
||||||
|
|
|
@ -83,7 +83,7 @@ kore_platform_event_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
kore_platform_event_wait(void)
|
kore_platform_event_wait(u_int64_t timer)
|
||||||
{
|
{
|
||||||
struct listener *l;
|
struct listener *l;
|
||||||
struct connection *c;
|
struct connection *c;
|
||||||
|
@ -92,7 +92,7 @@ kore_platform_event_wait(void)
|
||||||
int n, i;
|
int n, i;
|
||||||
|
|
||||||
timeo.tv_sec = 0;
|
timeo.tv_sec = 0;
|
||||||
timeo.tv_nsec = 100000000;
|
timeo.tv_nsec = timer * 1000000;
|
||||||
n = kevent(kfd, changelist, nchanges, events, event_count, &timeo);
|
n = kevent(kfd, changelist, nchanges, events, event_count, &timeo);
|
||||||
if (n == -1) {
|
if (n == -1) {
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
|
|
|
@ -72,14 +72,14 @@ kore_platform_event_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
kore_platform_event_wait(void)
|
kore_platform_event_wait(u_int64_t timer)
|
||||||
{
|
{
|
||||||
struct connection *c;
|
struct connection *c;
|
||||||
struct listener *l;
|
struct listener *l;
|
||||||
u_int8_t type;
|
u_int8_t type;
|
||||||
int n, i;
|
int n, i;
|
||||||
|
|
||||||
n = epoll_wait(efd, events, event_count, 100);
|
n = epoll_wait(efd, events, event_count, timer);
|
||||||
if (n == -1) {
|
if (n == -1) {
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue