delete timer via timer queue

This commit is contained in:
Jeff Hill
2001-07-11 23:16:34 +00:00
parent 71fa55fd2a
commit 8ffb5e5fb9
11 changed files with 99 additions and 91 deletions

View File

@@ -153,6 +153,23 @@ double timerQueue::process ( const epicsTime & currentTime )
}
}
timer & timerQueue::createTimer ()
{
epicsAutoMutex autoLock ( this->mutex );
void *pBuf = this->timerFreeList.allocate ( sizeof (timer) );
if ( ! pBuf ) {
throw std::bad_alloc();
}
return * new ( pBuf ) timer ( *this );
}
void timerQueue::destroyTimer ( timer & tmr )
{
epicsAutoMutex autoLock ( this->mutex );
tmr.privateCancel ();
this->timerFreeList.release ( &tmr, sizeof( tmr ) );
}
void timerQueue::show ( unsigned level ) const
{
epicsAutoMutex locker ( this->mutex );