10 #ifndef INCLUDED_COMPHELPER_CRASHZONE_H
11 #define INCLUDED_COMPHELPER_CRASHZONE_H
17 #include <type_traits>
41 #if !defined ARM32 || (defined ARM32 && defined __ARM_PCS_VFP)
42 using AtomicCounter = std::atomic<std::make_unsigned_t<std::sig_atomic_t>>;
43 static_assert(AtomicCounter::is_always_lock_free);
45 using AtomicCounter =
volatile std::make_unsigned_t<std::sig_atomic_t>;
59 static void enter() { gnEnterCount++; }
60 static void leave() { gnLeaveCount++; }
68 #endif // INCLUDED_COMPHELPER_CRASHZONE_H
static const AtomicCounter & enterCount()
A generic class for detecting if a given crash or a lock-up came from a specific area of code (such a...
int mnDisableEntries
delays to take various actions in 1/4 of a second increments.
std::atomic< std::make_unsigned_t< std::sig_atomic_t >> AtomicCounter
static AtomicCounter gnEnterCount
how many times have we entered a zone
static AtomicCounter gnLeaveCount
how many times have we left a new zone