bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/5] fix timer bug


From: Samuel Thibault
Subject: Re: [PATCH 3/5] fix timer bug
Date: Sat, 27 Mar 2021 16:23:14 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks.

I reworded the log, "fix bug" is simply not telling anything for the
future maintainers.

Damien Zammit, le ven. 26 mars 2021 20:48:48 +1100, a ecrit:
> ---
>  kern/mach_clock.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/kern/mach_clock.c b/kern/mach_clock.c
> index e4d44f57..ed5cdfd3 100644
> --- a/kern/mach_clock.c
> +++ b/kern/mach_clock.c
> @@ -152,7 +152,9 @@ void clock_interrupt(
>           timer_bump(&thread->user_timer, usec);
>       }
>       else {
> -         timer_bump(&thread->system_timer, usec);
> +         /* Only bump timer if thread exists */
> +         if (thread)
> +             timer_bump(&thread->system_timer, usec);
>       }
>  #endif       /* STAT_TIME */
>  
> @@ -189,6 +191,7 @@ void clock_interrupt(
>       if (usermode)
>  #endif
>       {
> +         if (thread)
>               take_pc_sample_macro(thread, SAMPLED_PC_PERIODIC, usermode, pc);
>       }
>  #endif /* MACH_PCSAMPLE */
> -- 
> 2.30.1
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]