#include "base/types.hh"
#include "sim/async.hh"
#include "sim/core.hh"
+#include "sim/eventq.hh"
#include "sim/serialize.hh"
using namespace std;
if (set) {
async_event = true;
async_io = true;
+ /* Wake up some event queue to handle event */
+ getEventQueue(0)->wakeup();
}
}
#include "python/swig/pyevent.hh"
#include "sim/async.hh"
+#include "sim/eventq.hh"
PythonEvent::PythonEvent(PyObject *obj, Priority priority)
: Event(priority), object(obj)
// that there's been an exception.
async_event = true;
async_exception = true;
+ /* Wake up some event queue to handle event */
+ getEventQueue(0)->wakeup();
}
// Since the object has been removed from the event queue, its
//! Function for moving events from the async_queue to the main queue.
void handleAsyncInsertions();
+ /**
+ * Function to signal that the event loop should be woken up because
+ * an event has been scheduled by an agent outside the gem5 event
+ * loop(s) whose event insertion may not have been noticed by gem5.
+ * This function isn't needed by the usual gem5 event loop but may
+ * be necessary in derived EventQueues which host gem5 onto other
+ * schedulers.
+ *
+ * @param when Time of a delayed wakeup (if known). This parameter
+ * can be used by an implementation to schedule a wakeup in the
+ * future if it is sure it will remain active until then.
+ * Or it can be ignored and the event queue can be woken up now.
+ */
+ virtual void wakeup(Tick when = (Tick)-1) { }
+
/**
* function for replacing the head of the event queue, so that a
* different set of events can run without disturbing events that have
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string §ion);
#endif
+
+ virtual ~EventQueue() { }
};
void dumpMainQueue();
eventq->reschedule(event, when, always);
}
+ void wakeupEventQueue(Tick when = (Tick)-1)
+ {
+ eventq->wakeup(when);
+ }
+
void setCurTick(Tick newVal) { eventq->setCurTick(newVal); }
};
#include "base/cprintf.hh"
#include "sim/async.hh"
#include "sim/core.hh"
+#include "sim/eventq.hh"
#include "sim/init_signals.hh"
using namespace std;
{
async_event = true;
async_statdump = true;
+ /* Wake up some event queue to handle event */
+ getEventQueue(0)->wakeup();
}
void
async_event = true;
async_statdump = true;
async_statreset = true;
+ /* Wake up some event queue to handle event */
+ getEventQueue(0)->wakeup();
}
/// Exit signal handler.
{
async_event = true;
async_exit = true;
+ /* Wake up some event queue to handle event */
+ getEventQueue(0)->wakeup();
}
/// Abort signal handler.
{
async_event = true;
async_io = true;
+ /* Wake up some event queue to handle event */
+ getEventQueue(0)->wakeup();
}
static void