use singleton for epics timer queue manager

This commit is contained in:
Jeff Hill
2002-03-22 21:18:45 +00:00
parent e91791d01c
commit cf3000d8df
3 changed files with 6 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ epicsTimerQueueActiveForC::~epicsTimerQueueActiveForC ()
void epicsTimerQueueActiveForC::release ()
{
queueMgr.release ( *this );
pTimerQueueMgrEPICS->release ( *this );
}
epicsTimerQueuePassiveForC::epicsTimerQueuePassiveForC
@@ -144,7 +144,8 @@ extern "C" epicsTimerQueueId epicsShareAPI
epicsTimerQueueAllocate ( int okToShare, unsigned int threadPriority )
{
try {
epicsTimerQueueActiveForC &tmr = queueMgr.allocate ( okToShare ? true : false, threadPriority );
epicsTimerQueueActiveForC &tmr =
pTimerQueueMgrEPICS->allocate ( okToShare ? true : false, threadPriority );
return &tmr;
}
catch ( ... ) {

View File

@@ -160,7 +160,7 @@ private:
timerQueueActiveMgr & operator = ( const timerQueueActiveMgr & );
};
extern timerQueueActiveMgr queueMgr;
extern epicsSingleton < timerQueueActiveMgr > pTimerQueueMgrEPICS;
class timerQueuePassive : public epicsTimerQueuePassive {
public:

View File

@@ -31,13 +31,13 @@
#define epicsExportSharedSymbols
#include "timerPrivate.h"
timerQueueActiveMgr queueMgr;
epicsSingleton < timerQueueActiveMgr > pTimerQueueMgrEPICS;
epicsTimerQueueActive::~epicsTimerQueueActive () {}
epicsTimerQueueActive &epicsTimerQueueActive::allocate ( bool okToShare, unsigned threadPriority )
{
return queueMgr.allocate ( okToShare, threadPriority );
return pTimerQueueMgrEPICS->allocate ( okToShare, threadPriority );
}
timerQueueActive::timerQueueActive ( bool okToShareIn, unsigned priority ) :