about summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows/pipe.rs
AgeCommit message (Collapse)AuthorLines
2025-06-28Workaround for mem safety in third party dllsChris Denton-5/+8
2025-06-15Windows: Use anonymous pipes in CommandChris Denton-85/+90
2025-04-27use generic Atomic type where possibleChristopher Durham-2/+2
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
2025-04-02Remove creation of duplicate AnonPipeJake Wharton-1/+0
The File is unwrapped to a Handle into an AnonPipe, and then that AnonPipe was unwrapped to a Handle into another AnonPipe. The second operation is entirely redundant.
2025-03-27std: get rid of pre-Vista fallback codejoboet-22/+6
We haven't had any Windows XP targets for a long while now...
2025-03-06library: Use size_of from the prelude instead of importedThalia Archibald-1/+1
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2024-09-25Use `&raw` in the standard libraryJosh Stone-1/+1
Since the stabilization in #127679 has reached stage0, 1.82-beta, we can start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!` and `ptr::addr_of_mut!` can stop allowing the unstable feature. I intentionally did not change any documentation or tests, but the rest of those macro uses are all now using `&raw const` or `&raw mut` in the standard library.
2024-09-23std: implement the `random` featurejoboet-3/+4
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.
2024-07-30Move Windows implementation of anon pipeChris Denton-17/+0
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-24Rollup merge of #128092 - ChrisDenton:wrappers, r=workingjubileeMatthias Krüger-22/+23
Remove wrapper functions from c.rs I'd like for the windows `c.rs` just to contain the basic platform definitions and not anything higher level unless absolutely necessary. So this removes some wrapper functions that weren't really necessary in any case. The functions are only used in a few places which themselves are relatively thin wrappers. The "interesting" bit is that we had an `AlertableIoFn` that abstracted over `ReadFileEx` and `WriteFileEx`. I've replaced this with a closure. Also I removed an `#[allow(unsafe_op_in_unsafe_fn)]` while I was moving things around.
2024-07-23Initial implementation of anonymous_pipeJiahao XU-3/+21
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com> Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com> Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-07-23Remove wrapper functions from c.rsChris Denton-22/+23
2024-07-16Remove `slice_to_end`Chris Denton-15/+5
2024-07-15allow(unsafe_op_in_unsafe_fn) on some functionsChris Denton-1/+3
These need to get their safety story straight
2024-07-15Rollup merge of #127750 - ChrisDenton:safe-unsafe-unsafe, r=workingjubileeJubilee-0/+1
Make os/windows and pal/windows default to `#![deny(unsafe_op_in_unsafe_fn)]` This is to prevent regressions in modules that currently pass. I did also fix up a few trivial places where the module contained only one or two simple wrappers. In more complex cases we should try to ensure the `unsafe` blocks are appropriately scoped and have any appropriate safety comments. This does not fix the windows bits of #127747 but it should help prevent regressions until that is done and also make it more obvious specifically which modules need attention.
2024-07-15Make pal/windows default to deny unsafe in unsafeChris Denton-0/+1
2024-07-15Remove DWORDChris Denton-6/+6
2024-07-15Remove LPVOIDChris Denton-2/+2
2024-07-15Remove LPOVERLAPPEDChris Denton-1/+1
2024-06-09Migrate more things to WinErrorChris Denton-5/+5
2024-03-19SeqCst->Relaxed in pal::windows::pipe.Mara Bos-4/+4
Relaxed is enough to ensure fetch_add(1) returns each integer exactly once.
2024-02-24library: use `addr_of!`Pavel Grigorenko-1/+1
2024-02-07Make `io::BorrowedCursor::advance` safeBenoît du Garreau-1/+1
This also keeps the old `advance` method under `advance_unchecked` name. This makes pattern like `std::io::default_read_buf` safe to write.
2024-01-11std: begin moving platform support modules into `pal`joboet-0/+571