Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetBSD: Fix CPU usage and top info. #2101

Merged
merged 6 commits into from
Dec 6, 2024

Conversation

g0mb4
Copy link
Collaborator

@g0mb4 g0mb4 commented Dec 5, 2024

Report the correct number of CPUs and calculate the per-CPU load.
Populate top info.

I've started implementing a common BSD interface, as all BSD implementations use slightly different functions to achieve the same goal, and maintaining them in one place would be easier.

Fixes #2097.

Report the correct number of CPUs and calculate the per-CPU load.

Start implementing a common BSD interface, as all BSD implementations use
*slightly* different functions to achieve the same goal,
and maintaining them in one place would be easier.

Fixes brndnmtthws#2097.
@github-actions github-actions bot added sources PR modifies project sources build system related to build system (CMake) and/or building process/assumptions labels Dec 5, 2024
Copy link

netlify bot commented Dec 5, 2024

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit badf958
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/6752f8e10dadfc0008695380

@g0mb4 g0mb4 changed the title [WIP] NetBSD: Fix CPU Usage. NetBSD: Fix CPU usage and top info. Dec 6, 2024
@g0mb4 g0mb4 marked this pull request as ready for review December 6, 2024 12:36
Copy link
Owner

@brndnmtthws brndnmtthws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I'll add you as a collaborator.

* Shared or very similar code across BSDs.
*/

#ifndef BSDCOMMON_H_
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: you can just use #pragma once in the future.

@g0mb4 g0mb4 merged commit 0624b75 into brndnmtthws:main Dec 6, 2024
38 checks passed
@g0mb4 g0mb4 deleted the fix/netbsd-cpu-and-top branch December 6, 2024 15:03
@brndnmtthws brndnmtthws added the bug related to incorrect existing implementation of some functionality label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug related to incorrect existing implementation of some functionality build system related to build system (CMake) and/or building process/assumptions sources PR modifies project sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: NetBSD 10.0 compilation issues then conky crashes "attempting to use more CPUs than you have!
2 participants