mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
signal: Provide ignored_posix_timers list
To prepare for handling posix timer signals on sigaction(SIG_IGN) properly, add a list to task::signal. This list will be used to queue posix timers so their signal can be requeued when SIG_IGN is lifted later. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/all/20241105064213.920101900@linutronix.de
This commit is contained in:
parent
647da5f709
commit
69f032c92c
@ -138,6 +138,7 @@ struct signal_struct {
|
|||||||
/* POSIX.1b Interval Timers */
|
/* POSIX.1b Interval Timers */
|
||||||
unsigned int next_posix_timer_id;
|
unsigned int next_posix_timer_id;
|
||||||
struct hlist_head posix_timers;
|
struct hlist_head posix_timers;
|
||||||
|
struct hlist_head ignored_posix_timers;
|
||||||
|
|
||||||
/* ITIMER_REAL timer for the process */
|
/* ITIMER_REAL timer for the process */
|
||||||
struct hrtimer real_timer;
|
struct hrtimer real_timer;
|
||||||
|
@ -31,6 +31,7 @@ static struct signal_struct init_signals = {
|
|||||||
.exec_update_lock = __RWSEM_INITIALIZER(init_signals.exec_update_lock),
|
.exec_update_lock = __RWSEM_INITIALIZER(init_signals.exec_update_lock),
|
||||||
#ifdef CONFIG_POSIX_TIMERS
|
#ifdef CONFIG_POSIX_TIMERS
|
||||||
.posix_timers = HLIST_HEAD_INIT,
|
.posix_timers = HLIST_HEAD_INIT,
|
||||||
|
.ignored_posix_timers = HLIST_HEAD_INIT,
|
||||||
.cputimer = {
|
.cputimer = {
|
||||||
.cputime_atomic = INIT_CPUTIME_ATOMIC,
|
.cputime_atomic = INIT_CPUTIME_ATOMIC,
|
||||||
},
|
},
|
||||||
|
@ -1864,6 +1864,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
|
|||||||
|
|
||||||
#ifdef CONFIG_POSIX_TIMERS
|
#ifdef CONFIG_POSIX_TIMERS
|
||||||
INIT_HLIST_HEAD(&sig->posix_timers);
|
INIT_HLIST_HEAD(&sig->posix_timers);
|
||||||
|
INIT_HLIST_HEAD(&sig->ignored_posix_timers);
|
||||||
hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||||
sig->real_timer.function = it_real_fn;
|
sig->real_timer.function = it_real_fn;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user