Cleanups
[invirt/third/libt4.git] / rpc / pollmgr.h
index c0a5748..89d1660 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <sys/select.h>
 #include <vector>
+#include <thread>
 
 #ifdef __linux__
 #include <sys/epoll.h>
@@ -54,9 +55,9 @@ class PollMgr {
                static int useless;
 
        private:
-               pthread_mutex_t m_;
-               pthread_cond_t changedone_c_;
-               pthread_t th_;
+        std::mutex m_;
+        std::condition_variable changedone_c_;
+        std::thread th_;
 
                aio_callback *callbacks_[MAX_POLL_FDS];
                aio_mgr *aio_;
@@ -81,7 +82,7 @@ class SelectAIO : public aio_mgr {
                int highfds_;
                int pipefd_[2];
 
-               pthread_mutex_t m_;
+        std::mutex m_;
 
 };