LLVM  8.0.1
Functions | Variables
CrashRecoveryContext.cpp File Reference
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Config/llvm-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::MutexgCrashRecoveryContextMutex
 
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

◆ CrashRecoverySignalHandler()

static void CrashRecoverySignalHandler ( int  Signal)
static

◆ hasThreadBackgroundPriority()

static bool hasThreadBackgroundPriority ( )
static

◆ installExceptionOrSignalHandlers()

static void installExceptionOrSignalHandlers ( )
static

◆ RunSafelyOnThread_Dispatch()

static void RunSafelyOnThread_Dispatch ( void *  UserData)
static

◆ setThreadBackgroundPriority()

static void setThreadBackgroundPriority ( )
static

Definition at line 372 of file CrashRecoveryContext.cpp.

Referenced by RunSafelyOnThread_Dispatch().

◆ uninstallExceptionOrSignalHandlers()

static void uninstallExceptionOrSignalHandlers ( )
static

Variable Documentation

◆ gCrashRecoveryContextMutex

ManagedStatic<sys::Mutex> gCrashRecoveryContextMutex
static

Definition at line 75 of file CrashRecoveryContext.cpp.

◆ gCrashRecoveryEnabled

bool gCrashRecoveryEnabled = false
static

Definition at line 76 of file CrashRecoveryContext.cpp.

◆ NumSignals

const unsigned NumSignals = array_lengthof(Signals)
static

◆ PrevActions

struct sigaction PrevActions[NumSignals]
static

◆ Signals

const int Signals[]
static
Initial value:
=
{ SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGTRAP }

Definition at line 290 of file CrashRecoveryContext.cpp.

◆ tlIsRecoveringFromCrash

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