kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 478c008c994e61ea30154f5cadaabe63d2e51780
parent 8313a31eba8d4535372c120a1c1683f8fcd1ede7
Author: Joris Vink <joris@coders.se>
Date:   Mon, 28 Jul 2014 23:35:12 +0200

Missing parts from last commit

Diffstat:
includes/kore.h | 2+-
src/bsd.c | 4++--
src/linux.c | 4++--
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -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 *); diff --git a/src/bsd.c b/src/bsd.c @@ -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) diff --git a/src/linux.c b/src/linux.c @@ -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;