X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/ba03b19875aa2e3586e49b10904563cdd3b91de0..4e881433f37417ccbda89c09ffdf936855d462d4:/lock_server.h?ds=sidebyside diff --git a/lock_server.h b/lock_server.h index 560167f..d3ec580 100644 --- a/lock_server.h +++ b/lock_server.h @@ -6,7 +6,6 @@ #include "rsm.h" #include "rpc/fifo.h" -typedef string callback_t; typedef pair holder_t; class lock_state { @@ -23,7 +22,7 @@ public: MEMBERS(held, held_by, wanted_by) }; -MARSHALLABLE(lock_state) +MARSHALLABLE_STRUCT(lock_state) typedef map lock_map; @@ -38,13 +37,13 @@ class lock_server : public rsm_state_transfer { rsm *rsm_; public: lock_server(rsm *r = 0); - lock_protocol::status stat(int &, lock_protocol::lockid_t); - void revoker(); - void retryer(); + void revoker NORETURN (); + void retryer NORETURN (); string marshal_state(); - void unmarshal_state(string state); - int acquire(int &, lock_protocol::lockid_t, string id, lock_protocol::xid_t); - int release(int &, lock_protocol::lockid_t, string id, lock_protocol::xid_t); + void unmarshal_state(const string & state); + lock_protocol::status acquire(int &, lock_protocol::lockid_t, const callback_t & id, lock_protocol::xid_t); + lock_protocol::status release(int &, lock_protocol::lockid_t, const callback_t & id, lock_protocol::xid_t); + lock_protocol::status stat(int &, lock_protocol::lockid_t, const callback_t & id); }; #endif