projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanups
[invirt/third/libt4.git]
/
rpc
/
pollmgr.h
diff --git
a/rpc/pollmgr.h
b/rpc/pollmgr.h
index
c0a5748
..
89d1660
100644
(file)
--- a/
rpc/pollmgr.h
+++ b/
rpc/pollmgr.h
@@
-3,6
+3,7
@@
#include <sys/select.h>
#include <vector>
#include <sys/select.h>
#include <vector>
+#include <thread>
#ifdef __linux__
#include <sys/epoll.h>
#ifdef __linux__
#include <sys/epoll.h>
@@
-54,9
+55,9
@@
class PollMgr {
static int useless;
private:
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_;
aio_callback *callbacks_[MAX_POLL_FDS];
aio_mgr *aio_;
@@
-81,7
+82,7
@@
class SelectAIO : public aio_mgr {
int highfds_;
int pipefd_[2];
int highfds_;
int pipefd_[2];
- pthread_mutex_t m_;
+ std::mutex m_;
};
};