diff options
Diffstat (limited to 'src/systemc/core/process.cc')
-rw-r--r-- | src/systemc/core/process.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/systemc/core/process.cc b/src/systemc/core/process.cc index 7ed187fe1..ad297a23c 100644 --- a/src/systemc/core/process.cc +++ b/src/systemc/core/process.cc @@ -37,16 +37,23 @@ namespace sc_gem5 { SensitivityTimeout::SensitivityTimeout(Process *p, ::sc_core::sc_time t) : - Sensitivity(p), timeoutEvent(this), timeout(t) + Sensitivity(p), timeoutEvent(this), time(t) { - Tick when = scheduler.eventQueue().getCurTick() + timeout.value(); - scheduler.eventQueue().schedule(&timeoutEvent, when); + Tick when = scheduler.getCurTick() + time.value(); + scheduler.schedule(&timeoutEvent, when); } SensitivityTimeout::~SensitivityTimeout() { if (timeoutEvent.scheduled()) - scheduler.eventQueue().deschedule(&timeoutEvent); + scheduler.deschedule(&timeoutEvent); +} + +void +SensitivityTimeout::timeout() +{ + scheduler.eventHappened(); + notify(); } SensitivityEvent::SensitivityEvent( |