rust/library/std/src
bors e55c53c57e Auto merge of #97925 - the8472:cgroupv1, r=joshtriplett
Add cgroupv1 support to available_parallelism

Fixes #97549

My dev machine uses cgroup v2 so I was only able to test that code path. So the v1 code path is written only based on documentation. I could use some help testing that it works on a machine with cgroups v1:

```
$ x.py build --stage 1

# quota.rs
fn main() {
    println!("{:?}", std:🧵:available_parallelism());
}

# assuming stage1 is linked in rustup
$ rust +stage1 quota.rs

# spawn a new cgroup scope for the current user
$ sudo systemd-run -p CPUQuota="300%" --uid=$(id -u) -tdS

# should print Ok(3)
$ ./quota
```

If it doesn't work as expected an strace, the contents of `/proc/self/cgroups` and the structure of `/sys/fs/cgroups` would help.
2022-07-23 13:33:56 +00:00
..
backtrace Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
collections Rollup merge of #96173 - jmaargh:jmaargh/with-capacity-doc-fix, r=Dylan-DPC 2022-06-23 14:39:05 -07:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
f32 Implement IEEE 754-2019 minimun and maximum functions for f32/f64 2021-11-20 10:14:03 +01:00
f64 Remove fNN::lerp - consensus unlikely 2021-10-25 22:44:41 -05:00
ffi Rollup merge of #97915 - tbu-:pr_os_string_fmt_write, r=joshtriplett 2022-07-17 13:08:48 +09:00
fs Ignore hiberfil_sys test in CI 2022-07-18 15:06:07 +01:00
io Rollup merge of #98387 - NobodyXu:feature/std_io_Error_try_downgrade_inner, r=yaahc 2022-07-16 17:52:59 +09:00
net Rollup merge of #97300 - ChayimFriedman2:patch-1, r=dtolnay 2022-07-05 10:42:52 +05:30
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Fix the stable version of AsFd for Arc<T> and Box<T> 2022-07-20 12:09:49 -07:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path Allow unused_macro_rules in path tests 2022-05-16 08:55:05 +02: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 Rollup merge of #97629 - guswynn:exclusive_struct, r=m-ou-se 2022-06-30 19:55:50 +02:00
sys Auto merge of #97925 - the8472:cgroupv1, r=joshtriplett 2022-07-23 13:33:56 +00:00
sys_common Rollup merge of #98101 - vladimir-ea:stdlib_watch_os, r=thomcc 2022-07-20 16:17:17 +05:30
thread Auto merge of #97925 - the8472:cgroupv1, r=joshtriplett 2022-07-23 13:33:56 +00:00
time Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
alloc.rs Update std::alloc::System docs 2022-06-26 16:31:29 +02:00
ascii.rs Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
backtrace.rs revert changes that cast functions to raw pointers, portability hazard 2022-03-29 20:18:27 -04:00
env.rs add aliases for current_dir 2022-05-24 19:41:40 -07:00
error.rs add tracking issue to generic member access APIs 2022-07-15 22:13:43 +00:00
f32.rs Rollup merge of #95483 - golddranks:improve_float_docs, r=joshtriplett 2022-05-09 18:45:35 +02:00
f64.rs Rollup merge of #95483 - golddranks:improve_float_docs, r=joshtriplett 2022-05-09 18:45:35 +02:00
fs.rs Add std::fs::write documentation precision 2022-07-11 09:48:47 +02:00
keyword_docs.rs Rollup merge of #98169 - pierwill:dyn-disp, r=JohnTitor 2022-06-17 07:16:58 +09: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 #97925 - the8472:cgroupv1, r=joshtriplett 2022-07-23 13:33:56 +00:00
macros.rs Make write/print macros eagerly drop temporaries 2022-05-22 16:11:08 -07: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
primitive_docs.rs Improve the function pointer docs 2022-07-19 08:52:24 -07:00
process.rs Rollup merge of #97917 - AronParker:master, r=ChrisDenton 2022-07-07 20:33:23 +02:00
rt.rs Change Termination::report return type to ExitCode 2022-01-28 12:53:36 -08:00
time.rs std::time : fix doc variable name 2022-05-23 00:02:09 +02:00