X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/b2609562b3d4fc548afcc0a3dfe4ff5fd4ae3d36..6623ac357055b95ce4fc0cbe9c5dc15524a9f20c:/rpc/rpc.cc diff --git a/rpc/rpc.cc b/rpc/rpc.cc index c417f40..abbe470 100644 --- a/rpc/rpc.cc +++ b/rpc/rpc.cc @@ -52,10 +52,8 @@ x exited worker threads). */ -#include "types.h" #include "rpc.h" -#include #include #include #include @@ -266,7 +264,7 @@ rpcc::get_refconn(shared_ptr & ch) { lock ml(chan_m_); if (!chan_ || chan_->isdead()) - chan_ = connect_to_dst(dst_, this, lossytest_); + chan_ = connection::to_dst(dst_, this, lossytest_); if (chan_) ch = chan_; @@ -341,10 +339,10 @@ rpcs::rpcs(in_port_t p1, size_t count) { set_rand_seed(); nonce_ = (unsigned int)random(); - IF_LEVEL(0) LOG("created with nonce " << nonce_); + IF_LEVEL(2) LOG("created with nonce " << nonce_); reg(rpc_const::bind, &rpcs::rpcbind, this); - dispatchpool_ = unique_ptr(new ThrPool(6, false)); + dispatchpool_ = unique_ptr(new thread_pool(6, false)); } void rpcs::start() { @@ -479,9 +477,8 @@ void rpcs::dispatch(shared_ptr c, const string & buf) { switch (stat) { case NEW: // new request - if (counting_){ + if (counting_) updatestat(proc); - } rh.ret = (*f)(req, rep); if (rh.ret == rpc_const::unmarshal_args_failure) { @@ -612,7 +609,7 @@ void rpcs::free_reply_window(void) { } int rpcs::rpcbind(unsigned int &r, int) { - IF_LEVEL(0) LOG("called return nonce " << nonce_); + IF_LEVEL(2) LOG("called return nonce " << nonce_); r = nonce_; return 0; }