  __attribute__((cleanup(_critical_section_cleanup))) bool _disabled = critical_section_start();

// Disables all interrupts across all lines/inputs. Returns true if the function disabled
// interrupts.
bool critical_section_start(void);

// Enables all registered interrupts on all lines/inputs. Passing true to this function can be used
// to forcibly end all critical sections.
void critical_section_end(bool disabled_in_scope);

// Internal use only - do not call outside of CRITICAL_SECTION_AUTOEND
void _critical_section_cleanup(bool *disabled_in_scope);
