LLVM  5.0.0
Functions | Variables
CrashRecoveryContext.cpp File Reference
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Config/config.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/ThreadLocal.h"
#include <setjmp.h>
#include <signal.h>
Include dependency graph for CrashRecoveryContext.cpp:

Go to the source code of this file.

Functions

static void installExceptionOrSignalHandlers ()
 
static void uninstallExceptionOrSignalHandlers ()
 
static void CrashRecoverySignalHandler (int Signal)
 
static void setThreadBackgroundPriority ()
 
static bool hasThreadBackgroundPriority ()
 
static void RunSafelyOnThread_Dispatch (void *UserData)
 

Variables

static ManagedStatic< sys::Mutex > gCrashRecoveryContextMutex
 
static bool gCrashRecoveryEnabled = false
 
static ManagedStatic
< sys::ThreadLocal< const
CrashRecoveryContext > > 
tlIsRecoveringFromCrash
 
static const int Signals []
 
static const unsigned NumSignals = array_lengthof(Signals)
 
static struct sigaction PrevActions [NumSignals]
 

Function Documentation

static void CrashRecoverySignalHandler ( int  Signal)
static
static bool hasThreadBackgroundPriority ( )
static
static void installExceptionOrSignalHandlers ( )
static
static void RunSafelyOnThread_Dispatch ( void *  UserData)
static
static void setThreadBackgroundPriority ( )
static

Definition at line 372 of file CrashRecoveryContext.cpp.

Referenced by RunSafelyOnThread_Dispatch().

static void uninstallExceptionOrSignalHandlers ( )
static

Definition at line 339 of file CrashRecoveryContext.cpp.

References NumSignals, PrevActions, and Signals.

Referenced by llvm::CrashRecoveryContext::Disable().

Variable Documentation

ManagedStatic<sys::Mutex> gCrashRecoveryContextMutex
static
bool gCrashRecoveryEnabled = false
static
const unsigned NumSignals = array_lengthof(Signals)
static
struct sigaction PrevActions[NumSignals]
static
const int Signals[]
static
Initial value:
=
{ SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGTRAP }

Definition at line 290 of file CrashRecoveryContext.cpp.

Referenced by installExceptionOrSignalHandlers(), and uninstallExceptionOrSignalHandlers().

ManagedStatic<sys::ThreadLocal<const CrashRecoveryContext> > tlIsRecoveringFromCrash
static