Skip to content

Commit 7a70b90

Browse files
committed
SUNRPC: convert RPC_TASK_* constants to enum
JIRA: https://issues.redhat.com/browse/RHEL-108616 commit 0b108e8 Author: Stephen Brennan <[email protected]> Date: Mon Aug 19 08:58:59 2024 -0700 SUNRPC: convert RPC_TASK_* constants to enum The RPC_TASK_* constants are defined as macros, which means that most kernel builds will not contain their definitions in the debuginfo. However, it's quite useful for debuggers to be able to view the task state constant and interpret it correctly. Conversion to an enum will ensure the constants are present in debuginfo and can be interpreted by debuggers without needing to hard-code them and track their changes. Signed-off-by: Stephen Brennan <[email protected]> Signed-off-by: Anna Schumaker <[email protected]> Signed-off-by: Benjamin Coddington <[email protected]>
1 parent 6e19817 commit 7a70b90

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

include/linux/sunrpc/sched.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,15 @@ struct rpc_task_setup {
151151
#define RPC_WAS_SENT(t) ((t)->tk_flags & RPC_TASK_SENT)
152152
#define RPC_IS_MOVEABLE(t) ((t)->tk_flags & RPC_TASK_MOVEABLE)
153153

154-
#define RPC_TASK_RUNNING 0
155-
#define RPC_TASK_QUEUED 1
156-
#define RPC_TASK_ACTIVE 2
157-
#define RPC_TASK_NEED_XMIT 3
158-
#define RPC_TASK_NEED_RECV 4
159-
#define RPC_TASK_MSG_PIN_WAIT 5
160-
#define RPC_TASK_SIGNALLED 6
154+
enum {
155+
RPC_TASK_RUNNING,
156+
RPC_TASK_QUEUED,
157+
RPC_TASK_ACTIVE,
158+
RPC_TASK_NEED_XMIT,
159+
RPC_TASK_NEED_RECV,
160+
RPC_TASK_MSG_PIN_WAIT,
161+
RPC_TASK_SIGNALLED,
162+
};
161163

162164
#define rpc_test_and_set_running(t) \
163165
test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)

0 commit comments

Comments
 (0)