]> granicus.if.org Git - procps-ng/commit
library: bug fix if libnuma.so unavailable, <STAT> api
authorJim Warner <james.warner@comcast.net>
Fri, 17 Jun 2016 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Tue, 21 Jun 2016 10:58:09 +0000 (20:58 +1000)
commitdea403341886d7cc8338fd14461835794625b6a1
tree1a1310557930ee1de44c10bdffb3fe516ba8d81f
parent5a244c1095d9af7bfd7cc48ef64d651d78f5aaa3
library: bug fix if libnuma.so unavailable, <STAT> api

All our numa logic was well encapsulated under #ifndef
NUMA_DISABLE (as ./configure --disable-numa), with the
exception of 1 case label. The reason it didn't create
any problems is because the sole consumer (top) itself
responded to the presence of #define NUMA_DISABLE too.

But if that option wasn't used, an oops still awaited.

When experimenting with a 32-bit library plus a 64-bit
kernel, a bug was revealed should the numa library not
have been found. Our 'reap' function must tolerate the
potential of a 0 return from that stacks_fetch_tics().

Now, if numa is desired but not possible, we'll be ok.

[ and, we'll build numa history from fresher sources ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/stat.c