about summary refs log tree commit diff
path: root/library/std/src/sys/pal/uefi/mod.rs
AgeCommit message (Collapse)AuthorLines
2025-09-10std: move `thread` into `sys`joboet-1/+0
2025-05-15deduplicate abort implementationsjoboet-8/+0
Currently, the code for process aborts is duplicated across `panic_abort` and `std`. This PR uses `#[rustc_std_internal_symbol]` to make the `std` implementation available to `panic_abort` via the linker, thereby deduplicating the code.
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-18Combine env consts into std::sys::env_constsThalia Archibald-1/+0
2025-04-12Move args into std::sysThalia Archibald-1/+0
2025-03-23Rollup merge of #138236 - Ayush1325:uefi-event, r=petrochenkovMichael Goulet-5/+5
uefi: Add OwnedEvent abstraction - Events are going to become quite important for Networking, so needed owned abstractions. - Switch to OwnedEvent abstraction for Exit boot services event. cc ````@nicholasbishop````
2025-03-22std: move process implementations to `sys`joboet-1/+0
As per #117276, this moves the implementations of `Process` and friends out of the `pal` module and into the `sys` module, removing quite a lot of error-prone `#[path]` imports in the process (hah, get it ;-)). I've also made the `zircon` module a dedicated submodule of `pal::unix`, hopefully we can move some other definitions there as well (they are currently quite a lot of duplications in `sys`). Also, the `ensure_no_nuls` function on Windows now lives in `sys::pal::windows` – it's not specific to processes and shared by the argument implementation.
2025-03-17uefi: Add OwnedEvent abstractionAyush Singh-5/+5
- Events are going to become quite important for Networking, so needed owned abstractions. - Switch to OwnedEvent abstraction for Exit boot services event. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-09std: move stdio to `sys`joboet-1/+0
As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
2025-03-08Move fs into sysThalia Archibald-1/+0
2025-02-17Rollup merge of #136844 - thaliaarchi:const-io-error, r=ChrisDentonMatthias Krüger-1/+1
Use `const_error!` when possible Replace usages of `io::Error::new(io::ErrorKind::Variant, "constant string")` with `io::const_error!(io::ErrorKind::Variant, "constant string")` to avoid allocations when possible. Additionally, fix `&&str` error messages in SGX and missing/misplaced trailing commas in `const_error!`.
2025-02-13std: Apply unsafe_attr_outside_unsafeEric Huss-1/+1
2025-02-10Fix &&str and trailing commas in io::const_error!Thalia Archibald-1/+1
2025-02-07std: move `io` module out of `pal`joboet-2/+0
2025-02-02std: move network code into `sys`joboet-2/+0
As per #117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support #135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules. I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
2025-01-10Initial fs module for uefiAyush Singh-1/+0
- Just a copy of unsupported fs right now to reduce the noise from future PRs to allow for easier review. - For the full working version of fs on uefi, see [0] [0]: https://github.com/Ayush1325/rust/tree/uefi-file-full Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-11-26std: update internal uses of `io::const_error!`joboet-1/+1
2024-09-23std: implement the `random` featurejoboet-33/+0
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.
2024-08-27std: move allocators to `sys`joboet-3/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-19uefi: Add processAyush Singh-1/+0
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-07-16uefi: Forbid unwrapped unsafe in platform modulesJubilee Young-0/+1
2024-06-15std: refactor the TLS implementationjoboet-2/+0
As discovered by Mara in #110897, our TLS implementation is a total mess. In the past months, I have simplified the actual macros and their expansions, but the majority of the complexity comes from the platform-specific support code needed to create keys and register destructors. In keeping with #117276, I have therefore moved all of the `thread_local_key`/`thread_local_dtor` modules to the `thread_local` module in `sys` and merged them into a new structure, so that future porters of `std` can simply mix-and-match the existing code instead of having to copy the same (bad) implementation everywhere. The new structure should become obvious when looking at `sys/thread_local/mod.rs`. Unfortunately, the documentation changes associated with the refactoring have made this PR rather large. That said, this contains no functional changes except for two small ones: * the key-based destructor fallback now, by virtue of sharing the implementation used by macOS and others, stores its list in a `#[thread_local]` static instead of in the key, eliminating one indirection layer and drastically simplifying its code. * I've switched over ZKVM (tier 3) to use the same implementation as WebAssembly, as the implementation was just a way worse version of that Please let me know if I can make this easier to review! I know these large PRs aren't optimal, but I couldn't think of any good intermediate steps. @rustbot label +A-thread-locals
2024-05-02std: move thread parking to `sys::sync`joboet-2/+0
2024-03-12std: move `Once` implementations to `sys`joboet-2/+0
2024-02-20Delete architecture-specific memchr code in std::sysArthur Carcano-4/+0
Currently all architecture-specific memchr code is only used in `std::io`. Most of the actual `memchr` capacity exposed to the user through the slice API is instead implemented in core::slice::memchr. Hence this commit deletes memchr from std::sys[_common] and replace calls to it by calls to core::slice::memchr functions. This deletes (r)memchr from the list of symbols linked to libc.
2024-02-16std: move locks to `sys` on platforms without threadsjoboet-2/+0
2024-02-11Implement sys/thread for UEFIAyush Singh-1/+0
Since UEFI has no concept of threads, most of this module can be ignored. However, implementing parts that make sense. - Implement sleep - Implement available_parallelism Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-02-09Rollup merge of #120776 - joboet:move_pal_path, r=ChrisDentonMatthias Krüger-1/+0
Move path implementations into `sys` Part of #117276. r? `@ChrisDenton`
2024-02-09Implement SystemTime for UEFIAyush Singh-1/+0
- Uses SystemTable->RuntimeServices->GetTime() Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-02-08std: move path into `sys`joboet-1/+0
2024-01-22std: move cmath into `sys`joboet-2/+0
2024-01-15std: move OS String implementation into `sys`joboet-2/+0
2024-01-11std: begin moving platform support modules into `pal`joboet-0/+242