diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 05:27:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 05:27:25 +0000 |
commit | c9c06167e7933d93a6e396174c68abf242294abb (patch) | |
tree | d9a8bb30663e9a3405a1ef37ffb62bc14b9f019f /include/linux/sunrpc | |
parent | f79e8cc3c34e4192a3e5ef4cc9c6542fdef703c0 (diff) |
Merge with Linux 2.4.0-test12.
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/sched.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index f3e9ad2be..c6e6e40e0 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -43,7 +43,7 @@ struct rpc_task { struct rpc_task * tk_prev_task; /* global list of tasks */ struct rpc_clnt * tk_client; /* RPC client */ struct rpc_rqst * tk_rqstp; /* RPC request */ - volatile int tk_status; /* result of last operation */ + int tk_status; /* result of last operation */ struct rpc_wait_queue * tk_rpcwait; /* RPC wait queue we're on */ /* diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index dd27162ff..b204387c5 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -138,8 +138,7 @@ struct rpc_xprt { struct rpc_wait_queue reconn; /* waiting for reconnect */ struct rpc_rqst * free; /* free slots */ struct rpc_rqst slot[RPC_MAXREQS]; - volatile unsigned char connected : 1, /* TCP: connected */ - write_space: 1; /* TCP: can send */ + unsigned int sockstate; /* Socket state */ unsigned char shutdown : 1, /* being shut down */ nocong : 1, /* no congestion control */ stream : 1, /* TCP */ @@ -190,6 +189,18 @@ void __rpciod_tcp_dispatcher(void); extern struct list_head rpc_xprt_pending; +#define XPRT_WSPACE 0 +#define XPRT_CONNECT 1 + +#define xprt_wspace(xp) (test_bit(XPRT_WSPACE, &(xp)->sockstate)) +#define xprt_test_and_set_wspace(xp) (test_and_set_bit(XPRT_WSPACE, &(xp)->sockstate)) +#define xprt_clear_wspace(xp) (clear_bit(XPRT_WSPACE, &(xp)->sockstate)) + +#define xprt_connected(xp) (!(xp)->stream || test_bit(XPRT_CONNECT, &(xp)->sockstate)) +#define xprt_set_connected(xp) (set_bit(XPRT_CONNECT, &(xp)->sockstate)) +#define xprt_test_and_set_connected(xp) (test_and_set_bit(XPRT_CONNECT, &(xp)->sockstate)) +#define xprt_clear_connected(xp) (clear_bit(XPRT_CONNECT, &(xp)->sockstate)) + static inline int xprt_tcp_pending(void) { |