Commit 3995c5f0 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

corundum/corundum_bm: print current time on SIGUSR1

parent 3c389a1f
......@@ -41,6 +41,11 @@ static void sigint_handler(int dummy)
exiting = 1;
}
static void sigusr1_handler(int dummy)
{
fprintf(stderr, "main_time = %lu\n", main_time);
}
double sc_time_stamp()
{
return main_time;
......@@ -918,6 +923,7 @@ int main(int argc, char *argv[])
" sync_eth=" << nsparams.sync_eth << std::endl;
signal(SIGINT, sigint_handler);
signal(SIGUSR1, sigusr1_handler);
Vinterface *top = new Vinterface;
......
......@@ -755,12 +755,16 @@ using namespace corundum;
static volatile int exiting = 0;
static void
sigint_handler(int dummy)
static void sigint_handler(int dummy)
{
exiting = 1;
}
static void sigusr1_handler(int dummy)
{
fprintf(stderr, "main_time = %lu\n", main_time);
}
static volatile union cosim_pcie_proto_d2h *
d2h_alloc(void)
{
......@@ -978,6 +982,7 @@ int main(int argc, char *argv[])
signal(SIGINT, sigint_handler);
signal(SIGUSR1, sigusr1_handler);
struct cosim_pcie_proto_dev_intro di;
memset(&di, 0, sizeof(di));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment