lkml.org 
[lkml]   [2021]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] posix-cpu-timers: Recalc next expiration when timer_settime() ends up not queueing
On Wed, Jun 23, 2021 at 01:41:55AM +0200, Frederic Weisbecker wrote:
> include/linux/posix-timers.h | 7 +++++-
> kernel/time/posix-cpu-timers.c | 41 +++++++++++++++++++++++++++++-----
> 2 files changed, 41 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
> index 4cf1fbe8d1bc..00fef0064355 100644
> --- a/include/linux/posix-timers.h
> +++ b/include/linux/posix-timers.h
> @@ -82,9 +82,14 @@ static inline bool cpu_timer_enqueue(struct timerqueue_head *head,
> return timerqueue_add(head, &ctmr->node);
> }
>
> +static inline bool cpu_timer_queued(struct cpu_timer *ctmr)
> +{
> + return !!ctmr->head;

Sad that we can't check sighand lock here... but I agree that adding
that will be messy :/

> +}

\
 
 \ /
  Last update: 2021-06-28 17:59    [W:0.060 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site