about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-06-04 11:06:40 +0200
committerGitHub <noreply@github.com>2022-06-04 11:06:40 +0200
commite9ec02267a0b84d6a17357c1a0da46093ba5ad1d (patch)
tree7baf0f20f2a3f01acf059a4c178d92e3e826f279 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent07f586fe746a362fdebfc1cec0016dd024780dce (diff)
parent6a417d482899e13b1fbef5f5f9962f59e89e9e53 (diff)
downloadrust-e9ec02267a0b84d6a17357c1a0da46093ba5ad1d.tar.gz
rust-e9ec02267a0b84d6a17357c1a0da46093ba5ad1d.zip
Rollup merge of #97647 - m-ou-se:lazy-box-locks, r=Amanieu
Lazily allocate and initialize pthread locks.

Lazily allocate and initialize pthread locks.

This allows {Mutex, Condvar, RwLock}::new() to be const, while still using the platform's native locks for features like priority inheritance and debug tooling. E.g. on macOS, we cannot directly use the (private) APIs that pthread's locks are implemented with, making it impossible for us to use anything other than pthread while still preserving priority inheritance, etc.

This PR doesn't yet make the public APIs const. That's for a separate PR with an FCP.

Tracking issue: https://github.com/rust-lang/rust/issues/93740
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions