diff options
author | Gabe Black <gabeblack@google.com> | 2018-09-07 16:53:12 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-09 21:43:06 +0000 |
commit | 442d556fbfa85673c9a3be222cb9630ba5b05be1 (patch) | |
tree | 80916cf992900b91591915bb9de2f42e5235eccb /src/systemc/core/sc_module.cc | |
parent | c524f21396457c55435f852bcf0bb4befb91ddba (diff) | |
download | gem5-442d556fbfa85673c9a3be222cb9630ba5b05be1.tar.xz |
systemc: Implement the deprecated "timed_out" function.
This function requires some slightly annoying bookkeeping since it
doesn't just report whether the current process is running as a result
of a timeout, it reports whether it's running as a result of a timeout
*and* it could have been running from some other sensitivity instead.
Pure timeouts don't count as timeouts which makes it harder to handle
in a general way.
Change-Id: I533d97fe66d20d7b83aba80f2ef45a8944668070
Reviewed-on: https://gem5-review.googlesource.com/c/12608
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/sc_module.cc')
-rw-r--r-- | src/systemc/core/sc_module.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/systemc/core/sc_module.cc b/src/systemc/core/sc_module.cc index 2ba0fa221..3cceff119 100644 --- a/src/systemc/core/sc_module.cc +++ b/src/systemc/core/sc_module.cc @@ -361,8 +361,7 @@ sc_module::next_trigger(double d, sc_time_unit u, const sc_event_and_list &eal) bool sc_module::timed_out() { - warn("%s not implemented.\n", __PRETTY_FUNCTION__); - return false; + return ::sc_core::timed_out(); } @@ -561,8 +560,11 @@ next_trigger(double d, sc_time_unit u, const sc_event_and_list &eal) bool timed_out() { - warn("%s not implemented.\n", __PRETTY_FUNCTION__); - return false; + ::sc_gem5::Process *p = sc_gem5::scheduler.current(); + if (!p) + return false; + else + return p->timedOut(); } |