X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/61809b48ade4c21b1b01931d520aa2abc7507032..a4175b2e216a20b86cc872dea8a08005c60617a5:/rpc/rpc.h?ds=inline diff --git a/rpc/rpc.h b/rpc/rpc.h index fc61236..723121c 100644 --- a/rpc/rpc.h +++ b/rpc/rpc.h @@ -43,8 +43,8 @@ class rpcc : public chanmgr { unmarshall *un; int intret; bool done; - pthread_mutex_t m; - pthread_cond_t c; + std::mutex m; + std::condition_variable c; }; void get_refconn(connection **ch); @@ -62,11 +62,11 @@ class rpcc : public chanmgr { connection *chan_; - pthread_mutex_t m_; // protect insert/delete to calls[] - pthread_mutex_t chan_m_; + std::mutex m_; // protect insert/delete to calls[] + std::mutex chan_m_; bool destroy_wait_; - pthread_cond_t destroy_wait_c_; + std::condition_variable destroy_wait_c_; std::map calls_; std::list xid_rep_window_; @@ -328,10 +328,10 @@ class rpcs : public chanmgr { // map proc # to function std::map procs_; - pthread_mutex_t procs_m_; // protect insert/delete to procs[] - pthread_mutex_t count_m_; //protect modification of counts - pthread_mutex_t reply_window_m_; // protect reply window et al - pthread_mutex_t conss_m_; // protect conns_ + std::mutex procs_m_; // protect insert/delete to procs[] + std::mutex count_m_; //protect modification of counts + std::mutex reply_window_m_; // protect reply window et al + std::mutex conss_m_; // protect conns_ protected: @@ -626,8 +626,4 @@ void make_sockaddr(const char *hostandport, struct sockaddr_in *dst); void make_sockaddr(const char *host, const char *port, struct sockaddr_in *dst); -int cmp_timespec(const struct timespec &a, const struct timespec &b); -void add_timespec(const struct timespec &a, int b, struct timespec *result); -int diff_timespec(const struct timespec &a, const struct timespec &b); - #endif