--- a/src/simulator/scheduler-map.cc Tue Dec 12 14:30:44 2006 +0100
+++ b/src/simulator/scheduler-map.cc Tue Dec 12 14:31:16 2006 +0100
@@ -43,6 +43,29 @@
SchedulerMap::~SchedulerMap ()
{}
+/* Note the invariants which this function must provide:
+ * - irreflexibility: f (x,x) is false)
+ * - antisymmetry: f(x,y) = !f(y,x)
+ * - transitivity: f(x,y) and f(y,z) => f(x,z)
+ */
+bool
+SchedulerMap::EventKeyCompare::operator () (struct EventKey a, struct EventKey b)
+{
+ if (a.m_ns < b.m_ns)
+ {
+ return true;
+ }
+ else if (a.m_ns == b.m_ns && a.m_uid < b.m_uid)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+
EventId
SchedulerMap::RealInsert (EventImpl *event, Scheduler::EventKey key)