47void register_shutdown_handler() {
54#if defined(__GNUC__) || defined(__clang__)
59__attribute__((constructor(101)))
60static
void early_register_shutdown_handler() {
61 register_shutdown_handler();
64#elif defined(_MSC_VER)
68#pragma section(".CRT$XCU", read)
71static void __cdecl msvc_register_shutdown_handler() {
72 register_shutdown_handler();
77__declspec(allocate(
".CRT$XCU"))
78static
void (__cdecl *p_msvc_register_shutdown_handler)() = msvc_register_shutdown_handler;
84struct ShutdownHandlerRegistrar {
85 ShutdownHandlerRegistrar() {
86 register_shutdown_handler();
89static ShutdownHandlerRegistrar shutdown_handler_registrar;
static void prepare_shutdown()
Prepare for process shutdown.
Internal logging interface for the thread system.