diff options
| author | Andrei Vagin <avagin@gmail.com> | 2019-05-14 18:46:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-14 22:52:52 -0400 |
| commit | 9e9291c71eb92b457eb798501e210dec3d12e795 (patch) | |
| tree | a17d7588199297831e49bdcccf37c8345d89069d | |
| parent | 10bcba8c16aa1ebb3e1e6d16c0c8e493a0668a8c (diff) | |
include/linux/sched/signal.h: replace `tsk' with `task'
This file uses "task" 85 times and "tsk" 25 times. It is better to be
consistent.
Link: http://lkml.kernel.org/r/20181129180547.15976-1-avagin@gmail.com
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | include/linux/sched/signal.h | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index e412c092c1e8..38a0f0785323 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h | |||
| @@ -271,17 +271,18 @@ static inline int signal_group_exit(const struct signal_struct *sig) | |||
| 271 | extern void flush_signals(struct task_struct *); | 271 | extern void flush_signals(struct task_struct *); |
| 272 | extern void ignore_signals(struct task_struct *); | 272 | extern void ignore_signals(struct task_struct *); |
| 273 | extern void flush_signal_handlers(struct task_struct *, int force_default); | 273 | extern void flush_signal_handlers(struct task_struct *, int force_default); |
| 274 | extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, kernel_siginfo_t *info); | 274 | extern int dequeue_signal(struct task_struct *task, |
| 275 | sigset_t *mask, kernel_siginfo_t *info); | ||
| 275 | 276 | ||
| 276 | static inline int kernel_dequeue_signal(void) | 277 | static inline int kernel_dequeue_signal(void) |
| 277 | { | 278 | { |
| 278 | struct task_struct *tsk = current; | 279 | struct task_struct *task = current; |
| 279 | kernel_siginfo_t __info; | 280 | kernel_siginfo_t __info; |
| 280 | int ret; | 281 | int ret; |
| 281 | 282 | ||
| 282 | spin_lock_irq(&tsk->sighand->siglock); | 283 | spin_lock_irq(&task->sighand->siglock); |
| 283 | ret = dequeue_signal(tsk, &tsk->blocked, &__info); | 284 | ret = dequeue_signal(task, &task->blocked, &__info); |
| 284 | spin_unlock_irq(&tsk->sighand->siglock); | 285 | spin_unlock_irq(&task->sighand->siglock); |
| 285 | 286 | ||
| 286 | return ret; | 287 | return ret; |
| 287 | } | 288 | } |
| @@ -419,18 +420,18 @@ static inline void set_restore_sigmask(void) | |||
| 419 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | 420 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); |
| 420 | } | 421 | } |
| 421 | 422 | ||
| 422 | static inline void clear_tsk_restore_sigmask(struct task_struct *tsk) | 423 | static inline void clear_tsk_restore_sigmask(struct task_struct *task) |
| 423 | { | 424 | { |
| 424 | clear_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK); | 425 | clear_tsk_thread_flag(task, TIF_RESTORE_SIGMASK); |
| 425 | } | 426 | } |
| 426 | 427 | ||
| 427 | static inline void clear_restore_sigmask(void) | 428 | static inline void clear_restore_sigmask(void) |
| 428 | { | 429 | { |
| 429 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 430 | clear_thread_flag(TIF_RESTORE_SIGMASK); |
| 430 | } | 431 | } |
| 431 | static inline bool test_tsk_restore_sigmask(struct task_struct *tsk) | 432 | static inline bool test_tsk_restore_sigmask(struct task_struct *task) |
| 432 | { | 433 | { |
| 433 | return test_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK); | 434 | return test_tsk_thread_flag(task, TIF_RESTORE_SIGMASK); |
| 434 | } | 435 | } |
| 435 | static inline bool test_restore_sigmask(void) | 436 | static inline bool test_restore_sigmask(void) |
| 436 | { | 437 | { |
| @@ -449,9 +450,9 @@ static inline void set_restore_sigmask(void) | |||
| 449 | current->restore_sigmask = true; | 450 | current->restore_sigmask = true; |
| 450 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | 451 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); |
| 451 | } | 452 | } |
| 452 | static inline void clear_tsk_restore_sigmask(struct task_struct *tsk) | 453 | static inline void clear_tsk_restore_sigmask(struct task_struct *task) |
| 453 | { | 454 | { |
| 454 | tsk->restore_sigmask = false; | 455 | task->restore_sigmask = false; |
| 455 | } | 456 | } |
| 456 | static inline void clear_restore_sigmask(void) | 457 | static inline void clear_restore_sigmask(void) |
| 457 | { | 458 | { |
| @@ -461,9 +462,9 @@ static inline bool test_restore_sigmask(void) | |||
| 461 | { | 462 | { |
| 462 | return current->restore_sigmask; | 463 | return current->restore_sigmask; |
| 463 | } | 464 | } |
| 464 | static inline bool test_tsk_restore_sigmask(struct task_struct *tsk) | 465 | static inline bool test_tsk_restore_sigmask(struct task_struct *task) |
| 465 | { | 466 | { |
| 466 | return tsk->restore_sigmask; | 467 | return task->restore_sigmask; |
| 467 | } | 468 | } |
| 468 | static inline bool test_and_clear_restore_sigmask(void) | 469 | static inline bool test_and_clear_restore_sigmask(void) |
| 469 | { | 470 | { |
| @@ -617,9 +618,9 @@ static inline struct pid *task_session(struct task_struct *task) | |||
| 617 | return task->signal->pids[PIDTYPE_SID]; | 618 | return task->signal->pids[PIDTYPE_SID]; |
| 618 | } | 619 | } |
| 619 | 620 | ||
| 620 | static inline int get_nr_threads(struct task_struct *tsk) | 621 | static inline int get_nr_threads(struct task_struct *task) |
| 621 | { | 622 | { |
| 622 | return tsk->signal->nr_threads; | 623 | return task->signal->nr_threads; |
| 623 | } | 624 | } |
| 624 | 625 | ||
| 625 | static inline bool thread_group_leader(struct task_struct *p) | 626 | static inline bool thread_group_leader(struct task_struct *p) |
| @@ -658,35 +659,35 @@ static inline int thread_group_empty(struct task_struct *p) | |||
| 658 | #define delay_group_leader(p) \ | 659 | #define delay_group_leader(p) \ |
| 659 | (thread_group_leader(p) && !thread_group_empty(p)) | 660 | (thread_group_leader(p) && !thread_group_empty(p)) |
| 660 | 661 | ||
| 661 | extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, | 662 | extern struct sighand_struct *__lock_task_sighand(struct task_struct *task, |
| 662 | unsigned long *flags); | 663 | unsigned long *flags); |
| 663 | 664 | ||
| 664 | static inline struct sighand_struct *lock_task_sighand(struct task_struct *tsk, | 665 | static inline struct sighand_struct *lock_task_sighand(struct task_struct *task, |
| 665 | unsigned long *flags) | 666 | unsigned long *flags) |
| 666 | { | 667 | { |
| 667 | struct sighand_struct *ret; | 668 | struct sighand_struct *ret; |
| 668 | 669 | ||
| 669 | ret = __lock_task_sighand(tsk, flags); | 670 | ret = __lock_task_sighand(task, flags); |
| 670 | (void)__cond_lock(&tsk->sighand->siglock, ret); | 671 | (void)__cond_lock(&task->sighand->siglock, ret); |
| 671 | return ret; | 672 | return ret; |
| 672 | } | 673 | } |
| 673 | 674 | ||
| 674 | static inline void unlock_task_sighand(struct task_struct *tsk, | 675 | static inline void unlock_task_sighand(struct task_struct *task, |
| 675 | unsigned long *flags) | 676 | unsigned long *flags) |
| 676 | { | 677 | { |
| 677 | spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); | 678 | spin_unlock_irqrestore(&task->sighand->siglock, *flags); |
| 678 | } | 679 | } |
| 679 | 680 | ||
| 680 | static inline unsigned long task_rlimit(const struct task_struct *tsk, | 681 | static inline unsigned long task_rlimit(const struct task_struct *task, |
| 681 | unsigned int limit) | 682 | unsigned int limit) |
| 682 | { | 683 | { |
| 683 | return READ_ONCE(tsk->signal->rlim[limit].rlim_cur); | 684 | return READ_ONCE(task->signal->rlim[limit].rlim_cur); |
| 684 | } | 685 | } |
| 685 | 686 | ||
| 686 | static inline unsigned long task_rlimit_max(const struct task_struct *tsk, | 687 | static inline unsigned long task_rlimit_max(const struct task_struct *task, |
| 687 | unsigned int limit) | 688 | unsigned int limit) |
| 688 | { | 689 | { |
| 689 | return READ_ONCE(tsk->signal->rlim[limit].rlim_max); | 690 | return READ_ONCE(task->signal->rlim[limit].rlim_max); |
| 690 | } | 691 | } |
| 691 | 692 | ||
| 692 | static inline unsigned long rlimit(unsigned int limit) | 693 | static inline unsigned long rlimit(unsigned int limit) |
