> On Nov. 14, 2012, 2:23 p.m., Nathan Binkert wrote: > > src/sim/core.hh, line 46 > > <http://reviews.gem5.org/r/1537/diff/1/?file=31015#file31015line46> > > > > This should become: > > inline Tick curTick { return mainEventQueue.curTick(); } > > > > Nilay Vaish wrote: > This would require making mainEventQueue visible in sim/core.hh. This is > not possible > as of now given the dependency structure of the header files. > > Nathan Binkert wrote: > Yuck. :/ Can you at least name the variable "mainEventQueueCurTick" and > define it on the line below where mainEventQueue is defined in eventq.cc? > I'd at least like it to be very clear what is going on. I'm hoping that some > day it will go away, and if the two are right next to each other, that will > be much easier to accomplish. > > (The location of the declaration in core.hh is fine). > > An alternative is to remove the curTick function from core.hh and move it > into eventq.hh. This might require adding a some #includes to files, but it > would be much better from an encapsulation standpoint.
I'm with Nate on this one, so far... if including eventq.hh here causes a circular dependency, let's fix that rather than doing something suboptimal to the code just to avoid that superficial problem. For example, eventq.hh could be split up into two parts, one with just the basic class definition(s) and the extern mainEventQueue declaration, and another with all the inlined code that I'm sure is what's forcing the other includes. - Steve ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/1537/#review3697 ----------------------------------------------------------- On Nov. 14, 2012, 2:18 p.m., Nilay Vaish wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/1537/ > ----------------------------------------------------------- > > (Updated Nov. 14, 2012, 2:18 p.m.) > > > Review request for Default. > > > Description > ------- > > Changeset 9356:84a9103bd1b7 > --------------------------- > sim: have a curTick per eventq > This patch adds a _curTick variable to an eventq. This variable is updated > whenever an event is serviced in function serviceOne(), or all events upto > a particular time are processed in function serviceEvents(). This change > helps when there are eventqs that do not make use of curTick for scheduling > events. > > > Diffs > ----- > > src/sim/core.hh 0fea324c832c > src/sim/core.cc 0fea324c832c > src/sim/eventq.hh 0fea324c832c > src/sim/eventq.cc 0fea324c832c > src/sim/simulate.cc 0fea324c832c > > Diff: http://reviews.gem5.org/r/1537/diff/ > > > Testing > ------- > > > Thanks, > > Nilay Vaish > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
