rust/library/std/src
bors 56b625be68 Auto merge of #101482 - joboet:netbsd_parker, r=sanxiyn
Optimize thread parking on NetBSD

As the futex syscall is not present in the latest stable release, NetBSD cannot use the efficient thread parker and locks Linux uses. Currently, it therefore relies on a pthread-based parker, consisting of a mutex and semaphore which protect a state variable. NetBSD however has more efficient syscalls available: [`_lwp_park`](https://man.netbsd.org/_lwp_park.2) and [`_lwp_unpark`](https://man.netbsd.org/_lwp_unpark.2). These already provide the exact semantics of `thread::park` and `Thread::unpark`, but work with thread ids. In `std`, this ID is here stored in an atomic state variable, which is also used to optimize cases were the parking token is already available at the time `thread::park` is called.

r? `@m-ou-se`
2022-09-11 04:07:17 +00:00
..
backtrace Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
collections Fix std::collections::HashSet::drain documentation 2022-09-02 16:35:40 +02:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error remove fn backtrace 2022-08-01 20:10:40 +00:00
f32 Semicolon after macro_rules definition. 2022-08-15 12:33:00 +02:00
f64 Semicolon after macro_rules definition. 2022-08-15 12:33:00 +02:00
ffi Guarantee try_reserve preserves the contents on error 2022-08-10 01:51:38 +09:00
fs Ignore hiberfil_sys test in CI 2022-07-18 15:06:07 +01:00
io stdio: Document no support for writing to non-blocking stdio/stderr 2022-09-07 14:22:57 +01:00
net Rollup merge of #94890 - marmeladema:ip-addr-try-from-bytes, r=joshtriplett 2022-08-29 06:34:41 +02:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Don't duplicate file descriptors into stdio fds 2022-09-04 10:22:36 +01:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path make many std tests work in Miri 2022-08-18 18:07:39 -04:00
personality Move personality functions to std 2022-08-23 16:12:58 +08:00
prelude Finish bumping stage0 2022-05-27 07:36:17 -04:00
process Add test for issue #95178 2022-03-23 05:33:44 +00:00
sync Auto merge of #100576 - joboet:movable_const_remutex, r=Mark-Simulacrum 2022-09-04 22:53:58 +00:00
sys Auto merge of #101482 - joboet:netbsd_parker, r=sanxiyn 2022-09-11 04:07:17 +00:00
sys_common std: use futex-based locks and thread parker on Hermit 2022-09-09 11:56:50 +02:00
thread doc: fix minor typo 2022-09-09 11:30:40 +02:00
time make many std tests work in Miri 2022-08-18 18:07:39 -04:00
alloc.rs Forbid mixing System with sytem allocator calls 2022-09-03 16:47:12 -05:00
ascii.rs Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
backtrace.rs Adjust backtrace stabilization version to CURRENT_RUSTC_VERSION 2022-08-27 17:08:53 +02:00
env.rs add aliases for current_dir 2022-05-24 19:41:40 -07:00
error.rs error::Error: remove some comments 2022-08-25 07:42:07 +01:00
f32.rs Improve primitive/std docs separation and headers 2022-08-20 16:50:29 -05:00
f64.rs Improve primitive/std docs separation and headers 2022-08-20 16:50:29 -05:00
fs.rs updated description of File struct in std::fs 2022-09-03 11:09:06 -07:00
keyword_docs.rs Fix a bunch of typo 2022-08-31 18:24:55 +08:00
lazy.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
lib.rs Auto merge of #100812 - Nilstrieb:revert-let-chains-nightly, r=Mark-Simulacrum 2022-08-30 05:48:22 +00:00
macros.rs stdio: Document no support for writing to non-blocking stdio/stderr 2022-09-07 14:22:57 +01:00
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Support unstable moves via stable in unstable items 2022-07-08 21:18:13 +00:00
panicking.rs Auto merge of #92461 - rust-lang:const_tls_local_panic_count, r=Mark-Simulacrum 2022-05-23 13:04:59 +00:00
path.rs Rollup merge of #97912 - Kixunil:stabilize_path_try_exists, r=dtolnay 2022-06-20 07:37:41 +09:00
personality.rs Move personality functions to std 2022-08-23 16:12:58 +08:00
primitive_docs.rs Add the syntax of references to their documentation summary. 2022-08-26 10:47:03 -07:00
process.rs Make doc for stdin field of process consistent 2022-08-21 01:56:26 -07:00
rt.rs unix_sigpipe: Make sigpipe param docs long-form 2022-09-01 06:45:04 +02:00
time.rs Support setting file accessed/modified timestamps 2022-07-15 02:54:06 -07:00