Go to the documentation of this file.
44 #include <sys/types.h>
51 #if defined(__FreeBSD__)
52 #include <sys/param.h>
73 #if defined(__FreeBSD__) && (__FreeBSD_version < 1100097)
81 return sigaltstack(&
stack, NULL) == 0;
86 int flags = SA_RESTART)
90 memset(&
sa, 0,
sizeof(
sa));
91 sigemptyset(&
sa.sa_mask);
92 sa.sa_handler = handler;
95 if (sigaction(signal, &
sa, NULL) == -1)
96 panic(
"Failed to setup handler for signal %i\n", signal);
105 pthread_kill(pthread_self(), signo);
109 STATIC_ERR(
"Failed to execute default signal handler!\n");
149 ccprintf(cerr,
"Program aborted at tick %llu\n",
eq->getCurTick());
162 STATIC_ERR(
"gem5 has encountered a segmentation fault!\n\n");
187 signal(SIGFPE, SIG_IGN);
206 SA_RESETHAND | SA_NODEFER | SA_ONSTACK);
208 warn(
"Failed to setup stack for SIGSEGV handler, "
209 "using default signal handler.\n");
volatile bool async_event
Some asynchronous event has happened.
volatile bool async_io
Async I/O request (SIGIO).
EventQueue * getEventQueue(uint32_t index)
Function for returning eventq queue for the provided index.
void abortHandler(int sigtype)
Abort signal handler.
volatile bool async_statdump
Async request to dump stats.
void dumpStatsHandler(int sigtype)
Stats signal handler.
volatile bool async_exit
Async request to exit simulator.
void exitNowHandler(int sigtype)
Exit signal handler.
static void installSignalHandler(int signal, void(*handler)(int sigtype), int flags=SA_RESTART)
virtual void wakeup(Tick when=(Tick) -1)
Function to signal that the event loop should be woken up because an event has been scheduled by an a...
static void segvHandler(int sigtype)
Segmentation fault signal handler.
static bool setupAltStack()
volatile bool async_statreset
Async request to reset stats.
#define STATIC_ERR(m)
Statically allocate a string and write it to STDERR.
EventQueue * curEventQueue()
static void ioHandler(int sigtype)
Overload hash function for BasicBlockRange type.
static void raiseFatalSignal(int signo)
static uint8_t fatalSigStack[2 *SIGSTKSZ]
void ccprintf(cp::Print &print)
Queue of events sorted in time order.
void dumprstStatsHandler(int sigtype)
void print_backtrace()
Print a gem5 post-mortem report.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17