rust/library
bors b17491c8f6 Auto merge of #110211 - joboet:queue_lock, r=Amanieu
Replace pthread `RwLock` with custom implementation

This is one of the last items in #93740. I'm doing `RwLock` first because it is more self-contained and has less tradeoffs to make. The motivation is explained in the documentation, but in short: the pthread rwlock is slow and buggy and `std` can do much better. I considered implementing a parking lot, as was discussed in the tracking issue, but settled for the queue-based version because writing self-balancing binary trees is not fun in Rust...

This is a rather complex change, so I have added quite a bit of documentation to help explain it. Please point out any part that could be explained better.

~~The read performance is really good, I'm getting 4x the throughput of the pthread version and about the same performance as usync/parking_lot on an Apple M1 Max in the usync benchmark suite, but the write performance still falls way behind what usync and parking_lot achieve. I tried using a separate queue lock like what usync uses, but that didn't help. I'll try to investigate further in the future, but I wanted to get some eyes on this first.~~ [Resolved](https://github.com/rust-lang/rust/pull/110211#issuecomment-1513682336)

r? `@m-ou-se`
CC `@kprotty`
2024-02-12 09:45:22 +00:00
..
alloc Rollup merge of #110483 - tleibert:thin-box-try-new, r=dtolnay 2024-02-11 23:19:07 +01:00
backtrace@6145fe6bac Update backtrace submodule 2023-11-21 16:33:42 +01:00
core Rollup merge of #120888 - saethlin:unsafe-precondition-cleanup, r=RalfJung 2024-02-11 23:19:10 +01:00
panic_abort rustc: implement support for riscv32im_risc0_zkvm_elf 2024-01-22 10:07:36 -08:00
panic_unwind Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
portable-simd Disable conversions between portable_simd and stdarch on big-endian ARM 2024-01-30 04:47:01 +00:00
proc_macro Rollup merge of #119449 - Nilstrieb:library-clippy, r=cuviper 2024-02-11 08:25:42 +01:00
profiler_builtins Add support for custom JSON targets when using build-std. 2024-02-05 10:20:42 +00:00
rtstartup library: Fix warnings in rtstartup 2024-01-06 01:32:03 +03:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #110211 - joboet:queue_lock, r=Amanieu 2024-02-12 09:45:22 +00:00
stdarch@5ef6eb42bd Update stdarch submodule 2024-01-30 03:33:12 +00:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test Actually abort in panic-abort-tests 2024-01-30 18:19:49 -08:00
unwind Enable Static Builds for FreeBSD 2024-01-11 15:26:16 +00:00