gem5  v19.0.0.0
Public Member Functions | Private Attributes | List of all members
EventQueue::ScopedMigration Class Reference

Temporarily migrate execution to a different event queue. More...

#include <eventq.hh>

Public Member Functions

 ScopedMigration (EventQueue *_new_eq, bool _doMigrate=true)
 
 ~ScopedMigration ()
 

Private Attributes

EventQueuenew_eq
 
EventQueueold_eq
 
bool doMigrate
 

Detailed Description

Temporarily migrate execution to a different event queue.

An instance of this class temporarily migrates execution to a different event queue by releasing the current queue, locking the new queue, and updating curEventQueue(). This can, for example, be useful when performing IO across thread event queues when timing is not crucial (e.g., during fast forwarding).

ScopedMigration does nothing if both eqs are the same

Definition at line 552 of file eventq.hh.

Constructor & Destructor Documentation

◆ ScopedMigration()

EventQueue::ScopedMigration::ScopedMigration ( EventQueue _new_eq,
bool  _doMigrate = true 
)
inline

Definition at line 555 of file eventq.hh.

References curEventQueue().

◆ ~ScopedMigration()

EventQueue::ScopedMigration::~ScopedMigration ( )
inline

Definition at line 566 of file eventq.hh.

References curEventQueue().

Member Data Documentation

◆ doMigrate

bool EventQueue::ScopedMigration::doMigrate
private

Definition at line 578 of file eventq.hh.

◆ new_eq

EventQueue& EventQueue::ScopedMigration::new_eq
private

Definition at line 576 of file eventq.hh.

◆ old_eq

EventQueue& EventQueue::ScopedMigration::old_eq
private

Definition at line 577 of file eventq.hh.


The documentation for this class was generated from the following file:

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