X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/2546a41ad36fdc9ef6471cb35a1d56930ae1b527..5a5c578e2e358a121cdb9234a6cb11c4ecfbf323:/rpc/connection.h?ds=inline diff --git a/rpc/connection.h b/rpc/connection.h index f529a35..261cf9f 100644 --- a/rpc/connection.h +++ b/rpc/connection.h @@ -1,22 +1,16 @@ #ifndef connection_h #define connection_h +#include "types.h" #include -#include #include #include #include -#include - -#include -#include - #include "pollmgr.h" -constexpr size_t size_t_max = std::numeric_limits::max(); +constexpr size_t size_t_max = numeric_limits::max(); -class thread_exit_exception : std::exception { -}; +class thread_exit_exception : exception {}; class connection; @@ -64,16 +58,16 @@ class connection : public aio_callback { charbuf wpdu_; charbuf rpdu_; - std::chrono::time_point create_time_; + time_point create_time_; int waiters_; int refno_; const int lossy_; - std::mutex m_; - std::mutex ref_m_; - std::condition_variable send_complete_; - std::condition_variable send_wait_; + mutex m_; + mutex ref_m_; + cond send_complete_; + cond send_wait_; }; class tcpsconn { @@ -84,14 +78,14 @@ class tcpsconn { void accept_conn(); private: unsigned int port_; - std::mutex m_; - std::thread th_; + mutex m_; + thread th_; int pipe_[2]; int tcp_; //file desciptor for accepting connection chanmgr *mgr_; int lossy_; - std::map conns_; + map conns_; void process_accept(); };