mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-25 15:25:45 +00:00
9197adf57e
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.
16 lines
356 B
C
16 lines
356 B
C
/* Do not edit this file. It was automatically generated. */
|
|
|
|
#ifndef HEADER_Battery
|
|
#define HEADER_Battery
|
|
/*
|
|
htop - openbsd/Battery.h
|
|
(C) 2015 Hisham H. Muhammad
|
|
(C) 2015 Michael McConville
|
|
Released under the GNU GPL, see the COPYING file
|
|
in the source distribution for its full text.
|
|
*/
|
|
|
|
void Battery_getData(double* level, ACPresence* isOnAC);
|
|
|
|
#endif
|