Add Send/Sync bounds to PeripheralState

This commit is contained in:
Liam Murphy
2021-07-24 12:53:57 +10:00
parent ff9ff5e43a
commit 1b7ad7080e
6 changed files with 44 additions and 24 deletions

View File

@ -48,6 +48,11 @@ impl WakerRegistration {
}
}
// SAFETY: `WakerRegistration` effectively contains an `Option<Waker>`,
// which is `Send` and `Sync`.
unsafe impl Send for WakerRegistration {}
unsafe impl Sync for WakerRegistration {}
pub struct AtomicWaker {
waker: AtomicPtr<TaskHeader>,
}