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
--- 319 unchanged lines hidden (view full) ---
328 }
329
330 // Run scheduled channel updates.
331 void runUpdate();
332
333 // Run delta events.
334 void runDelta();
335
336 void setScMainFiber(Fiber *sc_main) { scMain = sc_main; }
337
338 void start(Tick max_tick, bool run_to_time);
339 void oneCycle();
340
341 void schedulePause();
342 void scheduleStop(bool finish_delta);
343
344 enum Status
345 {
--- 75 unchanged lines hidden (view full) ---
421 EventWrapper<Scheduler, &Scheduler::runReady> readyEvent;
422 void scheduleReadyEvent();
423
424 void pause();
425 void stop();
426 EventWrapper<Scheduler, &Scheduler::pause> pauseEvent;
427 EventWrapper<Scheduler, &Scheduler::stop> stopEvent;
428
429 Fiber *scMain;
430 const ::sc_core::sc_report *_throwToScMain;
431
432 bool
433 starved()
434 {
435 return (readyListMethods.empty() && readyListThreads.empty() &&
436 updateList.empty() && deltas.empty() &&
437 (timeSlots.empty() || timeSlots.begin()->first > maxTick) &&
--- 85 unchanged lines hidden ---
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
--- 319 unchanged lines hidden (view full) ---
328 }
329
330 // Run scheduled channel updates.
331 void runUpdate();
332
333 // Run delta events.
334 void runDelta();
335
336 void setScMainFiber(Fiber *sc_main) { scMain = sc_main; }
337
338 void start(Tick max_tick, bool run_to_time);
339 void oneCycle();
340
341 void schedulePause();
342 void scheduleStop(bool finish_delta);
343
344 enum Status
345 {
--- 75 unchanged lines hidden (view full) ---
421 EventWrapper<Scheduler, &Scheduler::runReady> readyEvent;
422 void scheduleReadyEvent();
423
424 void pause();
425 void stop();
426 EventWrapper<Scheduler, &Scheduler::pause> pauseEvent;
427 EventWrapper<Scheduler, &Scheduler::stop> stopEvent;
428
429 Fiber *scMain;
430 const ::sc_core::sc_report *_throwToScMain;
431
432 bool
433 starved()
434 {
435 return (readyListMethods.empty() && readyListThreads.empty() &&
436 updateList.empty() && deltas.empty() &&
437 (timeSlots.empty() || timeSlots.begin()->first > maxTick) &&
--- 85 unchanged lines hidden ---