mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Make std::fs::File Send on UEFI
This commit is contained in:
@@ -588,6 +588,11 @@ pub(crate) struct File {
|
||||
path: crate::path::PathBuf,
|
||||
}
|
||||
|
||||
// SAFETY: UEFI has no regular threads, and as per <https://github.com/rust-lang/rust/issues/133604>
|
||||
// std does not support being invoked from "irregular threads" such as interrupt handlers or other
|
||||
// CPU cores that run outside the scope of UEFI.
|
||||
unsafe impl Send for File {}
|
||||
|
||||
impl File {
|
||||
pub(crate) fn from_path(path: &Path, open_mode: u64, attr: u64) -> io::Result<Self> {
|
||||
let absolute = crate::path::absolute(path)?;
|
||||
|
||||
Reference in New Issue
Block a user