init_signals.cc (10453:d0365cc3d05f) | init_signals.cc (10476:f058e09b7d69) |
---|---|
1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 34 unchanged lines hidden (view full) --- 43 44#include <csignal> 45#include <iostream> 46#include <string> 47 48#include "base/cprintf.hh" 49#include "sim/async.hh" 50#include "sim/core.hh" | 1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 34 unchanged lines hidden (view full) --- 43 44#include <csignal> 45#include <iostream> 46#include <string> 47 48#include "base/cprintf.hh" 49#include "sim/async.hh" 50#include "sim/core.hh" |
51#include "sim/eventq.hh" |
|
51#include "sim/init_signals.hh" 52 53using namespace std; 54 55/// Stats signal handler. 56void 57dumpStatsHandler(int sigtype) 58{ 59 async_event = true; 60 async_statdump = true; | 52#include "sim/init_signals.hh" 53 54using namespace std; 55 56/// Stats signal handler. 57void 58dumpStatsHandler(int sigtype) 59{ 60 async_event = true; 61 async_statdump = true; |
62 /* Wake up some event queue to handle event */ 63 getEventQueue(0)->wakeup(); |
|
61} 62 63void 64dumprstStatsHandler(int sigtype) 65{ 66 async_event = true; 67 async_statdump = true; 68 async_statreset = true; | 64} 65 66void 67dumprstStatsHandler(int sigtype) 68{ 69 async_event = true; 70 async_statdump = true; 71 async_statreset = true; |
72 /* Wake up some event queue to handle event */ 73 getEventQueue(0)->wakeup(); |
|
69} 70 71/// Exit signal handler. 72void 73exitNowHandler(int sigtype) 74{ 75 async_event = true; 76 async_exit = true; | 74} 75 76/// Exit signal handler. 77void 78exitNowHandler(int sigtype) 79{ 80 async_event = true; 81 async_exit = true; |
82 /* Wake up some event queue to handle event */ 83 getEventQueue(0)->wakeup(); |
|
77} 78 79/// Abort signal handler. 80void 81abortHandler(int sigtype) 82{ 83 ccprintf(cerr, "Program aborted at cycle %d\n", curTick()); 84} 85 86// Handle SIGIO 87static void 88ioHandler(int sigtype) 89{ 90 async_event = true; 91 async_io = true; | 84} 85 86/// Abort signal handler. 87void 88abortHandler(int sigtype) 89{ 90 ccprintf(cerr, "Program aborted at cycle %d\n", curTick()); 91} 92 93// Handle SIGIO 94static void 95ioHandler(int sigtype) 96{ 97 async_event = true; 98 async_io = true; |
99 /* Wake up some event queue to handle event */ 100 getEventQueue(0)->wakeup(); |
|
92} 93 94static void 95installSignalHandler(int signal, void (*handler)(int sigtype)) 96{ 97 struct sigaction sa; 98 99 memset(&sa, 0, sizeof(sa)); --- 39 unchanged lines hidden --- | 101} 102 103static void 104installSignalHandler(int signal, void (*handler)(int sigtype)) 105{ 106 struct sigaction sa; 107 108 memset(&sa, 0, sizeof(sa)); --- 39 unchanged lines hidden --- |