Skip to content

ext/pcntl: adding pcntl_getcpu. #13908

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

Closed
wants to merge 1 commit into from
Closed

Conversation

devnexen
Copy link
Member

@devnexen devnexen commented Apr 7, 2024

using sched_getcpu under the hood (Linux and FreeBSD). Returns the current cpu id for the current process. For Linux, we need to see beyond the sole presence of the symbol to consider it.
Mostly useful, for now, in the cpu affinity context since the os can migrate processes as it sees fits otherwise.

@devnexen devnexen force-pushed the pcntl_getcpu branch 2 times, most recently from 9104a1c to 7dd4d93 Compare April 7, 2024 16:52
@devnexen devnexen marked this pull request as ready for review April 7, 2024 17:17
@devnexen devnexen requested a review from kocsismate as a code owner April 7, 2024 17:17
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

LGTM, just one silly nit

using sched_getcpu under the hood (Linux and FreeBSD).
Returns the current cpu id for the current process.
For Linux, we need to see beyond the sole presence of the symbol
to consider it.
Mostly useful, for now, in the cpu affinity context since
the os can migrate processes as it sees fits otherwise.
devnexen added a commit that referenced this pull request Apr 7, 2024
using sched_getcpu under the hood (Linux and FreeBSD).
Returns the current cpu id for the current process.
For Linux, we need to see beyond the sole presence of the symbol
to consider it.
Mostly useful, for now, in the cpu affinity context since
the os can migrate processes as it sees fits otherwise.

Clos GH-13908
@devnexen
Copy link
Member Author

devnexen commented Apr 7, 2024

Merged via d8f2900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants