mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-27 15:45:44 +00:00
gpio: drop no-longer required unsafe Send/Sync impls
With the refactoring before this commit, `PhysDevice` is `Sync` and `Send` automatically. So let's drop the unsafe impls to prevent future type changes to result in unsound behaviour (again). Fixes: #442 Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
This commit is contained in:
parent
2e4a344c8e
commit
25cba8ea70
@ -96,13 +96,6 @@ pub(crate) struct PhysDevice {
|
||||
state: Vec<Mutex<PhysLineState>>,
|
||||
}
|
||||
|
||||
// SAFETY: Safe as the structure can be sent to another thread.
|
||||
unsafe impl Send for PhysDevice {}
|
||||
|
||||
// SAFETY: Safe as the structure can be shared with another thread as the state
|
||||
// is protected with a lock.
|
||||
unsafe impl Sync for PhysDevice {}
|
||||
|
||||
impl GpioDevice for PhysDevice {
|
||||
fn open(device: u32) -> Result<Self>
|
||||
where
|
||||
|
||||
Loading…
Reference in New Issue
Block a user