Skip to content

Commit f063324

Browse files
authored
Merge pull request #666 from m-falkowski1/impl_send_for_clk_type
rust: clk: implement `Send` trait for `Clk` type
2 parents 4c984d9 + 243f22f commit f063324

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rust/kernel/clk.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ impl Drop for Clk {
4747
}
4848
}
4949

50+
// SAFETY: `Clk` is not restricted to a single thread so it it safe
51+
// to move it between threads.
52+
unsafe impl Send for Clk {}
53+
5054
/// A clock variant that is prepared and enabled.
5155
pub struct EnabledClk(Clk);
5256

0 commit comments

Comments
 (0)