summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ThreadPool.h')
-rw-r--r--cpp/src/Ice/ThreadPool.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h
index 81bc26b6418..4914b1b0fa5 100644
--- a/cpp/src/Ice/ThreadPool.h
+++ b/cpp/src/Ice/ThreadPool.h
@@ -22,12 +22,18 @@
#include <Ice/EventHandlerF.h>
#include <list>
-#ifdef _WIN32
-# include <winsock2.h>
+#ifdef _WIN32
+# include <winsock2.h>
#else
# define SOCKET int
+# ifdef __linux
+# include <sys/epoll.h>
+# else
+# include <sys/poll.h>
+# endif
#endif
+
namespace IceInternal
{
@@ -66,7 +72,14 @@ private:
SOCKET _lastFd;
SOCKET _fdIntrRead;
SOCKET _fdIntrWrite;
+#if defined(_WIN32)
fd_set _fdSet;
+#elif defined(__linux)
+ int _epollFd;
+ std::vector<struct epoll_event> _events;
+#else
+ std::vector<struct pollfd> _pollFdSet;
+#endif
std::list<std::pair<SOCKET, EventHandlerPtr> > _changes; // Event handler set for addition; null for removal.