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: Samuel Thibault
Subject: Re: [PATCH] Add last processor to process stat
Date: Sun, 27 Oct 2019 20:29:55 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Almudena Garcia, le dim. 27 oct. 2019 20:20:49 +0100, a ecrit:
> +  if(sizeof(thsi) >= THREAD_SCHED_INFO_COUNT){

No, that'll again only do a compile-time check: sizeof(thsi) will just
return the size of the structure, which is actually also what
THREAD_SCHED_INFO_COUNT is based on!
(and THREAD_SCHED_INFO_COUNT is in number of integers, not bytes).

What you really want is to check what gnumach *writes* when
its thread_info() is called. Do look for thread_info() calls, and fix
the field there depending on what gnumach wrote to the count.

Samuel



reply via email to

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