On Wed, Nov 11, 2009 at 10:24 PM, nathan binkert <[email protected]> wrote:
> 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.

Yea, that's exactly the solution I was thinking of when I read the
first paragraph.  It is a lot of code to change, but you could do it
all with one big regex replacement, so I don't think it's that big of
a hurdle.

Steve
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to