Methods may need to yield control to other Processes when throwing
them exceptions. In that case, we need to keep track of the fact that
the method doesn't need to be restarted when it resumes within yield.
Change-Id: I829c387d6ddb563b2957db47e55adadbbe6bc51a
Reviewed-on: https://gem5-review.googlesource.com/12265
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
_isUnwinding = false;
}
} while (reset);
+ needsStart(true);
}
void
public:
virtual ::sc_core::sc_curr_proc_kind procKind() const = 0;
bool needsStart() const { return _needsStart; }
+ void needsStart(bool ns) { _needsStart = ns; }
bool dynamic() const { return _dynamic; }
bool isUnwinding() const { return _isUnwinding; }
void isUnwinding(bool v) { _isUnwinding = v; }
// Fibers which aren't running should be parked at this line.
_current->fiber()->run();
// If the current process needs to be manually started, start it.
- if (_current && _current->needsStart())
+ if (_current && _current->needsStart()) {
+ _current->needsStart(false);
_current->run();
+ }
}
if (_current && _current->excWrapper) {
// Make sure this isn't a method process.