gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Functions | Variables
eventq.hh File Reference
#include <algorithm>
#include <cassert>
#include <climits>
#include <functional>
#include <iosfwd>
#include <memory>
#include <mutex>
#include <string>
#include "base/flags.hh"
#include "base/types.hh"
#include "debug/Event.hh"
#include "sim/serialize.hh"

Go to the source code of this file.

Classes

class  EventBase
 Common base class for Event and GlobalEvent, so they can share flag and priority definitions and accessor functions. More...
 
class  Event
 
class  EventQueue
 Queue of events sorted in time order. More...
 
class  EventQueue::ScopedMigration
 Temporarily migrate execution to a different event queue. More...
 
class  EventQueue::ScopedRelease
 Temporarily release the event queue service lock. More...
 
class  EventManager
 
class  EventWrapper< T, F >
 
class  EventFunctionWrapper
 

Functions

EventQueuegetEventQueue (uint32_t index)
 Function for returning eventq queue for the provided index. More...
 
EventQueuecurEventQueue ()
 
void curEventQueue (EventQueue *q)
 
bool operator< (const Event &l, const Event &r)
 
bool operator> (const Event &l, const Event &r)
 
bool operator<= (const Event &l, const Event &r)
 
bool operator>= (const Event &l, const Event &r)
 
bool operator== (const Event &l, const Event &r)
 
bool operator!= (const Event &l, const Event &r)
 
void dumpMainQueue ()
 

Variables

Tick simQuantum
 Simulation Quantum for multiple eventq simulation. More...
 
uint32_t numMainEventQueues
 Current number of allocated main event queues. More...
 
std::vector< EventQueue * > mainEventQueue
 Array for main event queues. More...
 
__thread EventQueue_curEventQueue
 The current event queue for the running thread. More...
 
bool inParallelMode
 Current mode of execution: parallel / serial. More...
 

Function Documentation

◆ curEventQueue() [1/2]

EventQueue* curEventQueue ( )
inline

◆ curEventQueue() [2/2]

void curEventQueue ( EventQueue q)
inline

Definition at line 86 of file eventq.hh.

References _curEventQueue, and ArmISA::q.

◆ dumpMainQueue()

void dumpMainQueue ( )

Definition at line 369 of file eventq.cc.

References ArmISA::i, and numMainEventQueues.

Referenced by EventQueue::~EventQueue().

◆ getEventQueue()

EventQueue* getEventQueue ( uint32_t  index)

Function for returning eventq queue for the provided index.

The function allocates a new queue in case one does not exist for the index, provided that the index is with in bounds.

Definition at line 64 of file eventq.cc.

References csprintf(), MipsISA::index, Event::instanceCounter, and numMainEventQueues.

Referenced by dumprstStatsHandler(), dumpStatsHandler(), exitNowHandler(), StatTest::init(), ioHandler(), pybind_init_event(), and PollQueue::setupAsyncIO().

◆ operator!=()

bool operator!= ( const Event l,
const Event r 
)
inline

Definition at line 449 of file eventq.hh.

References Event::priority(), and Event::when().

◆ operator<()

bool operator< ( const Event l,
const Event r 
)
inline

Definition at line 416 of file eventq.hh.

References Event::priority(), and Event::when().

◆ operator<=()

bool operator<= ( const Event l,
const Event r 
)
inline

Definition at line 430 of file eventq.hh.

References Event::priority(), and Event::when().

◆ operator==()

bool operator== ( const Event l,
const Event r 
)
inline

Definition at line 443 of file eventq.hh.

References Event::priority(), and Event::when().

◆ operator>()

bool operator> ( const Event l,
const Event r 
)
inline

Definition at line 423 of file eventq.hh.

References Event::priority(), and Event::when().

◆ operator>=()

bool operator>= ( const Event l,
const Event r 
)
inline

Definition at line 436 of file eventq.hh.

References Event::priority(), and Event::when().

Variable Documentation

◆ _curEventQueue

__thread EventQueue* _curEventQueue

The current event queue for the running thread.

Access to this queue does not require any locking from the thread.

Definition at line 60 of file eventq.cc.

Referenced by curEventQueue(), and curTick().

◆ inParallelMode

bool inParallelMode

Current mode of execution: parallel / serial.

Definition at line 61 of file eventq.cc.

Referenced by EventQueue::deschedule(), EventQueue::reschedule(), EventQueue::schedule(), and simulate().

◆ mainEventQueue

std::vector<EventQueue *> mainEventQueue

◆ numMainEventQueues

uint32_t numMainEventQueues

◆ simQuantum

Tick simQuantum

Simulation Quantum for multiple eventq simulation.

The quantum value is the period length after which the queues synchronize themselves with each other. This means that any event to scheduled on Queue A which is generated by an event on Queue B should be at least simQuantum ticks away in future.

Definition at line 50 of file eventq.cc.

Referenced by exitSimLoop(), Root::Root(), Stats::schedStatEvent(), and simulate().


Generated on Fri Feb 28 2020 16:27:06 for gem5 by doxygen 1.8.13