bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] Add last processor to process stat


From: Almudena Garcia
Subject: Re: [PATCH] Add last processor to process stat
Date: Sun, 27 Oct 2019 17:36:55 +0100

> And as I mentioned, cope with caller passing either the old or the new
> value of THREAD_SCHED_INFO_COUNT in *thread_info_count

> There, for backward compatibility with existing
> binaries, you have to handle both the case where the application
> passes the old count (built with the old GNU Mach header defining
> THREAD_SCHED_INFO_COUNT), and the case where the application passes the
> new count (built with the new header).

I don't understand very well. Where is this? In gnumach or Hurd? 

El dom., 27 oct. 2019 a las 17:20, Samuel Thibault (<samuel.thibault@gnu.org>) escribió:
Almudena Garcia, le dim. 27 oct. 2019 17:17:52 +0100, a ecrit:
> Oops, I forgot the patch where I fill this field. I attach It now

> --- gnumach/kern/thread.c     2019-09-03 01:22:10.932747830 +0200
> +++ GNUMach_SMP/kern/thread.c 2019-10-27 17:14:32.851265452 +0100
> @@ -1530,6 +1530,10 @@
>           read_time_stamp(&thread->creation_time,
>                           &basic_info->creation_time);

> +             #if NCPUS > 1
> +             basic_info->last_processor = thread->last_processor;
> +             #endif
> +

That makes more sense :)

You however need to also set it to 0 when NCPUS==1.
And as I mentioned, cope with caller passing either the old or the new
value of THREAD_SCHED_INFO_COUNT in *thread_info_count.

Samuel

reply via email to

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