about summary refs log tree commit diff
path: root/library/std/src/sys/windows/thread.rs
AgeCommit message (Collapse)AuthorLines
2023-01-17refactor[std]: do not use box syntaxjoboet-1/+1
2023-01-14Remove various double spaces in source comments.André Vennberg-1/+1
2022-05-09Use Rust 2021 prelude in std itself.Mara Bos-1/+0
2022-03-04Rollup merge of #94618 - lewisclark:remove-stack-size-rounding, r=yaahcDylan DPC-4/+1
Don't round stack size up for created threads in Windows Fixes #94454 Windows does the rounding itself, so there isn't a need to explicity do the rounding beforehand, as mentioned by ```@ChrisDenton``` in #94454 > The operating system rounds up the specified size to the nearest multiple of the system's allocation granularity (typically 64 KB). To retrieve the allocation granularity of the current system, use the [GetSystemInfo](https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsysteminfo) function. https://docs.microsoft.com/en-us/windows/win32/procthread/thread-stack-size
2022-03-04Don't round stack size up for created threadsLewis Clark-4/+1
2022-03-03Use `HandleOrNull` and `HandleOrInvalid` in the Windows FFI bindings.Dan Gohman-4/+6
Use the new `HandleOrNull` and `HandleOrInvalid` types that were introduced as part of [I/O safety] in a few functions in the Windows FFI bindings. This factors out an `unsafe` block and two `unsafe` function calls in the Windows implementation code. And, it helps test `HandleOrNull` and `HandleOrInvalid`, which indeed turned up a bug: `OwnedHandle` also needs to be `#[repr(transparent)]`, as it's used inside of `HandleOrNull` and `HandleOrInvalid` which are also `#[repr(transparent)]`. [I/O safety]: https://github.com/rust-lang/rust/issues/87074
2022-02-04Hide Repr details from io::Error, and rework `io::Error::new_const`.Thom Chiovoloni-2/+2
2021-09-28Rename `std::thread::available_onccurrency` to ↵Yoshua Wuyts-1/+1
`std::thread::available_parallelism`
2021-08-19I/O safety.Dan Gohman-2/+3
Introduce `OwnedFd` and `BorrowedFd`, and the `AsFd` trait, and implementations of `AsFd`, `From<OwnedFd>` and `From<T> for OwnedFd` for relevant types, along with Windows counterparts for handles and sockets. Tracking issue: - <https://github.com/rust-lang/rust/issues/87074> RFC: - <https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md>
2021-06-21Move `available_concurrency` implementation to `sys`Christiaan Dirkx-0/+16
2020-07-27mv std libs to library/mark-0/+110