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
271271 extern void flush_signals(struct task_struct *);
272272 extern void ignore_signals(struct task_struct *);
273273 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);
275276
276277 static inline int kernel_dequeue_signal(void)
277278 {
278− struct task_struct *tsk = current;
279+ struct task_struct *task = current;
279280 kernel_siginfo_t __info;
280281 int ret;
281282
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);
285286
286287 return ret;
287288 }
@@ -419,18 +420,18 @@ static inline void set_restore_sigmask(void) · 131 unmodified lines
419420 WARN_ON(!test_thread_flag(TIF_SIGPENDING));
420421 }
421422
422−static inline void clear_tsk_restore_sigmask(struct task_struct *tsk)
423+static inline void clear_tsk_restore_sigmask(struct task_struct *task)
423424 {
424− clear_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK);
425+ clear_tsk_thread_flag(task, TIF_RESTORE_SIGMASK);
425426 }
426427
427428 static inline void clear_restore_sigmask(void)
428429 {
429430 clear_thread_flag(TIF_RESTORE_SIGMASK);
430431 }
431−static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)
432+static inline bool test_tsk_restore_sigmask(struct task_struct *task)
432433 {
433− return test_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK);
434+ return test_tsk_thread_flag(task, TIF_RESTORE_SIGMASK);
434435 }
435436 static inline bool test_restore_sigmask(void)
436437 {
@@ -449,9 +450,9 @@ static inline void set_restore_sigmask(void) · 12 unmodified lines
449450 current->restore_sigmask = true;
450451 WARN_ON(!test_thread_flag(TIF_SIGPENDING));
451452 }
452−static inline void clear_tsk_restore_sigmask(struct task_struct *tsk)
453+static inline void clear_tsk_restore_sigmask(struct task_struct *task)
453454 {
454− tsk->restore_sigmask = false;
455+ task->restore_sigmask = false;
455456 }
456457 static inline void clear_restore_sigmask(void)
457458 {
@@ -461,9 +462,9 @@ static inline bool test_restore_sigmask(void) · 3 unmodified lines
461462 {
462463 return current->restore_sigmask;
463464 }
464−static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)
465+static inline bool test_tsk_restore_sigmask(struct task_struct *task)
465466 {
466− return tsk->restore_sigmask;
467+ return task->restore_sigmask;
467468 }
468469 static inline bool test_and_clear_restore_sigmask(void)
469470 {
@@ -617,9 +618,9 @@ static inline struct pid *task_session(struct task_struct *task) · 147 unmodified lines
617618 return task->signal->pids[PIDTYPE_SID];
618619 }
619620
620−static inline int get_nr_threads(struct task_struct *tsk)
621+static inline int get_nr_threads(struct task_struct *task)
621622 {
622− return tsk->signal->nr_threads;
623+ return task->signal->nr_threads;
623624 }
624625
625626 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
658659 #define delay_group_leader(p) \
659660 (thread_group_leader(p) && !thread_group_empty(p))
660661
661−extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
662+extern struct sighand_struct *__lock_task_sighand(struct task_struct *task,
662663 unsigned long *flags);
663664
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,
665666 unsigned long *flags)
666667 {
667668 struct sighand_struct *ret;
668669
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);
671672 return ret;
672673 }
673674
674−static inline void unlock_task_sighand(struct task_struct *tsk,
675+static inline void unlock_task_sighand(struct task_struct *task,
675676 unsigned long *flags)
676677 {
677− spin_unlock_irqrestore(&tsk->sighand->siglock, *flags);
678+ spin_unlock_irqrestore(&task->sighand->siglock, *flags);
678679 }
679680
680−static inline unsigned long task_rlimit(const struct task_struct *tsk,
681+static inline unsigned long task_rlimit(const struct task_struct *task,
681682 unsigned int limit)
682683 {
683− return READ_ONCE(tsk->signal->rlim[limit].rlim_cur);
684+ return READ_ONCE(task->signal->rlim[limit].rlim_cur);
684685 }
685686
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,
687688 unsigned int limit)
688689 {
689− return READ_ONCE(tsk->signal->rlim[limit].rlim_max);
690+ return READ_ONCE(task->signal->rlim[limit].rlim_max);
690691 }
691692
692693 static 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