X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/ba03b19875aa2e3586e49b10904563cdd3b91de0..d54215aea2a7321ab0f2dc7b0042fea2b7ff5df5:/lock_server.cc diff --git a/lock_server.cc b/lock_server.cc index 81cd805..522a917 100644 --- a/lock_server.cc +++ b/lock_server.cc @@ -1,6 +1,5 @@ // the caching lock server implementation -#include "types.h" #include "lock_server.h" #include #include @@ -93,7 +92,7 @@ void lock_server::retryer() [[noreturn]] { } } -int lock_server::acquire(int &, lock_protocol::lockid_t lid, string id, lock_protocol::xid_t xid) { +lock_protocol::status lock_server::acquire(int &, lock_protocol::lockid_t lid, const callback_t & id, lock_protocol::xid_t xid) { LOG("lid=" << lid << " client=" << id << "," << xid); holder_t h = holder_t(id, xid); lock_state &st = get_lock_state(lid); @@ -151,7 +150,7 @@ int lock_server::acquire(int &, lock_protocol::lockid_t lid, string id, lock_pro return lock_protocol::RETRY; } -int lock_server::release(int &, lock_protocol::lockid_t lid, callback_t id, lock_protocol::xid_t xid) { +lock_protocol::status lock_server::release(int &, lock_protocol::lockid_t lid, const callback_t & id, lock_protocol::xid_t xid) { LOG("lid=" << lid << " client=" << id << "," << xid); lock_state &st = get_lock_state(lid); lock sl(st.m); @@ -171,13 +170,13 @@ string lock_server::marshal_state() { return rep.content(); } -void lock_server::unmarshal_state(string state) { +void lock_server::unmarshal_state(const string & state) { lock sl(lock_table_lock); unmarshall rep(state, false); rep >> nacquire >> lock_table; } -lock_protocol::status lock_server::stat(int &r, lock_protocol::lockid_t lid) { +lock_protocol::status lock_server::stat(int &r, lock_protocol::lockid_t lid, const callback_t &) { LOG("stat request for " << lid); VERIFY(0); r = nacquire;