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 19:09:17 +0100


> That comes directly from the count it passes.


--- gnumach/kern/thread.c 2019-09-03 01:22:10.932747830 +0200
+++ GNUMach_SMP/kern/thread.c 2019-10-27 19:00:17.577010318 +0100
@@ -1530,6 +1530,16 @@
     read_time_stamp(&thread->creation_time,
     &basic_info->creation_time);
 
+ #if THREAD_BASIC_INFO_COUNT > 10
+
+ #if NCPUS > 1
+ basic_info->last_processor = thread->last_processor;
+ #else
+ basic_info->last_processor = 0;
+ #endif
+
+ #endif
+

> That's inconvenient so ideally it should be fixed in procfs by checking that the *thread_info_count count includes the last_processor field, and if
> not set it to 0.

Attached new patch


El dom., 27 oct. 2019 a las 18:24, Samuel Thibault (<samuel.thibault@gnu.org>) escribió:
Almudena Garcia, le dim. 27 oct. 2019 18:18:46 +0100, a ecrit:
> > Think about an old program built with the old header, running with
> > the new GNU Mach.
>
> Ok, then I have to detect if the program is using the old header or the new
> header.

That comes directly from the count it passes.

> > That's inconvenient so ideally it should be fixed in procfs by checking that
> the *thread_info_count count includes the last_processor field, and if
> > not set it to 0.
>
> This must be patched in Hurd, improving my previous patch.

Yes, that's the other side of backward compatiblity.

Samuel

Attachment: fill_lastprocessor_mach_v2.patch
Description: Text Data

Attachment: add_lastprocessor_v2.patch
Description: Text Data


reply via email to

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