We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6824175 commit 3bbd43fCopy full SHA for 3bbd43f
drivers/char/rust_example.rs
@@ -67,9 +67,9 @@ struct SharedState {
67
impl SharedState {
68
fn try_new() -> KernelResult<Arc<Self>> {
69
let state = Arc::try_new(Self {
70
- // SAFETY: Init is called below.
+ // SAFETY: `condvar_init!` is called below.
71
state_changed: unsafe { CondVar::new() },
72
+ // SAFETY: `mutex_init!` is called below.
73
inner: unsafe { Mutex::new(SharedStateInner { token_count: 0 }) },
74
})?;
75
// SAFETY: `state_changed` is pinned behind `Arc`.
0 commit comments