You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uefi-macros: Drop !Send and !Sync from unsafe_protocol macro
Protocols can only be used while boot services are active, and that's already a
single-threaded environment [1], so these negative traits do not have any
effect. (Note that many protocols will still be automatically `!Send`/`!Sync`
due to containing raw pointers.)
In addition, there's nothing particularly special about protocols; we have lots
of structs that are intended for use during boot services and can't be safely
shared between threads. There are no threads to worry about in the UEFI
environment though, so none of them need to be explictly marked `!Send`/`!Sync`.
[1]: https://github.com/rust-lang/rust/blob/4f87a63edcef5c8c06229ff13e0f64f427537378/compiler/rustc_target/src/spec/uefi_msvc_base.rs#L47
0 commit comments