diff options
| author | Ayush Singh <ayushsingh1325@gmail.com> | 2023-01-28 23:37:54 +0530 |
|---|---|---|
| committer | Ayush Singh <ayushdevel1325@gmail.com> | 2023-09-22 17:23:32 +0530 |
| commit | 8e56b33d59593a99fdef6f73f0c1a09a012ca907 (patch) | |
| tree | ffe5d79a7580b77d40b397756fa5be013a5ded0c /library/std/src/os/uefi/env.rs | |
| parent | 48c6ae0611ec6fb4094a24610982ddefde16e20f (diff) | |
| download | rust-8e56b33d59593a99fdef6f73f0c1a09a012ca907.tar.gz rust-8e56b33d59593a99fdef6f73f0c1a09a012ca907.zip | |
Fixes from PR
Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Diffstat (limited to 'library/std/src/os/uefi/env.rs')
| -rw-r--r-- | library/std/src/os/uefi/env.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/library/std/src/os/uefi/env.rs b/library/std/src/os/uefi/env.rs index 479ff5f6975..71bf0ff8ff3 100644 --- a/library/std/src/os/uefi/env.rs +++ b/library/std/src/os/uefi/env.rs @@ -1,5 +1,7 @@ //! UEFI-specific extensions to the primitives in `std::env` module +#![unstable(feature = "uefi_std", issue = "100499")] + use crate::ffi::c_void; use crate::ptr::NonNull; use crate::sync::atomic::{AtomicPtr, Ordering}; @@ -22,21 +24,18 @@ static GLOBALS: OnceLock<(AtomicPtr<c_void>, AtomicPtr<c_void>)> = OnceLock::new /// standard library is loaded. /// /// This function must not be called more than once. -#[unstable(feature = "uefi_std", issue = "100499")] pub unsafe fn init_globals(handle: NonNull<c_void>, system_table: NonNull<c_void>) { GLOBALS.set((AtomicPtr::new(system_table.as_ptr()), AtomicPtr::new(handle.as_ptr()))).unwrap() } /// Get the SystemTable Pointer. -/// Note: This function panics if the System Table and Image Handle is Not initialized -#[unstable(feature = "uefi_std", issue = "100499")] +/// Note: This function panics if the System Table or Image Handle is not initialized pub fn system_table() -> NonNull<c_void> { try_system_table().unwrap() } -/// Get the SystemHandle Pointer. -/// Note: This function panics if the System Table and Image Handle is Not initialized -#[unstable(feature = "uefi_std", issue = "100499")] +/// Get the ImageHandle Pointer. +/// Note: This function panics if the System Table or Image Handle is not initialized pub fn image_handle() -> NonNull<c_void> { try_image_handle().unwrap() } |
