Simplifications and clean-ups
[invirt/third/libt4.git] / lock_client.h
index 728fbf7..31bf905 100644 (file)
@@ -55,7 +55,7 @@ class lock_client {
         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:
         static in_port_t last_port;
         lock_client(string xdst, lock_release_user *l = 0);
@@ -63,14 +63,16 @@ class 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);
 };
 
 #endif // C++
 
+#ifdef __cplusplus
 extern "C" {
+#endif
 
 struct _t4_lock_client;
 typedef struct _t4_lock_client t4_lock_client;
@@ -93,6 +95,8 @@ t4_status t4_lock_client_acquire(t4_lock_client *, t4_lockid_t);
 t4_status t4_lock_client_release(t4_lock_client *, t4_lockid_t);
 t4_status t4_lock_client_stat(t4_lock_client *, t4_lockid_t);
 
+#ifdef __cplusplus
 }
+#endif
 
 #endif