summaryrefslogtreecommitdiff
path: root/rust/kernel/dma.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/dma.rs')
-rw-r--r--rust/kernel/dma.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/kernel/dma.rs b/rust/kernel/dma.rs
index 9d00f9c49f47..8cdc76043ee7 100644
--- a/rust/kernel/dma.rs
+++ b/rust/kernel/dma.rs
@@ -301,6 +301,10 @@ impl<T: AsBytes + FromBytes> Drop for CoherentAllocation<T> {
}
}
+// SAFETY: It is safe to send a `CoherentAllocation` to another thread if `T`
+// can be sent to another thread.
+unsafe impl<T: AsBytes + FromBytes + Send> Send for CoherentAllocation<T> {}
+
/// Reads a field of an item from an allocated region of structs.
///
/// # Examples