Skip to content

ext/pcntl: adding pcntl_getcpu.#13908

Closed
devnexen wants to merge 1 commit intophp:masterfrom
devnexen:pcntl_getcpu
Closed

ext/pcntl: adding pcntl_getcpu.#13908
devnexen wants to merge 1 commit intophp:masterfrom
devnexen:pcntl_getcpu

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

@ndossche ndossche 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