pcntl_setcpuaffinity()
function pcntl_setcpuaffinity(int $process_id = null, mixed $cpu_ids = []): bool
Changes the CPU affinity mask for a Linux process.
Parameters:
$process_id(int), defaultnull, optional$cpu_ids(mixed), default[], optional
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/pcntl/pcntl_setcpuaffinity.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how pcntl_setcpuaffinity is implemented in the compiler, see the internals page.