kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit d3332d59214ec950d62af9f7312883321ae12a76
parent 3c0cc79e6be9f6767ddea826f5962e13cfefc25b
Author: Joris Vink <joris@coders.se>
Date:   Wed,  9 Dec 2015 21:29:44 +0100

Add kore_platform_schedule_write().

Diffstat:
includes/kore.h | 1+
src/bsd.c | 6++++++
src/linux.c | 6++++++
3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -427,6 +427,7 @@ void kore_platform_disable_accept(void); int kore_platform_event_wait(u_int64_t); void kore_platform_event_all(int, void *); void kore_platform_schedule_read(int, void *); +void kore_platform_schedule_write(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 @@ -239,6 +239,12 @@ kore_platform_schedule_read(int fd, void *data) } void +kore_platform_schedule_write(int fd, void *data) +{ + kore_platform_event_schedule(fd, EVFILT_WRITE, EV_ADD, data); +} + +void kore_platform_disable_read(int fd) { kore_platform_event_schedule(fd, EVFILT_READ, EV_DELETE, NULL); diff --git a/src/linux.c b/src/linux.c @@ -209,6 +209,12 @@ kore_platform_schedule_read(int fd, void *data) } void +kore_platform_schedule_write(int fd, void *data) +{ + kore_platform_event_schedule(fd, EPOLLOUT, 0, data); +} + +void kore_platform_disable_read(int fd) { if (epoll_ctl(efd, EPOLL_CTL_DEL, fd, NULL) == -1)