File tree Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ unsafe impl<T: Chip> Sync for Registration<T> {}
218
218
// SAFETY: Registration with and unregistration from the gpio subsystem can happen from any thread.
219
219
// Additionally, `T::Data` (which is dropped during unregistration) is `Send`, so it is ok to move
220
220
// `Registration` to different threads.
221
+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
221
222
unsafe impl < T : Chip > Send for Registration < T > { }
222
223
223
224
impl < T : Chip > Default for Registration < T > {
@@ -399,6 +400,7 @@ mod irqchip {
399
400
// SAFETY: Registration with and unregistration from the gpio subsystem (including irq chips for
400
401
// them) can happen from any thread. Additionally, `T::Data` (which is dropped during
401
402
// unregistration) is `Send`, so it is ok to move `Registration` to different threads.
403
+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
402
404
unsafe impl < T : ChipWithIrqChip > Send for RegistrationWithIrqChip < T > where T :: Data : Send { }
403
405
404
406
struct FlowHandler < T : ChipWithIrqChip > ( PhantomData < T > ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ pub struct CondVar {
35
35
}
36
36
37
37
// 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) ]
38
39
unsafe impl Send for CondVar { }
39
40
40
41
// 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> {
40
40
}
41
41
42
42
// SAFETY: `Mutex` can be transferred across thread boundaries iff the data it protects can.
43
+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
43
44
unsafe impl < T : ?Sized + Send > Send for Mutex < T > { }
44
45
45
46
// 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> {
60
60
61
61
// SAFETY: `SeqLock` can be transferred across thread boundaries iff the data it protects and the
62
62
// underlying lock can.
63
+ #[ allow( clippy:: non_send_fields_in_send_ty) ]
63
64
unsafe impl < L : CreatableLock + Send > Send for SeqLock < L > where L :: Inner : Send { }
64
65
65
66
// 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