History log of /libuv/src/unix/darwin-stub.h (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 33005022 08-Nov-2022 Jameson Nash

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 ...


Revision tags: v1.41.0, v1.40.0, v1.39.0
# 87f07651 04-Aug-2020 Evan Lucas

darwin: use IOKit for uv_cpu_info

This switches uv_cpu_info from using sysctlbyname to
using IOKit to get the speed of the processors.
macOS on ARM does not currently have the hw.cpu

darwin: use IOKit for uv_cpu_info

This switches uv_cpu_info from using sysctlbyname to
using IOKit to get the speed of the processors.
macOS on ARM does not currently have the hw.cpufrequency
sysctl. We are able to reliable get the clock frequency
on all architectures by using IOKit.

Fixes: https://github.com/libuv/libuv/issues/2911
PR-URL: https://github.com/libuv/libuv/pull/2914
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...


Revision tags: v1.38.1, v1.38.0
# 75c8850c 28-Apr-2020 Ben Noordhuis

darwin: fix build with non-apple compilers

The header files for ApplicationServices and CoreFoundation contain
C language extensions that Apple's compiler understands but gcc does
no

darwin: fix build with non-apple compilers

The header files for ApplicationServices and CoreFoundation contain
C language extensions that Apple's compiler understands but gcc does
not, notably blocks:

https://en.wikipedia.org/wiki/Blocks_(C_language_extension)

Work around that by defining the types inline and stop including
the headers. It's inelegant but the alternatives are worse.

Fixes: https://github.com/libuv/libuv/issues/2805
PR-URL: https://github.com/libuv/libuv/pull/2811
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...