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

Implement List{Offline,Online,Possible,Present} functions on Linux #89

Merged
merged 4 commits into from
May 22, 2024

Conversation

tklauser
Copy link
Owner

No description provided.

tklauser added 4 commits May 22, 2024 12:45
This will allow to use it with a function returning a list of CPUs in a
successive commit.
So they can be re-used for the List* functions introduced in a
successive commit.
Treat an empty file as valid. This might be the case if there are no
offline CPUs in which case /sys/devices/system/cpu/offline is empty.
These return a list of offline, online, possible or present CPUs rather
than just the number of CPUs.

These are implemented on Linux only for now as other platforms don't
seem to expose that information in detail.
@tklauser tklauser force-pushed the pr/tklauser/list-apis branch from ea7cdeb to 5f6c712 Compare May 22, 2024 10:50
@tklauser tklauser merged commit 9ff7f79 into main May 22, 2024
24 checks passed
@tklauser tklauser deleted the pr/tklauser/list-apis branch May 22, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant