get_global_mut

Function get_global_mut 

Source
pub fn get_global_mut<T>(p: u64) -> &'static mut T
Expand description

Returns a mutable reference to a global variable of type T from the given pointer.

ยงSafety

The caller must ensure:

  • The pointer p is valid and points to a properly initialized value of type T.
  • The returned reference has a static lifetime, meaning the pointed data must live forever.
  • No other references (mutable or immutable) to the same data exist when using this function.
  • Proper synchronization is used if accessed from multiple threads.