bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH gnumach] Update thread and task creation time to use time_val


From: Samuel Thibault
Subject: Re: [PATCH gnumach] Update thread and task creation time to use time_value64_t
Date: Sun, 12 Mar 2023 19:08:07 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le sam. 11 mars 2023 14:38:08 -0500, a ecrit:
> ---
>  kern/mach_clock.c | 13 +++++--------
>  kern/mach_clock.h |  4 ++--
>  kern/task.h       |  2 +-
>  kern/thread.h     |  2 +-
>  4 files changed, 9 insertions(+), 12 deletions(-)
> 
> diff --git a/kern/mach_clock.c b/kern/mach_clock.c
> index a3656948..e33404a2 100644
> --- a/kern/mach_clock.c
> +++ b/kern/mach_clock.c
> @@ -417,12 +417,10 @@ clock_boottime_update(const struct time_value64 
> *new_time)
>   * frame.
>   */
>  void
> -record_time_stamp(time_value_t *stamp)
> +record_time_stamp(time_value64_t *stamp)
>  {
> -     time_value64_t stamp64;
> -     read_mapped_time(&stamp64);
> -     time_value64_add(&stamp64, &clock_boottime_offset);
> -     TIME_VALUE64_TO_TIME_VALUE(&stamp64, stamp);
> +     read_mapped_time(stamp);
> +     time_value64_add(stamp, &clock_boottime_offset);
>  }
>  
>  /*
> @@ -430,10 +428,9 @@ record_time_stamp(time_value_t *stamp)
>   * real-time clock frame.
>   */
>  void
> -read_time_stamp (const time_value_t *stamp, rpc_time_value_t *result)
> +read_time_stamp (const time_value64_t *stamp, rpc_time_value_t *result)
>  {
> -     time_value64_t result64;
> -     TIME_VALUE_TO_TIME_VALUE64(stamp, &result64);
> +     time_value64_t result64 = *stamp;
>       time_value64_sub(&result64, &clock_boottime_offset);
>       TIME_VALUE64_TO_TIME_VALUE(&result64, result);
>  }
> diff --git a/kern/mach_clock.h b/kern/mach_clock.h
> index 9a670011..60b49b8a 100644
> --- a/kern/mach_clock.h
> +++ b/kern/mach_clock.h
> @@ -92,13 +92,13 @@ extern void init_timeout (void);
>   * Record a timestamp in STAMP.  Records values in the boot-time clock
>   * frame.
>   */
> -extern void record_time_stamp (time_value_t *stamp);
> +extern void record_time_stamp (time_value64_t *stamp);
>  
>  /*
>   * Read a timestamp in STAMP into RESULT.  Returns values in the
>   * real-time clock frame.
>   */
> -extern void read_time_stamp (const time_value_t *stamp, rpc_time_value_t 
> *result);
> +extern void read_time_stamp (const time_value64_t *stamp, rpc_time_value_t 
> *result);
>  
>  extern void mapable_time_init (void);
>  
> diff --git a/kern/task.h b/kern/task.h
> index 7e915e02..38aa9feb 100644
> --- a/kern/task.h
> +++ b/kern/task.h
> @@ -87,7 +87,7 @@ struct task {
>       time_value_t    total_system_time;
>                               /* total system time for dead threads */
>  
> -     time_value_t    creation_time; /* time stamp at creation */
> +     time_value64_t  creation_time; /* time stamp at creation */
>  
>       /* IPC structures */
>       decl_simple_lock_data(, itk_lock_data)
> diff --git a/kern/thread.h b/kern/thread.h
> index 689ef775..f8989f45 100644
> --- a/kern/thread.h
> +++ b/kern/thread.h
> @@ -204,7 +204,7 @@ struct thread {
>       unsigned int    sched_delta;    /* weighted cpu usage since update */
>  
>       /* Creation time stamp */
> -     time_value_t    creation_time;
> +     time_value64_t  creation_time;
>  
>       /* Time-outs */
>       timer_elt_data_t timer;         /* timer for thread */
> -- 
> 2.39.2
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

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