summaryrefslogtreecommitdiffstats
path: root/freebsd/Platform.h
AgeCommit message (Collapse)Author
2020-11-25Unify naming of first argument of Platform_getBatteryChristian Göttsche
Use percent throughout
2020-11-23Merge branch 'cleanup-init-done' into masterNathan Scott
2020-11-23Consistent ordering of function declarations for FreeBSDNathan Scott
2020-11-19IWYU update (FreeBSD)Christian Goettsche
2020-11-19Minor cleanups to platform-specific init and doneNathan Scott
Move platform-specific code out of the htop.c main function and into the platform sub-directories - primarily this is the Linux procfs path check and sensors setup/teardown; not needed on any other platforms. No functional changes here.
2020-11-18Merge individual Battery.[ch] files into Platform.[ch]Nathan Scott
Consistent with everything else involving platform-specific calls from core htop code.
2020-11-15Resolve merge conflicts, merge #298 "Macro cleanup" from @BenBEDaniel Lange
2020-11-14Split platform dependent parts for file locks screenBenny Baumann
2020-11-02Spacing around operatorsBenny Baumann
2020-10-29FreeBSD: implement Platform_getDiskIO()Christian Goettsche
2020-10-26Improve handling of no data in Disk and Network IO MetersChristian Göttsche
2020-10-22Drop unused Platform functions Platform_setTasksValuesChristian Göttsche
2020-10-16Add NetworkIOMeterChristian Göttsche
2020-10-07Mark Object instances constChristian Göttsche
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-10-03Add DiskIOMeter for IO read/write usageChristian Göttsche
2020-09-18Use strict function prototypesChristian Göttsche
int foo(); declares a function taking any number of arguments.
2020-09-09Consolidate repeated macro definitions into one headerNathan Scott
The MIN, MAX, CLAMP, MINIMUM, and MAXIMUM macros appear throughout the codebase with many re-definitions. Make a single copy of each in a common header file, and use the BSD variants of MINIMUM/MAXIMUM due to conflicts in the system <sys/param.h> headers.
2020-09-08Further, minor cleanups to headers post-MakeHeadersNathan Scott
Remove leftover empty ifdef/endif pairs, whitespace. The generated htop.h file was also unused - removed.
2020-09-03Axe automated header generation.Zev Weiss
Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
2019-09-03Support for ZFS Compressed ARC statisticsRoss Williams
2019-07-07Support ZFS ARC stats on FreeBSDRoss Williams
New meter displays same ARC stats as FreeBSD top(1). Can be extended to other platforms that support ZFS. Pulling kstat.zfs.misc.arcstats.c_max as the meter total, so the meter has a meaningful value to work up to. The Text meter displays, first, the maximum ARC size (Meter.total), then second, the total ARC used, using the difference between Meter.maxItems and Meter.curItems to "hide" the used value from the Bar and Graph drawing functions by using an index in Meter.values[] that is beyond curItems - 1, but less than maxItems - 1.
2016-08-30Mark signal tables 'const'Explorer09
Specifically, Platform_signals[] and Platform_numberOfSignals. Both are not supposed to be mutable. Marking them 'const' puts them into rodata sections in binary. And for Platform_numberOfSignals, this aids optimization (aids only Link Time Optimization for now). :) Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2016-01-15Introduce CLAMP macro. Unify all MIN(MAX(a,b),c) uses.Explorer09
With the CLAMP macro replacing the combination of MIN and MAX, we will have at least two advantages: 1. It's more obvious semantically. 2. There are no more mixes of confusing uses like MIN(MAX(a,b),c) and MAX(MIN(a,b),c) and MIN(a,MAX(b,c)) appearing everywhere. We unify the 'clamping' with a single macro. Note that the behavior of this CLAMP macro is different from the combination `MAX(low,MIN(x,high))`. * This CLAMP macro expands to two comparisons instead of three from MAX and MIN combination. In theory, this makes the code slightly smaller, in case that (low) or (high) or both are computed at runtime, so that compilers cannot optimize them. (The third comparison will matter if (low)>(high); see below.) * CLAMP has a side effect, that if (low)>(high) it will produce weird results. Unlike MIN & MAX which will force either (low) or (high) to win. No assertion of ((low)<=(high)) is done in this macro, for now. This CLAMP macro is implemented like described in glib <http://developer.gnome.org/glib/stable/glib-Standard-Macros.html> and does not handle weird uses like CLAMP(a++, low++, high--) .
2015-10-19Regenerate platform-dependent headers.Hisham Muhammad
Closes #293.
2015-03-16Get FreeBSD tree to compile again with latest changes.Hisham Muhammad
2014-11-27Add a stub for the battery meter.Hisham Muhammad
2014-11-27"get max pid" for FreeBSDHisham Muhammad
2014-11-27Load averages for FreeBSD!Hisham Muhammad
2014-11-27Add uptime calculation code.Hisham Muhammad
2014-11-27Uptime meter for FreeBSD.Hisham Muhammad
This will produce too much replicated code. I think I'll use a lighter abstraction in things like this.
2014-11-27Beginnings of FreeBSD port!Hisham Muhammad