Function compiler_interrupts::register_enable_hook [−][src]
pub unsafe fn register_enable_hook(hook: fn())
Expand description
Registers a hook when enabling Compiler Interrupts.
This function takes a function pointer to be called after enabling Compiler Interrupts.
Compiler Interrupts can be enabled by calling enable
.
Note
This function is thread-specific, which means it only registers on the thread they called on.
This function should not be called multiple times. Consecutive calls will override the previous hook.
Safety
This function mutates a thread-local static variable which uses for the hook. Thread unsafety will not be introduced. Rust considers mutating static variable unsafe.