X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/a4175b2e216a20b86cc872dea8a08005c60617a5..2546a41ad36fdc9ef6471cb35a1d56930ae1b527:/lock_protocol.h?ds=inline diff --git a/lock_protocol.h b/lock_protocol.h index 61f0998..900897a 100644 --- a/lock_protocol.h +++ b/lock_protocol.h @@ -6,13 +6,14 @@ #include "rpc/rpc.h" #include +using std::string; + class lock_protocol { public: - enum xxstatus { OK, RETRY, RPCERR, NOENT, IOERR }; - typedef int status; - typedef std::string lockid_t; - typedef unsigned long long xid_t; - enum rpc_numbers { + enum status : status_t { OK, RETRY, RPCERR, NOENT, IOERR }; + using lockid_t = string; + using xid_t = uint64_t; + enum rpc_numbers : proc_t { acquire = 0x7001, release, stat @@ -21,9 +22,8 @@ class lock_protocol { class rlock_protocol { public: - enum xxstatus { OK, RPCERR }; - typedef int status; - enum rpc_numbers { + enum status : status_t { OK, RPCERR }; + enum rpc_numbers : proc_t { revoke = 0x8001, retry = 0x8002 };