darwin: use hw.cpufrequency again for frequency info (#3679) This reverts commit 87f076515937345fda1a1dbc598f34e65e1b81c7 and implements a work-around instead. This has been reported to
darwin: use hw.cpufrequency again for frequency info (#3679) This reverts commit 87f076515937345fda1a1dbc598f34e65e1b81c7 and implements a work-around instead. This has been reported to be unnecessary, and also returns the wrong answer (off by exactly 100x), so it is not particularly useful. This also reverts the bugfixes to the original PR: Revert "darwin: fix iOS compilation and functionality" This reverts commit 1addf9b88a17bc32d009d377a14d540ccddd06db. Revert "macos: fix the cfdata length in uv__get_cpu_speed (#3356)" This reverts commit 1e7074913e1d2a1be72b62ba807325c14b0b317a. Revert "darwin: fix -Wsometimes-uninitialized warning" This reverts commit 6085bcef8dea1eaa21a92e2b6e6f03a0476b6c54. Revert "macos: fix memleaks in uv__get_cpu_speed" This reverts commit d2482ae121e0ae5d0cf0934b2e93cee81a4ac5ed. The expected behavior on failure to read this info is to report 0 (for example https://github.com/libuv/libuv/blob/8975c05d199558b0cc2e98f26ce33c6090d1 d7a1/src/unix/linux.c#L834), which is which was not the case before this PR for macos. However hw.cpufrequency sysctl seems to be missing on darwin/arm64 (Apple Silicon), so we instead hardcode a plausible value. This value matches what the mach kernel will report when running Rosetta apps. Fixes: https://github.com/libuv/libuv/issues/3642 Fixes: https://github.com/libuv/libuv/issues/2911 Refs: https://github.com/libuv/libuv/pull/2912
show more ...
|