systemc: Ensure sc_stop during callbacks actually stops.
authorGabe Black <gabeblack@google.com>
Tue, 4 Sep 2018 22:09:48 +0000 (15:09 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 3 Oct 2018 00:53:04 +0000 (00:53 +0000)
commitfc0e22461e51eebcc6919672802fd9f1a3bc860c
tree3de2cd0fd28d24ba02aa6eec551424bb129e8001
parent9da2cdd3783abecbc3ccf4a74b3b928eab65fae2
systemc: Ensure sc_stop during callbacks actually stops.

Make sure calling sc_stop during the appropriate callbacks will
actually skip future action by skipping later callbacks, by flushing
the scheduler before running init (so it doesn't really do anything
but record that it's in running mode now), and schedule the stop event.

Change-Id: I5edfbceda457df88d15bfcac4d97e8578205ec5b
Reviewed-on: https://gem5-review.googlesource.com/c/12468
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
src/systemc/core/kernel.cc