Deleted Added
sdiff udiff text old ( 13701:d84e5d2979a7 ) new ( 13901:b9329102b1d8 )
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

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

27 * Authors: Gabe Black
28 */
29
30#ifndef __SYSTEMC_CORE_SCHEDULER_HH__
31#define __SYSTEMC_CORE_SCHEDULER_HH__
32
33#include <functional>
34#include <map>
35#include <set>
36#include <vector>
37
38#include "base/logging.hh"
39#include "sim/core.hh"
40#include "sim/eventq.hh"
41#include "systemc/core/channel.hh"
42#include "systemc/core/list.hh"

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

186 void resume(Process *p);
187
188 // Remove a process from the ready/init list if it was on one of them, and
189 // return if it was.
190 bool suspend(Process *p);
191
192 // Schedule an update for a given channel.
193 void requestUpdate(Channel *c);
194
195 // Run the given process immediately, preempting whatever may be running.
196 void
197 runNow(Process *p)
198 {
199 // This function may put a process on the wrong list, ie a thread
200 // the method list. That's fine since that's just a performance
201 // optimization, and the important thing here is how the processes are

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

476
477 ProcessList initList;
478
479 ProcessList readyListMethods;
480 ProcessList readyListThreads;
481
482 ChannelList updateList;
483
484 std::map<::Event *, Tick> eventsToSchedule;
485
486 std::set<TraceFile *> traceFiles;
487
488 void trace(bool delta);
489};
490
491extern Scheduler scheduler;

--- 30 unchanged lines hidden ---