projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lots more clean-ups
[invirt/third/libt4.git]
/
lock_client.h
diff --git
a/lock_client.h
b/lock_client.h
index
3290d1a
..
5db2cbf
100644
(file)
--- a/
lock_client.h
+++ b/
lock_client.h
@@
-1,18
+1,14
@@
// lock client interface.
#ifndef lock_client_h
// lock client interface.
#ifndef lock_client_h
-
#define lock_client_h
#ifdef __cplusplus
#define lock_client_h
#ifdef __cplusplus
-#include <string>
+#include "types.h"
#include "lock_protocol.h"
#include "lock_protocol.h"
-#include "rpc/rpc.h"
-#include "lang/verify.h"
#include "rpc/fifo.h"
#include "rsm_client.h"
#include "rpc/fifo.h"
#include "rsm_client.h"
-#include "lock.h"
class lock_release_user {
public:
class lock_release_user {
public:
@@
-20,11
+16,6
@@
class lock_release_user {
virtual ~lock_release_user() {}
};
virtual ~lock_release_user() {}
};
-using std::string;
-using std::map;
-using std::thread;
-using std::list;
-
class lock_state {
public:
enum {
class lock_state {
public:
enum {
@@
-54,8
+45,8
@@
class lock_client {
rpcc *cl;
thread releaser_thread;
rsm_client *rsmc;
rpcc *cl;
thread releaser_thread;
rsm_client *rsmc;
- class lock_release_user *lu;
- unsigned int rlock_port;
+ lock_release_user *lu;
+ in_port_t rlock_port;
string hostname;
string id;
mutex xid_mutex;
string hostname;
string id;
mutex xid_mutex;
@@
-65,8
+56,8
@@
class lock_client {
lock_map lock_table;
lock_state &get_lock_state(lock_protocol::lockid_t lid);
public:
lock_map lock_table;
lock_state &get_lock_state(lock_protocol::lockid_t lid);
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);
~lock_client() {}
lock_protocol::status acquire(lock_protocol::lockid_t);
lock_protocol::status release(lock_protocol::lockid_t);