use singleton for epics timer queue manager
This commit is contained in:
@@ -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 ( ... ) {
|
||||
|
||||
@@ -160,7 +160,7 @@ private:
|
||||
timerQueueActiveMgr & operator = ( const timerQueueActiveMgr & );
|
||||
};
|
||||
|
||||
extern timerQueueActiveMgr queueMgr;
|
||||
extern epicsSingleton < timerQueueActiveMgr > pTimerQueueMgrEPICS;
|
||||
|
||||
class timerQueuePassive : public epicsTimerQueuePassive {
|
||||
public:
|
||||
|
||||
@@ -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 ) :
|
||||
|
||||
Reference in New Issue
Block a user