Deleted Added
sdiff udiff text old ( 12952:94fca7e8120b ) new ( 12953:ddfd5e4643a9 )
full compact
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "systemc/core/process.hh"
31
32namespace sc_gem5
33{
34
35class UnwindExceptionReset : public ::sc_core::sc_unwind_exception
36{
37 public:
38 const char *what() const throw() override { return "RESET"; }

--- 35 unchanged lines hidden (view full) ---

74 if (inc_kids)
75 forEachKid([](Process *p) { p->suspend(true); });
76
77 if (!_suspended) {
78 _suspended = true;
79 //TODO Suspend this process.
80 }
81
82 if (procKind() != ::sc_core::SC_METHOD_PROC_ /* && we're running */) {
83 // We suspended this thread or cthread. Stop running.
84 }
85}
86
87void
88Process::resume(bool inc_kids)
89{
90 if (inc_kids)
91 forEachKid([](Process *p) { p->resume(true); });

--- 92 unchanged lines hidden (view full) ---

184{
185 if (inc_kids)
186 forEachKid([](Process *p) { p->syncResetOff(true); });
187
188 _syncReset = false;
189}
190
191void
192Thread::throw_it(ExceptionWrapperBase &exc, bool inc_kids)
193{
194 Process::throw_it(exc, inc_kids);
195
196 if (_terminated)
197 return;
198
199 injectException(exc);
200}
201
202void
203throw_it_wrapper(Process *p, ExceptionWrapperBase &exc, bool inc_kids)
204{
205 p->throw_it(exc, inc_kids);
206}
207
208} // namespace sc_gem5