Deleted Added
sdiff udiff text old ( 13131:bf07048d69e4 ) new ( 13133:41d8cd260825 )
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

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

155void
156Process::suspend(bool inc_kids)
157{
158 if (inc_kids)
159 forEachKid([](Process *p) { p->suspend(true); });
160
161 if (!_suspended) {
162 _suspended = true;
163 _suspendedReady = false;
164 }
165
166 if (procKind() != ::sc_core::SC_METHOD_PROC_ &&
167 scheduler.current() == this) {
168 scheduler.yield();
169 }
170}
171
172void
173Process::resume(bool inc_kids)
174{
175 if (inc_kids)
176 forEachKid([](Process *p) { p->resume(true); });
177
178 if (_suspended) {
179 _suspended = false;
180 if (_suspendedReady)
181 ready();
182 _suspendedReady = false;
183 }
184}
185
186void
187Process::disable(bool inc_kids)
188{
189 if (inc_kids)

--- 240 unchanged lines hidden ---