X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/5fd8cc8409d0efadc07dfe8d6774ad9ff477663d..f2170465073de34adf89161d4287182b518352c4:/rpc/pollmgr.h?ds=inline diff --git a/rpc/pollmgr.h b/rpc/pollmgr.h index c0a5748..89d1660 100644 --- a/rpc/pollmgr.h +++ b/rpc/pollmgr.h @@ -3,6 +3,7 @@ #include #include +#include #ifdef __linux__ #include @@ -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_; };