diff options
Diffstat (limited to 'src/systemc/core/scheduler.cc')
-rw-r--r-- | src/systemc/core/scheduler.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc index d06ddfb58..f1a78198d 100644 --- a/src/systemc/core/scheduler.cc +++ b/src/systemc/core/scheduler.cc @@ -258,6 +258,13 @@ Scheduler::requestUpdate(Channel *c) } void +Scheduler::asyncRequestUpdate(Channel *c) +{ + std::lock_guard<std::mutex> lock(asyncListMutex); + asyncUpdateList.pushLast(c); +} + +void Scheduler::scheduleReadyEvent() { // Schedule the evaluate and update phases. @@ -321,6 +328,12 @@ void Scheduler::runUpdate() { status(StatusUpdate); + { + std::lock_guard<std::mutex> lock(asyncListMutex); + Channel *channel; + while ((channel = asyncUpdateList.getNext()) != nullptr) + updateList.pushLast(channel); + } try { Channel *channel = updateList.getNext(); |