From d2e1828714916e9e2a0d2477386b2d594b8fe474 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 1 May 2013 21:11:05 -0700 Subject: [PATCH] gracefully kill htif thread, fixing tty stuff --- csrc/emulator.cc | 2 ++ csrc/vcs_main.cc | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/csrc/emulator.cc b/csrc/emulator.cc index c5d408b3..35bfaccb 100644 --- a/csrc/emulator.cc +++ b/csrc/emulator.cc @@ -176,6 +176,8 @@ int main(int argc, char** argv) if (vcd) fclose(vcdfile); + delete htif; + if (failure) { fprintf(logfile, "*** FAILED *** (%s) after %lld cycles\n", failure, (long long)trace_count); diff --git a/csrc/vcs_main.cc b/csrc/vcs_main.cc index 00bbf270..862621cb 100644 --- a/csrc/vcs_main.cc +++ b/csrc/vcs_main.cc @@ -101,6 +101,11 @@ void htif_init htif = new htif_emulator_t(args); } +void htif_fini() +{ + delete htif; +} + void htif_tick ( vc_handle htif_in_valid,