Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 48b5583

Browse files
ChinYikMingIngo Molnar
authored andcommitted
sched/headers: Rename task_struct::state to task_struct::__state in the comments too
The rename in 2f064a5 ("sched: Change task_struct::state") missed the comments. [ mingo: Improved the changelog. ] Signed-off-by: Chin Yik Ming <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Daniel Bristot de Oliveira <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7ee7642 commit 48b5583

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/linux/sched.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ struct user_event_mm;
7575
* Task state bitmask. NOTE! These bits are also
7676
* encoded in fs/proc/array.c: get_task_state().
7777
*
78-
* We have two separate sets of flags: task->state
78+
* We have two separate sets of flags: task->__state
7979
* is about runnability, while task->exit_state are
8080
* about the task exiting. Confusing, but this way
8181
* modifying one set can't modify the other one by
8282
* mistake.
8383
*/
8484

85-
/* Used in tsk->state: */
85+
/* Used in tsk->__state: */
8686
#define TASK_RUNNING 0x00000000
8787
#define TASK_INTERRUPTIBLE 0x00000001
8888
#define TASK_UNINTERRUPTIBLE 0x00000002
@@ -92,7 +92,7 @@ struct user_event_mm;
9292
#define EXIT_DEAD 0x00000010
9393
#define EXIT_ZOMBIE 0x00000020
9494
#define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD)
95-
/* Used in tsk->state again: */
95+
/* Used in tsk->__state again: */
9696
#define TASK_PARKED 0x00000040
9797
#define TASK_DEAD 0x00000080
9898
#define TASK_WAKEKILL 0x00000100
@@ -173,7 +173,7 @@ struct user_event_mm;
173173
#endif
174174

175175
/*
176-
* set_current_state() includes a barrier so that the write of current->state
176+
* set_current_state() includes a barrier so that the write of current->__state
177177
* is correctly serialised wrt the caller's subsequent test of whether to
178178
* actually sleep:
179179
*
@@ -196,9 +196,9 @@ struct user_event_mm;
196196
* wake_up_state(p, TASK_UNINTERRUPTIBLE);
197197
*
198198
* where wake_up_state()/try_to_wake_up() executes a full memory barrier before
199-
* accessing p->state.
199+
* accessing p->__state.
200200
*
201-
* Wakeup will do: if (@state & p->state) p->state = TASK_RUNNING, that is,
201+
* Wakeup will do: if (@state & p->__state) p->__state = TASK_RUNNING, that is,
202202
* once it observes the TASK_UNINTERRUPTIBLE store the waking CPU can issue a
203203
* TASK_RUNNING store which can collide with __set_current_state(TASK_RUNNING).
204204
*

0 commit comments

Comments
 (0)