Skip to content

Commit

Permalink
each list insert must be matched with an object in sstall
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanohar committed Feb 4, 2023
1 parent 09e6802 commit c16f083
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions chpsim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ int ChpSim::Step (Event *ev)
int _breakpt = 0;

if (pc == MAX_LOCAL_PCS) {
// wake-up from a shared variable scenario
Assert (!list_isempty (_stalled_pc), "What?");
pc = list_delete_ihead (_stalled_pc);
}
Expand Down Expand Up @@ -1560,13 +1561,11 @@ int ChpSim::Step (Event *ev)
forceret = 1;
if ((stmt->u.cond.is_shared || stmt->u.cond.is_probe) &&
(_add_waitcond (&stmt->u.cond.c, pc) || stmt->u.cond.is_shared)) {
if (list_isempty (_stalled_pc)) {
#ifdef DUMP_ALL
printf (" [stall-sh]");
#endif
sStall ();
}
list_iappend (_stalled_pc, pc);
list_iappend (_stalled_pc, pc);
}
else {
if (!_probe) {
Expand Down

0 comments on commit c16f083

Please sign in to comment.