Oops, I forgot the patch where I fill this field. I attach It now

El dom., 27 oct. 2019 a las 16:44, Samuel Thibault (<samuel.thiba...@gnu.org>)
escribió:

> Almudena Garcia, le sam. 26 oct. 2019 23:38:56 +0200, a ecrit:
> > These patches isn't tested yet.
>
> They will surely not work, since you didn't put anything in that new
> field inside GNU Mach :)
>
> See the function that fills it in GNU Mach: thread_info()'s
> THREAD_SCHED_INFO case. 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).
>
> Samuel
>
>
--- 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
+
 	    /*
 	     *	To calculate cpu_usage, first correct for timer rate,
 	     *	then for 5/8 ageing.  The correction factor [3/5] is

Reply via email to