From: pk910 Date: Mon, 24 Sep 2012 14:53:12 +0000 (+0200) Subject: Merge remote-tracking branch 'IOMultiplexer.git/master' into development X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=commitdiff_plain;h=8ce78bf760720d04385821abba8f888b5de03140;hp=3ed0a4b0f4ce4dc94ae52dcbd2a18770083241ce Merge remote-tracking branch 'IOMultiplexer.git/master' into development --- diff --git a/src/IOHandler.c b/src/IOHandler.c index 81d8d09..db9a599 100644 --- a/src/IOHandler.c +++ b/src/IOHandler.c @@ -706,11 +706,15 @@ void iohandler_events(struct IODescriptor *iofd, int readable, int writeable) { } void iohandler_poll() { + struct timeval timeout; + timeout.tv_sec = IO_MAX_TIMEOUT; + timeout.tv_usec = 0; + iohandler_poll_timeout(timeout); +} + +void iohandler_poll_timeout(struct timeval timeout) { if(engine) { IOSYNCHRONIZE(io_poll_sync); //quite senceless multithread support... better support will follow - struct timeval timeout; - timeout.tv_sec = IO_MAX_TIMEOUT; - timeout.tv_usec = 0; engine->loop(&timeout); IODESYNCHRONIZE(io_poll_sync); } diff --git a/src/IOHandler.h b/src/IOHandler.h index 23c411c..ea7b443 100644 --- a/src/IOHandler.h +++ b/src/IOHandler.h @@ -118,5 +118,6 @@ void iohandler_update(struct IODescriptor *iofd); void iohandler_set_timeout(struct IODescriptor *iofd, struct timeval *timeout); void iohandler_poll(); +void iohandler_poll_timeout(struct timeval timeout); #endif