Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

darwin_supports_ulock_wait2

Darwin XNU 7195.50.7.100.1 introduced __ulock_wait2 and migrated code paths (notably pthread_cond_t) towards it: https://github.com/apple/darwin-xnu/commit/d4061fb0260b3ed486147341b72468f836ed6c8f#diff-08f993cc40af475663274687b7c326cc6c3031e0db3ac8de7b24624610616be6

This XNU version appears to correspond to 11.0.1: https://kernelshaman.blogspot.com/2021/01/building-xnu-for-macos-big-sur-1101.html

ulock_wait() uses 32-bit micro-second timeouts where 0 = INFINITE or no-timeout ulock_wait2() uses 64-bit nano-second timeouts (with the same convention)

Threaded.darwin_supports_ulock_wait2
const darwin_supports_ulock_wait2 = builtin.os.version_range.semver.min.major >= 11

File

lib/std/Io/Threaded.zig:14949

Code

const darwin_supports_ulock_wait2 = builtin.os.version_range.semver.min.major >= 11