File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ unsafe impl<T: Chip> Sync for Registration<T> {}
218218// SAFETY: Registration with and unregistration from the gpio subsystem can happen from any thread.
219219// Additionally, `T::Data` (which is dropped during unregistration) is `Send`, so it is ok to move
220220// `Registration` to different threads.
221+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
221222unsafe impl < T : Chip > Send for Registration < T > { }
222223
223224impl < T : Chip > Default for Registration < T > {
@@ -399,6 +400,7 @@ mod irqchip {
399400 // SAFETY: Registration with and unregistration from the gpio subsystem (including irq chips for
400401 // them) can happen from any thread. Additionally, `T::Data` (which is dropped during
401402 // unregistration) is `Send`, so it is ok to move `Registration` to different threads.
403+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
402404 unsafe impl < T : ChipWithIrqChip > Send for RegistrationWithIrqChip < T > where T :: Data : Send { }
403405
404406 struct FlowHandler < T : ChipWithIrqChip > ( PhantomData < T > ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ pub struct CondVar {
3535}
3636
3737// SAFETY: `CondVar` only uses a `struct wait_queue_head`, which is safe to use on any thread.
38+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
3839unsafe impl Send for CondVar { }
3940
4041// SAFETY: `CondVar` only uses a `struct wait_queue_head`, which is safe to use on multiple threads
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ pub struct Mutex<T: ?Sized> {
4040}
4141
4242// SAFETY: `Mutex` can be transferred across thread boundaries iff the data it protects can.
43+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
4344unsafe impl < T : ?Sized + Send > Send for Mutex < T > { }
4445
4546// SAFETY: `Mutex` serialises the interior mutability it provides, so it is `Sync` as long as the
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ pub struct SeqLock<L: CreatableLock + ?Sized> {
6060
6161// SAFETY: `SeqLock` can be transferred across thread boundaries iff the data it protects and the
6262// underlying lock can.
63+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
6364unsafe impl < L : CreatableLock + Send > Send for SeqLock < L > where L :: Inner : Send { }
6465
6566// SAFETY: `SeqLock` allows concurrent access to the data it protects by both readers and writers,
You can’t perform that action at this time.
0 commit comments