library: lessen chance of distortion on TICS_ALL_DELTA

That old library defined this field as 'unsigned int'.
However, here it was known as a 'signed int'. Thus for
consistency we'll now also treat it as 'unsigned int'.

[ this commit was made in pursuit of a bug involving ]
[ the distortion of elapsed task tics. but, it turns ]
[ out these changes had nothing to do with that bug. ]
[ however, the patch is being retained as desirable. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2021-04-21 00:00:00 -05:00 committed by Craig Small
parent 17c30484bc
commit 9b601307ff
2 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ STR_set(SUPGIDS, supgid)
STR_set(SUPGROUPS, supgrp)
setDECL(TICS_ALL) { (void)I; R->result.ull_int = P->utime + P->stime; }
setDECL(TICS_ALL_C) { (void)I; R->result.ull_int = P->utime + P->stime + P->cutime + P->cstime; }
REG_set(TICS_ALL_DELTA, s_int, pcpu)
REG_set(TICS_ALL_DELTA, u_int, pcpu)
REG_set(TICS_BLKIO, ull_int, blkio_tics)
REG_set(TICS_GUEST, ull_int, gtime)
setDECL(TICS_GUEST_C) { (void)I; R->result.ull_int = P->gtime + P->cgtime; }
@ -487,7 +487,7 @@ static struct {
{ RS(SUPGROUPS), x_supgrp, FF(str), QS(str), 0, TS(str) },
{ RS(TICS_ALL), f_stat, NULL, QS(ull_int), 0, TS(ull_int) },
{ RS(TICS_ALL_C), f_stat, NULL, QS(ull_int), 0, TS(ull_int) },
{ RS(TICS_ALL_DELTA), f_stat, NULL, QS(s_int), +1, TS(s_int) },
{ RS(TICS_ALL_DELTA), f_stat, NULL, QS(u_int), +1, TS(u_int) },
{ RS(TICS_BLKIO), f_stat, NULL, QS(ull_int), 0, TS(ull_int) },
{ RS(TICS_GUEST), f_stat, NULL, QS(ull_int), 0, TS(ull_int) },
{ RS(TICS_GUEST_C), f_stat, NULL, QS(ull_int), 0, TS(ull_int) },

View File

@ -123,7 +123,7 @@ enum pids_item {
PIDS_SUPGROUPS, // str derived from SUPGIDS, see getgrgid(3)
PIDS_TICS_ALL, // ull_int stat: stime + utime
PIDS_TICS_ALL_C, // ull_int stat: stime + utime + cstime + cutime
PIDS_TICS_ALL_DELTA, // s_int derived from TICS_ALL
PIDS_TICS_ALL_DELTA, // u_int derived from TICS_ALL
PIDS_TICS_BLKIO, // ull_int stat: blkio_ticks
PIDS_TICS_GUEST, // ull_int stat: gtime
PIDS_TICS_GUEST_C, // ull_int stat: gtime + cgtime