Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Resolve complation issues with -fno-common (default from gcc-10) #1017

Open
wants to merge 508 commits into
base: master
Choose a base branch
from
Open

Resolve complation issues with -fno-common (default from gcc-10) #1017

wants to merge 508 commits into from

Conversation

natoscott
Copy link
Collaborator

Extends the MakeHeader script to auto-generate correct "extern"
function declarations in some cases that it currently does not.

Related to #981

Nudin and others added 29 commits September 18, 2020 12:04
`-m` was added as short option for `--no-mouse`, this is inconsistence
to the rest of the cli since otherwise the short options to disable a
feature are capital letters. Therefore this commit renames the option to
`-M`.

This commit also documents the option in the man page.
v is generally used for enabling verbose mode
Compatible with gcc and clang.
Use internal macros for compatibility with non GNUC compilers.
int foo(); declares a function taking any number of arguments.
These feature macros are either define or not defined at all at the
configure step.
They are nowhere used.
This also fixes an issue with time returned negative if sysconf(_SC_CLK_TCK) returned an error.
BenBE and others added 30 commits November 2, 2020 22:15
The check for NAN is kept to avoid relying on implementation details of the CLAMP macro/function
Fixes #308, thanks @qarmin (Rafał Mikrut)
If currently two unsigned values are compared via `a - b`, in the case b
is actually bigger than a, the result will not be an negative number (as
-1 is expected) but a huge positive number as the subtraction is an
unsigned subtraction.

Avoid over-/underflow affected operations; use comparisons.
Modern compilers will generate sane code, like:
    xor     eax, eax
    cmp     rdi, rsi
    seta    al
    sbb     eax, 0
    ret
It is only used to read process directories on RedHat beginning with a dot.
Unconditionally accept directories with a starting dot.
Thanks to @adsr for the great work
Closes #241, closes #74
Massive rebase, so #keepfingerscrossed
Shows the process CPU usage divided by the number of CPU cores
- use consistent type for key by introducing a new typedef
- use unsigned types for sizes
- name parameters in foreach function typedef
Dynamically increase the hashmap size to not exceed the load factor and
avoid too long chains.

Switch from Separate Chaining to Robin Hood linear probing to improve
cache locality.

Use primes as size to further avoid collisions.

E.g. on a standard kde system the number of entries in the ProcessTable
might be around 650.
Consistent with everything else involving platform-specific
calls from core htop code.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.