MCPcopy Index your code
hub / github.com/RustPython/RustPython / faulthandler_disable_internal

Function faulthandler_disable_internal

crates/stdlib/src/faulthandler.rs:734–756  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

732 // faulthandler_disable
733 #[cfg(any(unix, windows))]
734 fn faulthandler_disable_internal() {
735 if !FATAL_ERROR.enabled.swap(false, Ordering::Relaxed) {
736 return;
737 }
738
739 unsafe {
740 for handler in FAULTHANDLER_HANDLERS.iter_mut() {
741 faulthandler_disable_fatal_handler(handler);
742 }
743 }
744
745 // Remove Windows vectored exception handler
746 #[cfg(windows)]
747 {
748 use windows_sys::Win32::System::Diagnostics::Debug::RemoveVectoredExceptionHandler;
749 let h = EXC_HANDLER.swap(0, Ordering::Relaxed);
750 if h != 0 {
751 unsafe {
752 RemoveVectoredExceptionHandler(h as *mut core::ffi::c_void);
753 }
754 }
755 }
756 }
757
758 #[cfg(not(any(unix, windows)))]
759 fn faulthandler_enable_internal() -> bool {

Callers 1

disableFunction · 0.85

Calls 4

swapMethod · 0.45
iter_mutMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected