Skip to content

Commit

Permalink
Merge pull request raspberrypi#666 from m-falkowski1/impl_send_for_cl…
Browse files Browse the repository at this point in the history
…k_type

rust: clk: implement `Send` trait for `Clk` type
  • Loading branch information
wedsonaf committed May 4, 2022
2 parents 4c984d9 + 243f22f commit f063324
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rust/kernel/clk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ impl Drop for Clk {
}
}

// SAFETY: `Clk` is not restricted to a single thread so it it safe
// to move it between threads.
unsafe impl Send for Clk {}

/// A clock variant that is prepared and enabled.
pub struct EnabledClk(Clk);

Expand Down

0 comments on commit f063324

Please sign in to comment.