diff options
| author | Peter Zijlstra <[email protected]> | 2021-06-11 08:28:17 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2021-06-18 09:43:09 +0000 |
| commit | 2f064a59a11ff9bc22e52e9678bc601404c7cb34 (patch) | |
| tree | acc246021cd9f158016247f00f238668963daed7 /lib/syscall.c | |
| parent | sched,arch: Remove unused TASK_STATE offsets (diff) | |
| download | kernel-2f064a59a11ff9bc22e52e9678bc601404c7cb34.tar.gz kernel-2f064a59a11ff9bc22e52e9678bc601404c7cb34.zip | |
sched: Change task_struct::state
Change the type and name of task_struct::state. Drop the volatile and
shrink it to an 'unsigned int'. Rename it in order to find all uses
such that we can use READ_ONCE/WRITE_ONCE as appropriate.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Daniel Bristot de Oliveira <[email protected]>
Acked-by: Will Deacon <[email protected]>
Acked-by: Daniel Thompson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/syscall.c')
| -rw-r--r-- | lib/syscall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/syscall.c b/lib/syscall.c index ba13e924c430..006e256d2264 100644 --- a/lib/syscall.c +++ b/lib/syscall.c @@ -68,13 +68,13 @@ static int collect_syscall(struct task_struct *target, struct syscall_info *info */ int task_current_syscall(struct task_struct *target, struct syscall_info *info) { - long state; unsigned long ncsw; + unsigned int state; if (target == current) return collect_syscall(target, info); - state = target->state; + state = READ_ONCE(target->__state); if (unlikely(!state)) return -EAGAIN; |
