Skip to content

Commit

Permalink
suspender: check for suspension points in async threads
Browse files Browse the repository at this point in the history
  • Loading branch information
janweinstock committed Feb 13, 2025
1 parent d1d75da commit 85c37fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/vcml/core/systemc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "vcml/core/systemc.h"
#include "vcml/core/thctl.h"

#include "vcml/debugging/suspender.h"

namespace vcml {

#define SYSC_VERSION_MAJOR SC_VERSION_MAJOR
Expand Down Expand Up @@ -660,6 +662,7 @@ struct async_worker {
notify.notify_one();

while (working) {
debugging::suspender::handle_requests();
u64 p = progress.exchange(0);
sc_thread_pos = sc_time_stamp() + time_from_value(p);
sc_core::wait(time_from_value(p));
Expand Down
3 changes: 0 additions & 3 deletions src/vcml/debugging/suspender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ void suspend_manager::handle_requests() {
is_suspended = false;
}

if (!waiting_suspenders.empty())
on_next_update([&]() { handle_requests(); });

suspender_lock.unlock();
}

Expand Down

0 comments on commit 85c37fd

Please sign in to comment.