X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/2546a41ad36fdc9ef6471cb35a1d56930ae1b527..46fb2b4bbe3a0a8516ab04cfafa895a882c70f86:/rpc/rpc.h diff --git a/rpc/rpc.h b/rpc/rpc.h index d81a5dd..f01af09 100644 --- a/rpc/rpc.h +++ b/rpc/rpc.h @@ -1,20 +1,13 @@ #ifndef rpc_h #define rpc_h +#include "types.h" #include #include -#include -#include -#include #include "thr_pool.h" #include "marshall.h" #include "connection.h" -#include "lock.h" - -using std::string; -using std::map; -using std::list; class rpc_const { public: @@ -37,13 +30,12 @@ class rpcc : public chanmgr { //manages per rpc info struct caller { - caller(int xxid, unmarshall *un); - ~caller(); + caller(int _xid, unmarshall *_un) : xid(_xid), un(_un) {} int xid; unmarshall *un; int intret; - bool done; + bool done = false; mutex m; cond c; }; @@ -126,9 +118,8 @@ rpcc::call_m(proc_t proc, marshall &req, R & r, TO to) if (intret < 0) return intret; u >> r; if (u.okdone() != true) { - fprintf(stderr, "rpcc::call_m: failed to unmarshall the reply." - "You are probably calling RPC 0x%x with wrong return " - "type.\n", proc); + cerr << "rpcc::call_m: failed to unmarshall the reply. You are probably " << + "calling RPC 0x" << hex << proc << " with the wrong return type." << endl; VERIFY(0); return rpc_const::unmarshal_reply_failure; }