From f017b6509bf63ba30db7f1c6dc2978c0c6214626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 27 Sep 2024 23:21:08 +0200 Subject: [PATCH] fix sysctl string --- src/Concerns/ParallelCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Concerns/ParallelCommand.php b/src/Concerns/ParallelCommand.php index 84bc0658..2a220b7e 100644 --- a/src/Concerns/ParallelCommand.php +++ b/src/Concerns/ParallelCommand.php @@ -60,7 +60,7 @@ trait ParallelCommand $size->cdata = FFI::sizeof($cores); // perflevel0 refers to P-cores on M-series, and the entire CPU on Intel Macs - if ($darwin && $ffi->sysctlbyname('hw.xperflevel0.logicalcpu', FFI::addr($cores), FFI::addr($size), null, 0) === 0) { + if ($darwin && $ffi->sysctlbyname('hw.perflevel0.logicalcpu', FFI::addr($cores), FFI::addr($size), null, 0) === 0) { return $size->cdata; } else if ($darwin) { // Reset the size in case the pointer got written to (likely shouldn't happen)