Missing parts from last commit

This commit is contained in:
Joris Vink 2014-07-28 23:35:12 +02:00
parent 8313a31eba
commit 478c008c99
3 changed files with 5 additions and 5 deletions

View File

@ -346,11 +346,11 @@ void kore_worker_connection_remove(struct connection *);
void kore_platform_init(void);
void kore_platform_event_init(void);
void kore_platform_event_wait(void);
void kore_platform_proctitle(char *);
void kore_platform_disable_read(int);
void kore_platform_enable_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_event_schedule(int, int, int, void *);
void kore_platform_worker_setcpu(struct kore_worker *);

View File

@ -83,7 +83,7 @@ kore_platform_event_init(void)
}
void
kore_platform_event_wait(void)
kore_platform_event_wait(u_int64_t timer)
{
struct listener *l;
struct connection *c;
@ -92,7 +92,7 @@ kore_platform_event_wait(void)
int n, i;
timeo.tv_sec = 0;
timeo.tv_nsec = 100000000;
timeo.tv_nsec = timer * 1000000;
n = kevent(kfd, changelist, nchanges, events, event_count, &timeo);
if (n == -1) {
if (errno == EINTR)

View File

@ -72,14 +72,14 @@ kore_platform_event_init(void)
}
void
kore_platform_event_wait(void)
kore_platform_event_wait(u_int64_t timer)
{
struct connection *c;
struct listener *l;
u_int8_t type;
int n, i;
n = epoll_wait(efd, events, event_count, 100);
n = epoll_wait(efd, events, event_count, timer);
if (n == -1) {
if (errno == EINTR)
return;