X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/6b5e09540e9392a7015fae1ad3b01b0973600ff2..eb3d5c6416c0f0d1cad35e52af3231de7866fea8:/lock_server.h diff --git a/lock_server.h b/lock_server.h index 6ba4902..1f30f87 100644 --- a/lock_server.h +++ b/lock_server.h @@ -11,36 +11,36 @@ typedef pair holder_t; class lock_state { public: lock_state(); - lock_state(const lock_state &other); + lock_state(const lock_state & other); bool held; holder_t held_by; list wanted_by; map old_requests; mutex m; - lock_state& operator=(const lock_state&); + lock_state & operator=(const lock_state &); MEMBERS(held, held_by, wanted_by) }; -MARSHALLABLE(lock_state) +MARSHALLABLE_STRUCT(lock_state) typedef map lock_map; -class lock_server : public rsm_state_transfer { +class lock_server : private rsm_state_transfer { private: int nacquire; mutex lock_table_lock; lock_map lock_table; - lock_state &get_lock_state(lock_protocol::lockid_t lid); + lock_state & get_lock_state(lock_protocol::lockid_t lid); fifo retry_fifo; fifo revoke_fifo; rsm *rsm_; - public: - lock_server(rsm *r = 0); - void revoker(); - void retryer(); string marshal_state(); void unmarshal_state(const string & state); + void revoker NORETURN (); + void retryer NORETURN (); + public: + lock_server(rsm & r); 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);