Please define a STATIC_KEY_INIT_FALSE constant in
rust/kernel/jump_label.rs and refer to it. You can use mem::zeroed()
in the definition of the constant.
No, we can't use mutable references like this. In Rust, the real
meaning of &mut is exclusive, not mutable. (And the real meaning of &
is shared.) We don't have exclusive access to the DEBUG_INFO static
here - the access is shared, so we must use &_ references instead of
&mut _ references here.
Note that by using Opaque, it's possible to mutate the value even if
it's behind a &_ reference.
#[repr(transparent)]
pub struct _Ddebug {
pub inner: Opaque<bindings::_ddebug>,
}
and then you can do DEBUG_INFO.inner.get() to obtain a mutable raw
pointer to the contents.