Skip to content

Conversation

@pxinwr
Copy link
Contributor

@pxinwrpxinwr commented Jul 30, 2020

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

@bedevere-bot
Copy link

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@corona10corona10 requested a review from vstinnerJuly 30, 2020 14:33
@pxinwr
Copy link
ContributorAuthor

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@corona10: please review the changes made to this pull request.

Copy link
Member

@corona10corona10 left a comment

Choose a reason for hiding this comment

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

nit change

@bedevere-bot
Copy link

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@pxinwr
Copy link
ContributorAuthor

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@corona10: please review the changes made to this pull request.

@bedevere-bot
Copy link

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

@pxinwr
Copy link
ContributorAuthor

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@corona10: please review the changes made to this pull request.

pxinwrand others added 2 commits August 4, 2020 10:36
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
@corona10corona10 requested a review from vstinnerAugust 5, 2020 08:44
@corona10corona10 merged commit 3405e05 into python:masterAug 7, 2020
@pxinwr
Copy link
ContributorAuthor

@corona10 Thanks for merging it.

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Aug 20, 2020
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
@pxinwrpxinwr deleted the fix-issue-31904-cpucount branch July 12, 2021 09:41
Sign up for freeto 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.

5 participants

@pxinwr@bedevere-bot@vstinner@corona10@the-knights-who-say-ni