library: change 'PIDS_PROCESSOR' into a signed integer

This change is really being made on behalf of the ps &
top programs. Besides, over 2 billion CPUs are plenty!

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2021-12-14 00:00:00 -06:00 committed by Craig Small
parent bcb837b8c7
commit aeb35b18da
2 changed files with 3 additions and 3 deletions

View File

@ -227,7 +227,7 @@ REG_set(OOM_ADJ, s_int, oom_adj)
REG_set(OOM_SCORE, s_int, oom_score) REG_set(OOM_SCORE, s_int, oom_score)
REG_set(PRIORITY, s_int, priority) REG_set(PRIORITY, s_int, priority)
REG_set(PRIORITY_RT, s_int, rtprio) REG_set(PRIORITY_RT, s_int, rtprio)
REG_set(PROCESSOR, u_int, processor) REG_set(PROCESSOR, s_int, processor)
setDECL(PROCESSOR_NODE) { (void)I; R->result.s_int = numa_node_of_cpu(P->processor); } setDECL(PROCESSOR_NODE) { (void)I; R->result.s_int = numa_node_of_cpu(P->processor); }
REG_set(RSS, ul_int, rss) REG_set(RSS, ul_int, rss)
REG_set(RSS_RLIM, ul_int, rss_rlim) REG_set(RSS_RLIM, ul_int, rss_rlim)
@ -510,7 +510,7 @@ static struct {
{ RS(OOM_SCORE), f_oom, NULL, QS(s_int), 0, TS(s_int) }, { RS(OOM_SCORE), f_oom, NULL, QS(s_int), 0, TS(s_int) },
{ RS(PRIORITY), f_stat, NULL, QS(s_int), 0, TS(s_int) }, { RS(PRIORITY), f_stat, NULL, QS(s_int), 0, TS(s_int) },
{ RS(PRIORITY_RT), f_stat, NULL, QS(s_int), 0, TS(s_int) }, { RS(PRIORITY_RT), f_stat, NULL, QS(s_int), 0, TS(s_int) },
{ RS(PROCESSOR), f_stat, NULL, QS(u_int), 0, TS(u_int) }, { RS(PROCESSOR), f_stat, NULL, QS(s_int), 0, TS(s_int) },
{ RS(PROCESSOR_NODE), f_stat, NULL, QS(s_int), 0, TS(s_int) }, { RS(PROCESSOR_NODE), f_stat, NULL, QS(s_int), 0, TS(s_int) },
{ RS(RSS), f_stat, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(RSS), f_stat, NULL, QS(ul_int), 0, TS(ul_int) },
{ RS(RSS_RLIM), f_stat, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(RSS_RLIM), f_stat, NULL, QS(ul_int), 0, TS(ul_int) },

View File

@ -110,7 +110,7 @@ enum pids_item {
PIDS_OOM_SCORE, // s_int oom_score PIDS_OOM_SCORE, // s_int oom_score
PIDS_PRIORITY, // s_int stat: priority PIDS_PRIORITY, // s_int stat: priority
PIDS_PRIORITY_RT, // s_int stat: rt_priority PIDS_PRIORITY_RT, // s_int stat: rt_priority
PIDS_PROCESSOR, // u_int stat: task_cpu PIDS_PROCESSOR, // s_int stat: task_cpu
PIDS_PROCESSOR_NODE, // s_int derived from PROCESSOR, see numa(3) PIDS_PROCESSOR_NODE, // s_int derived from PROCESSOR, see numa(3)
PIDS_RSS, // ul_int stat: rss PIDS_RSS, // ul_int stat: rss
PIDS_RSS_RLIM, // ul_int stat: rsslim PIDS_RSS_RLIM, // ul_int stat: rsslim