htop/openbsd
Antoine Motet 9197adf57e Fix CPU usage on OpenBSD
The current OpenBSD-specific CPU usage code is broken. The `cpu`
parameter of `Platform_setCPUValues` is an integer in the interval
[0, cpuCount], not [0, cpuCount-1]: Actual CPUs are numbered from
1, the “zero” CPU is a “virtual” one which represents the average
of actual CPUs (I guess it’s inherited from Linux’s `/proc/stats`).
This off-by-one error leads to random crashes.

Moreover, the displayed CPU usage is more detailed with system,
user and nice times.

I made the OpenBSD CPU code more similar to the Linux CPU code,
removing a few old bits from OpenBSD’s top(1). I think it will be
easier to understand, maintain and evolve.

I’d love some feedback from experienced OpenBSD people.
2018-12-16 11:30:06 +01:00
..
Battery.c Fix CPU usage on OpenBSD 2018-12-16 11:30:06 +01:00
Battery.h Fix CPU usage on OpenBSD 2018-12-16 11:30:06 +01:00
OpenBSDCRT.c Fix spelling of "maintainer" 2016-01-02 12:11:26 -05:00
OpenBSDCRT.h Regenerate platform-dependent headers. 2015-10-19 17:22:54 -02:00
OpenBSDProcess.c Interpret TTY_NR column on Linux, 2016-10-01 03:09:04 -03:00
OpenBSDProcess.h (Very) initial working OpenBSD port 2015-09-18 00:46:48 -04:00
OpenBSDProcessList.c Fix CPU usage on OpenBSD 2018-12-16 11:30:06 +01:00
OpenBSDProcessList.h Fix CPU usage on OpenBSD 2018-12-16 11:30:06 +01:00
Platform.c Fix CPU usage on OpenBSD 2018-12-16 11:30:06 +01:00
Platform.h Fix CPU usage on OpenBSD 2018-12-16 11:30:06 +01:00