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

Ensure CpuFrequency is never explicitly set to zero #29

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

jschwe
Copy link
Contributor

@jschwe jschwe commented Apr 22, 2020

detect_from_cpuid could previously set CpuFrequency to zero.
To ensure that this doesn't happen all detect methods set
mhz and CpuFrequencySources via a helper method that ensures
that mhz is never explicitly set to zero (apart from the
creation of the object)

@jschwe jschwe force-pushed the bugfix/prevent-zero-cpu-frequency branch from 4857b43 to 510f546 Compare April 22, 2020 13:04
detect_from_cpuid could previously set CpuFrequency to zero.
To ensure that this doesn't happen all detect methods set
mhz and CpuFrequencySources via a helper method that ensures
that mhz is never explicitly set to zero (apart from the
creation of the object)
@jschwe jschwe force-pushed the bugfix/prevent-zero-cpu-frequency branch from 510f546 to 5faf34d Compare April 22, 2020 13:10
@stlankes
Copy link
Contributor

Yes, the idea to introduce set_detected_cpu_frequency is good!

@stlankes stlankes merged commit eb420c6 into hermit-os:master Apr 24, 2020
@jschwe jschwe deleted the bugfix/prevent-zero-cpu-frequency branch April 24, 2020 06:49
simonschoening pushed a commit to simonschoening/libhermit-rs that referenced this pull request Aug 26, 2021
…requency

Ensure CpuFrequency is never explicitly set to zero
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.

2 participants