X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/f2170465073de34adf89161d4287182b518352c4..2546a41ad36fdc9ef6471cb35a1d56930ae1b527:/rsm.h diff --git a/rsm.h b/rsm.h index 87734e1..73fa606 100644 --- a/rsm.h +++ b/rsm.h @@ -45,8 +45,8 @@ class rsm : public config_view_change { rsm_protocol::status transferdonereq(int &, std::string m, unsigned vid); rsm_protocol::status joinreq(rsm_protocol::joinres &r, std::string src, viewstamp last); - rsm_test_protocol::status test_net_repairreq(int &r, int heal); - rsm_test_protocol::status breakpointreq(int &r, int b); + rsm_test_protocol::status test_net_repairreq(rsm_test_protocol::status &r, int heal); + rsm_test_protocol::status breakpointreq(rsm_test_protocol::status &r, int b); std::mutex rsm_mutex; std::mutex invoke_mutex; @@ -56,18 +56,18 @@ class rsm : public config_view_change { void execute(int procno, std::string req, std::string &r); rsm_client_protocol::status client_invoke(std::string &r, int procno, std::string req); - bool statetransfer(std::string m); - bool statetransferdone(std::string m); - bool join(std::string m); + bool statetransfer(std::string m, lock & rsm_mutex_lock); + bool statetransferdone(std::string m, lock & rsm_mutex_lock); + bool join(std::string m, lock & rsm_mutex_lock); void set_primary(unsigned vid); std::string find_highest(viewstamp &vs, std::string &m, unsigned &vid); - bool sync_with_backups(); - bool sync_with_primary(); - void net_repair_wo(bool heal); + bool sync_with_backups(lock & rsm_mutex_lock); + bool sync_with_primary(lock & rsm_mutex_lock); + void net_repair(bool heal, lock & rsm_mutex_lock); void breakpoint1(); void breakpoint2(); - void partition1(); - void commit_change_wo(unsigned vid); + void partition1(lock & rsm_mutex_lock); + void commit_change(unsigned vid, lock & rsm_mutex_lock); public: rsm (std::string _first, std::string _me); ~rsm() {}