History

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.

Andrei Vagin committed 7 years ago

Commit 9e9291c1 parent 10bcba81 file · +26 −25Browse files

Unified · Split

include/linux/sched/signal.h+26−25
@@ -271,17 +271,18 @@ static inline int signal_group_exit(const struct signal_struct *sig) · 270 unmodified lines
271extern void flush_signals(struct task_struct *);271extern void flush_signals(struct task_struct *);
272extern void ignore_signals(struct task_struct *);272extern void ignore_signals(struct task_struct *);
273extern void flush_signal_handlers(struct task_struct *, int force_default);273extern void flush_signal_handlers(struct task_struct *, int force_default);
274extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, kernel_siginfo_t *info);274extern int dequeue_signal(struct task_struct *task,
275 sigset_t *mask, kernel_siginfo_t *info);
275 276
276static inline int kernel_dequeue_signal(void)277static 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) · 131 unmodified lines
419 WARN_ON(!test_thread_flag(TIF_SIGPENDING));420 WARN_ON(!test_thread_flag(TIF_SIGPENDING));
420}421}
421 422
422static inline void clear_tsk_restore_sigmask(struct task_struct *tsk)423static 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
427static inline void clear_restore_sigmask(void)428static inline void clear_restore_sigmask(void)
428{429{
429 clear_thread_flag(TIF_RESTORE_SIGMASK);430 clear_thread_flag(TIF_RESTORE_SIGMASK);
430}431}
431static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)432static 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}
435static inline bool test_restore_sigmask(void)436static inline bool test_restore_sigmask(void)
436{437{
@@ -449,9 +450,9 @@ static inline void set_restore_sigmask(void) · 12 unmodified lines
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}
452static inline void clear_tsk_restore_sigmask(struct task_struct *tsk)453static inline void clear_tsk_restore_sigmask(struct task_struct *task)
453{454{
454 tsk->restore_sigmask = false;455 task->restore_sigmask = false;
455}456}
456static inline void clear_restore_sigmask(void)457static 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 return current->restore_sigmask;463 return current->restore_sigmask;
463}464}
464static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)465static inline bool test_tsk_restore_sigmask(struct task_struct *task)
465{466{
466 return tsk->restore_sigmask;467 return task->restore_sigmask;
467}468}
468static inline bool test_and_clear_restore_sigmask(void)469static 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 return task->signal->pids[PIDTYPE_SID];618 return task->signal->pids[PIDTYPE_SID];
618}619}
619 620
620static inline int get_nr_threads(struct task_struct *tsk)621static 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
625static inline bool thread_group_leader(struct task_struct *p)626static 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#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
661extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,662extern struct sighand_struct *__lock_task_sighand(struct task_struct *task,
662 unsigned long *flags);663 unsigned long *flags);
663 664
664static inline struct sighand_struct *lock_task_sighand(struct task_struct *tsk,665static 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
674static inline void unlock_task_sighand(struct task_struct *tsk,675static 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
680static inline unsigned long task_rlimit(const struct task_struct *tsk,681static 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
686static inline unsigned long task_rlimit_max(const struct task_struct *tsk,687static 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
692static inline unsigned long rlimit(unsigned int limit)693static inline unsigned long rlimit(unsigned int limit)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t