event: minor cleanup

Initialize flags via the Event constructor instead of calling
setFlags() in the body of the derived class's constructor.  I
forget exactly why, but this made life easier when implementing
multi-queue support.

Also rename Event::getFlags() to isFlagSet() to better match
common usage, and get rid of some unused Event methods.
This commit is contained in:
Steve Reinhardt
2011-09-22 18:59:55 -07:00
parent ba79155d9d
commit 84f0a1bd91
9 changed files with 23 additions and 41 deletions

View File

@@ -71,9 +71,8 @@ using namespace std;
template <class Impl>
DefaultCommit<Impl>::TrapEvent::TrapEvent(DefaultCommit<Impl> *_commit,
ThreadID _tid)
: Event(CPU_Tick_Pri), commit(_commit), tid(_tid)
: Event(CPU_Tick_Pri, AutoDelete), commit(_commit), tid(_tid)
{
this->setFlags(AutoDelete);
}
template <class Impl>