Oh, there's one more thing. Currently, an event technically doesn't have access to the event queue that it was scheduled on. (It is in there if you #define DEBUG though). This makes the idea of a periodic event a little clumsy since you then must pass the event queue as a parameter to the periodic event. I was just thinking of making the eventq of a scheduled event something that it can access. This would allow events to effectively trigger other events. The concern I have for this is that it could break something in a parallel version, but thinking about it, in the process() function, the eventq should be the one that just invoked the process function, so we should be safe. It does still seem dangerous for an event to be able to deschedule() itself though (but then again we could add checks for that.)
I'd also throw out the idea of passing the event queue as a parameter to process(), but that would mean changing a whole lot of code for likely little benefit. It's too bad that there is no way to make process() a valid implementation for process(EventQueue *eventq). Then we could just put the eventq pointer on the stack and if the user wants it, they use it. Perhaps one could do this with member function pointer trickery, but I doubt it. Nate _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
