Deleted Added
sdiff udiff text old ( 13209:aad30faa966b ) new ( 13244:deedec45898f )
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

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

188 if (_stopNow)
189 return;
190
191 if (p->procKind() == ::sc_core::SC_METHOD_PROC_)
192 readyListMethods.pushLast(p);
193 else
194 readyListThreads.pushLast(p);
195
196 if (!inEvaluate())
197 scheduleReadyEvent();
198}
199
200void
201Scheduler::resume(Process *p)
202{
203 if (initDone)
204 ready(p);
205 else

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

230 }
231 return was_ready;
232}
233
234void
235Scheduler::requestUpdate(Channel *c)
236{
237 updateList.pushLast(c);
238 if (!inEvaluate())
239 scheduleReadyEvent();
240}
241
242void
243Scheduler::scheduleReadyEvent()
244{
245 // Schedule the evaluate and update phases.
246 if (!readyEvent.scheduled()) {
247 schedule(&readyEvent);

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

271 yield();
272 } while (getNextReady());
273
274 if (!empty) {
275 _numCycles++;
276 _changeStamp++;
277 }
278
279 if (_stopNow) {
280 status(StatusOther);
281 return;
282 }
283
284 runUpdate();
285 runDelta();
286
287 if (!runToTime && starved())
288 scheduleStarvationEvent();
289
290 if (runOnce)

--- 186 unchanged lines hidden ---