This file uses "task" 85 times and "tsk" 25 times. It is better to be consistent.
Unified · Split
| @@ -271,17 +271,18 @@ static inline int signal_group_exit(const struct signal_struct *sig) · 270 unmodified lines | ||
| 271 | 271 | extern void flush_signals(struct task_struct *); |
| 272 | 272 | extern void ignore_signals(struct task_struct *); |
| 273 | 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 | 277 | static inline int kernel_dequeue_signal(void) |
| 277 | 278 | { |
| 278 | − struct task_struct *tsk = current; | |
| 279 | + struct task_struct *task = current; | |
| 279 | 280 | kernel_siginfo_t __info; |
| 280 | 281 | int ret; |
| 281 | 282 | |
| 282 | − spin_lock_irq(&tsk->sighand->siglock); | |
| 283 | − ret = dequeue_signal(tsk, &tsk->blocked, &__info); | |
| 284 | − spin_unlock_irq(&tsk->sighand->siglock); | |
| 283 | + spin_lock_irq(&task->sighand->siglock); | |
| 284 | + ret = dequeue_signal(task, &task->blocked, &__info); | |
| 285 | + spin_unlock_irq(&task->sighand->siglock); | |
| 285 | 286 | |
| 286 | 287 | return ret; |
| 287 | 288 | } |
| @@ -419,18 +420,18 @@ static inline void set_restore_sigmask(void) · 131 unmodified lines | ||
| 419 | 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 | 428 | static inline void clear_restore_sigmask(void) |
| 428 | 429 | { |
| 429 | 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 | 436 | static inline bool test_restore_sigmask(void) |
| 436 | 437 | { |
| @@ -449,9 +450,9 @@ static inline void set_restore_sigmask(void) · 12 unmodified lines | ||
| 449 | 450 | current->restore_sigmask = true; |
| 450 | 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 | 457 | static inline void clear_restore_sigmask(void) |
| 457 | 458 | { |
| @@ -461,9 +462,9 @@ static inline bool test_restore_sigmask(void) · 3 unmodified lines | ||
| 461 | 462 | { |
| 462 | 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 | 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) · 147 unmodified lines | ||
| 617 | 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 | 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) · 32 unmodified lines | ||
| 658 | 659 | #define delay_group_leader(p) \ |
| 659 | 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 | 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 | 666 | unsigned long *flags) |
| 666 | 667 | { |
| 667 | 668 | struct sighand_struct *ret; |
| 668 | 669 | |
| 669 | − ret = __lock_task_sighand(tsk, flags); | |
| 670 | − (void)__cond_lock(&tsk->sighand->siglock, ret); | |
| 670 | + ret = __lock_task_sighand(task, flags); | |
| 671 | + (void)__cond_lock(&task->sighand->siglock, ret); | |
| 671 | 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 | 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 | 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 | 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 | 693 | static inline unsigned long rlimit(unsigned int limit) |