Deleted Added
sdiff udiff text old ( 13259:3730df183b84 ) new ( 13260:4d18f1d20093 )
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

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

82 virtual void throw_it(ExceptionWrapperBase &exc, bool inc_kids);
83
84 void injectException(ExceptionWrapperBase &exc);
85 ExceptionWrapperBase *excWrapper;
86
87 void syncResetOn(bool inc_kids);
88 void syncResetOff(bool inc_kids);
89
90 void incref() { refCount++; }
91 void decref() { refCount--; }
92
93 const ::sc_core::sc_event &resetEvent() { return _resetEvent; }
94 const ::sc_core::sc_event &terminatedEvent() { return _terminatedEvent; }
95
96 void setStackSize(size_t size) { stackSize = size; }
97
98 void run();
99
100 void addStatic(StaticSensitivity *);
101 void setDynamic(DynamicSensitivity *);
102 void clearDynamic() { setDynamic(nullptr); }
103
104 ScEvent timeoutEvent;
105 void setTimeout(::sc_core::sc_time t);
106 void cancelTimeout();
107
108 void satisfySensitivity(Sensitivity *);
109
110 void ready();
111
112 virtual Fiber *fiber() { return Fiber::primaryFiber(); }
113
114 static Process *newest() { return _newest; }
115
116 void lastReport(::sc_core::sc_report *report);
117 ::sc_core::sc_report *lastReport() const;
118
119 bool hasStaticSensitivities() { return !staticSensitivities.empty(); }
120 bool internal() { return _internal; }
121 bool timedOut() { return _timedOut; }
122 bool syncReset() { return _syncReset; }
123
124 bool dontInitialize() { return _dontInitialize; }
125 void dontInitialize(bool di) { _dontInitialize = di; }
126
127 void joinWait(::sc_core::sc_join *join) { joinWaiters.push_back(join); }
128
129 protected:
130 void timeout();
131
132 Process(const char *name, ProcessFuncWrapper *func, bool internal=false);
133
134 static Process *_newest;
135
136 virtual ~Process()

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

165 void terminate();
166
167 bool _suspended;
168 bool _suspendedReady;
169 bool _disabled;
170
171 bool _syncReset;
172
173 int refCount;
174
175 size_t stackSize;
176
177 StaticSensitivities staticSensitivities;
178 DynamicSensitivity *dynamicSensitivity;
179
180 std::unique_ptr<::sc_core::sc_report> _lastReport;
181
182 std::vector<::sc_core::sc_join *> joinWaiters;
183};
184
185} // namespace sc_gem5
186
187#endif //__SYSTEMC_CORE_PROCESS_HH__