-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-41440: add os.cpu_count() support for VxWorks RTOS #21685
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
Conversation
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again |
Thanks for making the requested changes! @corona10: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit change
Misc/NEWS.d/next/Library/2020-07-30-14-56-58.bpo-41440.rju34k.rst
Outdated
Show resolved
Hide resolved
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
I have made the requested changes; please review again |
Thanks for making the requested changes! @corona10: please review the changes made to this pull request. |
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
This reverts commit 88e7cea.
I have made the requested changes; please review again |
Thanks for making the requested changes! @corona10: please review the changes made to this pull request. |
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
@corona10 Thanks for merging it. |
VxWorks RTOS provides API vxCpuEnabledGet() to get the set of running CPUs in the system. The return value of vxCpuEnabledGet() is the type cpuset_t defined as shown below. Every bit in the cpuset_t represents the individual CPU No. That is bit 0 corresponds to cpu0, bit 1 corresponds to cpu1, etc. So counting the ones count with __builtin_popcount will get the running CPU count.
typedef unsigned int cpuset_t;
https://bugs.python.org/issue41440