Deleted Added
sdiff udiff text old ( 12962:004cc9133bd6 ) new ( 12985:ec84697e4e63 )
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

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

182 // Get the current time according to gem5.
183 Tick getCurTick() { return eq ? eq->getCurTick() : 0; }
184
185 // For scheduling delayed/timed notifications/timeouts.
186 void
187 schedule(::Event *event, Tick tick)
188 {
189 pendingTicks[tick]++;
190 eq->schedule(event, tick);
191 }
192
193 // For descheduling delayed/timed notifications/timeouts.
194 void
195 deschedule(::Event *event)
196 {
197 auto it = pendingTicks.find(event->when());
198 if (--it->second == 0)
199 pendingTicks.erase(it);
200 eq->deschedule(event);
201 }
202
203 // Tell the scheduler than an event fired for bookkeeping purposes.
204 void
205 eventHappened()
206 {
207 auto it = pendingTicks.begin();
208 if (--it->second == 0)

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

297
298 bool initReady;
299
300 ProcessList initList;
301 ProcessList toFinalize;
302 ProcessList readyList;
303
304 ChannelList updateList;
305};
306
307extern Scheduler scheduler;
308
309} // namespace sc_gem5
310
311#endif // __SYSTEMC_CORE_SCHEDULER_H__