summaryrefslogtreecommitdiffstats
path: root/Affinity.c
AgeCommit message (Collapse)Author
2023-12-26Update includes based on IWYUBenny Baumann
2023-08-30Introduce Row and Table classes for screens beyond top-processesNathan Scott
This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity.
2023-05-08Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott
First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes.
2021-09-22Update license headers to explicitly say GPLv2+Daniel Lange
2021-09-04hwloc: use int in hwloc_bitmap_foreach_begin loopChristian Göttsche
Affinity.c:67:10: runtime error: implicit conversion from type 'int' of value -1 (32-bit, signed) to type 'unsigned int' changed the value to 4294967295 (32-bit, unsigned)
2021-07-18Enable affinity support for non-LinuxChristian Göttsche
sched_getaffinity() and sched_setaffinity() are also available on BSDs. Remove the Linux restraint.
2021-07-18Rework CPU countingChristian Göttsche
Currently htop does not support offline CPUs and hot-swapping, e.g. via echo 0 > /sys/devices/system/cpu/cpu2/online Split the current single cpuCount variable into activeCPUs and existingCPUs. Supersedes: #650 Related: #580
2021-03-21Use `#if defined()` syntax when `#elif defined()` is presentBenny Baumann
This prefers the `#if defined()` syntax over the `#ifdef` variant whenever there's also a `#elif defined()` clause, thus making the multiple branching structure more obvious and the overall use more consistent.
2021-03-19Use unsigned types for CPU counts and associated variablesChristian Göttsche
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2020-11-19IWYU update (FreeBSD)Christian Goettsche
2020-11-02Embracing branchesBenny Baumann
2020-11-02Spacing around operatorsBenny Baumann
2020-11-02Whitespace and indentation issuesBenny Baumann
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-09-29Sort headers/includesBenny Baumann
2020-09-18Avoid checking of undefined macrosChristian Göttsche
These feature macros are either define or not defined at all at the configure step.
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.
2020-08-20Resolve compiler warnings and errors relating to the Arg unionNathan Scott
Promote the Arg union to a core data type in Object.c such that it is visible everywhere (many source files need it), and correct declarations of several functions that use it. The Process_sendSignal function is also corrected to have the expected return type (bool, not void) - an error being masked by ignoring this not-quite-harmless warning. I've also added error checking to the kill(2) call here, which was previously overlooked / missing (?).
2016-02-14Portable affinity using hwlocHisham
2016-02-02Check for failure in allocations.Hisham
2015-01-21Sorry about the mega-patch.Hisham Muhammad
This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
2014-01-16Fix order of calloc arguments.Hisham Muhammad
(Patch by Dawid Gajownik)
2011-12-26major header cleanupHisham Muhammad
2011-09-24Convert affinity control from the deprecated PLPA to HWLOCHisham Muhammad