Cosmetic improvements.
[invirt/third/libt4.git] / lock_client.h
index 36ee3a2..654cf4f 100644 (file)
@@ -42,11 +42,12 @@ typedef map<lock_protocol::lockid_t, lock_state> lock_map;
 // lock_revoke_server.
 class lock_client {
     private:
 // lock_revoke_server.
 class lock_client {
     private:
-        rpcc *cl;
+        unique_ptr<rpcc> cl;
+        unique_ptr<rpcs> rlsrpc;
         thread releaser_thread;
         thread releaser_thread;
-        rsm_client *rsmc;
-        class lock_release_user *lu;
-        unsigned int rlock_port;
+        unique_ptr<rsm_client> rsmc;
+        lock_release_user *lu;
+        in_port_t rlock_port;
         string hostname;
         string id;
         mutex xid_mutex;
         string hostname;
         string id;
         mutex xid_mutex;
@@ -54,15 +55,15 @@ class lock_client {
         fifo<lock_protocol::lockid_t> release_fifo;
         mutex lock_table_lock;
         lock_map lock_table;
         fifo<lock_protocol::lockid_t> release_fifo;
         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);
     public:
     public:
-        static unsigned int last_port;
-        lock_client(string xdst, class lock_release_user *l = 0);
+        static in_port_t last_port;
+        lock_client(string xdst, lock_release_user *l = 0);
         ~lock_client() {}
         lock_protocol::status acquire(lock_protocol::lockid_t);
         lock_protocol::status release(lock_protocol::lockid_t);
         int stat(lock_protocol::lockid_t);
         ~lock_client() {}
         lock_protocol::status acquire(lock_protocol::lockid_t);
         lock_protocol::status release(lock_protocol::lockid_t);
         int stat(lock_protocol::lockid_t);
-        void releaser();
+        void releaser NORETURN ();
         rlock_protocol::status revoke_handler(int &, lock_protocol::lockid_t, lock_protocol::xid_t);
         rlock_protocol::status retry_handler(int &, lock_protocol::lockid_t, lock_protocol::xid_t);
 };
         rlock_protocol::status revoke_handler(int &, lock_protocol::lockid_t, lock_protocol::xid_t);
         rlock_protocol::status retry_handler(int &, lock_protocol::lockid_t, lock_protocol::xid_t);
 };