From 58eae4fc8af1602396da456aab109eca8aaed7d6 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 23 Mar 2009 18:49:06 +0000 Subject: Add test-compile checks for epoll and eventfd git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11253 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/threadengines/threadengine_pthread.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/threadengines/threadengine_pthread.cpp') diff --git a/src/threadengines/threadengine_pthread.cpp b/src/threadengines/threadengine_pthread.cpp index 5aef0f247..a4f42eba9 100644 --- a/src/threadengines/threadengine_pthread.cpp +++ b/src/threadengines/threadengine_pthread.cpp @@ -15,6 +15,7 @@ #include "threadengines/threadengine_pthread.h" #include #include +#include ThreadEngine::ThreadEngine(InspIRCd* Instance) { @@ -57,11 +58,7 @@ void ThreadData::FreeThread(Thread* thread) pthread_join(pthread_id, NULL); } -#if 0 -/* TODO this is a linux-specific syscall that allows signals to be - * sent using a single file descriptor, rather than 2 for a pipe. - * Requires glibc 2.8, kernel 2.6.22+ - */ +#ifdef HAS_EVENTFD #include class ThreadSignalSocket : public BufferedSocket @@ -92,7 +89,7 @@ class ThreadSignalSocket : public BufferedSocket SocketThread::SocketThread(InspIRCd* SI) { - int fd = eventfd(0, 0); // TODO nonblock + int fd = eventfd(0, O_NONBLOCK); if (fd < 0) throw new CoreException("Could not create pipe " + std::string(strerror(errno))); signal.sock = new ThreadSignalSocket(this, SI, fd); -- cgit v1.2.3