Lines Matching +full:rpc +full:- +full:if
1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Scheduling primitives for kernel Sun RPC.
22 * This is the actual RPC procedure call info.
41 * This is the RPC task struct
58 struct rpc_wait_queue *tk_waitqueue; /* RPC wait queue we're on */
61 struct rpc_wait tk_wait; /* RPC wait */
64 int tk_rpc_status; /* Result of last RPC operation */
67 * RPC call state
69 struct rpc_message tk_msg; /* RPC call info */
73 struct rpc_clnt * tk_client; /* RPC client */
77 struct rpc_rqst * tk_rqstp; /* RPC request */
82 ktime_t tk_start; /* RPC task init timestamp */
88 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
120 * RPC task flags
130 #define RPC_TASK_SOFTCONN 0x0400 /* Fail if can't connect */
133 #define RPC_TASK_NOCONNECT 0x2000 /* return ENOTCONN if not connected */
137 #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
138 #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
139 #define RPC_IS_SOFT(t) ((t)->tk_flags & (RPC_TASK_SOFT|RPC_TASK_TIMEOUT))
140 #define RPC_IS_SOFTCONN(t) ((t)->tk_flags & RPC_TASK_SOFTCONN)
141 #define RPC_WAS_SENT(t) ((t)->tk_flags & RPC_TASK_SENT)
151 #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)
152 #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)
154 test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)
158 clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \
162 #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)
163 #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)
167 clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \
171 #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)
173 #define RPC_SIGNALLED(t) test_bit(RPC_TASK_SIGNALLED, &(t)->tk_runstate)
177 * Note: if you change these, you must also change
180 #define RPC_PRIORITY_LOW (-1)
184 #define RPC_NR_PRIORITY (1 + RPC_PRIORITY_PRIVILEGED - RPC_PRIORITY_LOW)
193 * RPC synchronization objects
198 unsigned char maxpriority; /* maximum priority (0 if queue is not a priority queue) */
203 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
213 #define RPC_IS_PRIORITY(q) ((q)->maxpriority > 0)
267 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
282 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
285 return ((q && q->name) ? q->name : "unknown"); in rpc_qname()
291 q->name = name; in rpc_assign_waitqueue_name()
300 #if IS_ENABLED(CONFIG_SUNRPC_SWAP)
307 return -EINVAL; in rpc_clnt_swap_activate()