diff options
author | Volodymyr Fialko <vfialko@marvell.com> | 2023-09-26 14:05:08 +0200 |
---|---|---|
committer | Volodymyr Fialko <volodymyr.fialko@gmail.com> | 2023-11-09 12:42:50 +0100 |
commit | f04be9849356cf013f4071429f6fd152a8e5e518 (patch) | |
tree | 75684cd5df12810f4c98ed1af59e9e2079c31023 | |
parent | 5f576bd5c2e750b3cf5af4bb8d0d4e1c1f16cefc (diff) | |
download | riscv-isa-sim-f04be9849356cf013f4071429f6fd152a8e5e518.zip riscv-isa-sim-f04be9849356cf013f4071429f6fd152a8e5e518.tar.gz riscv-isa-sim-f04be9849356cf013f4071429f6fd152a8e5e518.tar.bz2 |
fesvr/htif: allow exit on SIGINT.
Currently signal handler would call exit() only on second received
signal, this prevent proper program cleanup.
Instead use signal flag to exit loop.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
-rw-r--r-- | fesvr/htif.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fesvr/htif.cc b/fesvr/htif.cc index 3f93f7b..8b5eb8d 100644 --- a/fesvr/htif.cc +++ b/fesvr/htif.cc @@ -253,7 +253,7 @@ int htif_t::run() std::bind(enq_func, &fromhost_queue, std::placeholders::_1); if (tohost_addr == 0) { - while (true) + while (!signal_exit) idle(); } |