diff --git a/src/ca/CASG.cpp b/src/ca/CASG.cpp index 572af868f..18f3997ed 100644 --- a/src/ca/CASG.cpp +++ b/src/ca/CASG.cpp @@ -36,6 +36,11 @@ #include "autoPtrDestroy.h" #include "cac.h" +template class tsFreeList < CASG, 128 >; +template class epicsSingleton < tsFreeList < struct CASG, 128 > >; +template class tsFreeList < syncGroupReadNotify, 128, epicsMutexNOOP >; +template class tsFreeList < syncGroupWriteNotify, 128, epicsMutexNOOP >; + epicsSingleton < tsFreeList < struct CASG, 128 > > CASG::pFreeList; CASG::CASG ( oldCAC &cacIn ) : diff --git a/src/ca/bhe.cpp b/src/ca/bhe.cpp index b460e0891..4c7d800df 100644 --- a/src/ca/bhe.cpp +++ b/src/ca/bhe.cpp @@ -21,6 +21,9 @@ #include "virtualCircuit.h" #include "bhe.h" +template class tsFreeList < bhe, 1024 >; +template class epicsSingleton < tsFreeList < bhe, 1024 > >; + epicsSingleton < tsFreeList < class bhe, 1024 > > bhe::pFreeList; void * bhe::operator new ( size_t size ) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index b91afc1e9..524988166 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -37,6 +37,18 @@ #include "bhe.h" #include "net_convert.h" +template class resTable < nciu, chronIntId >; +template class chronIntIdResTable < nciu >; +template class resTable < baseNMIU, chronIntId >; +template class chronIntIdResTable < baseNMIU >; +template class resTable < CASG, chronIntId >; +template class chronIntIdResTable < CASG >; +template class resTable < bhe, inetAddrID >; +template class resTable < tcpiiu, caServerID >; +template class tsFreeList < netReadNotifyIO, 1024, epicsMutexNOOP >; +template class tsFreeList < netWriteNotifyIO, 1024, epicsMutexNOOP >; +template class tsFreeList < netSubscription, 1024, epicsMutexNOOP >; + // TCP response dispatch table const cac::pProtoStubTCP cac::tcpJumpTableCAC [] = { diff --git a/src/ca/cacServiceList.cpp b/src/ca/cacServiceList.cpp index 1c44e238a..35ef5c8a3 100644 --- a/src/ca/cacServiceList.cpp +++ b/src/ca/cacServiceList.cpp @@ -21,6 +21,8 @@ #include "epicsGuard.h" #include "cacIO.h" +template class epicsSingleton < cacServiceList >; + epicsShareDef epicsSingleton < cacServiceList > pGlobalServiceListCAC; cacServiceList::cacServiceList () diff --git a/src/ca/comBuf.cpp b/src/ca/comBuf.cpp index 6c54ee375..193e45fee 100644 --- a/src/ca/comBuf.cpp +++ b/src/ca/comBuf.cpp @@ -19,6 +19,9 @@ #include "iocinf.h" #include "comBuf.h" +template class tsFreeList < comBuf, 0x20 >; +template class epicsSingleton < tsFreeList < comBuf, 0x20 > >; + epicsSingleton < tsFreeList < class comBuf, 0x20 > > comBuf::pFreeList; bool comBuf::flushToWire ( wireSendAdapter &wire ) diff --git a/src/ca/getCallback.cpp b/src/ca/getCallback.cpp index fba722c00..a8e3b59d1 100644 --- a/src/ca/getCallback.cpp +++ b/src/ca/getCallback.cpp @@ -19,6 +19,9 @@ #include "iocinf.h" #include "oldAccess.h" +template class tsFreeList < getCallback, 1024 >; +template class epicsSingleton < tsFreeList < getCallback, 1024 > >; + epicsSingleton < tsFreeList < class getCallback, 1024 > > getCallback::pFreeList; getCallback::getCallback ( oldChannelNotify &chanIn, diff --git a/src/ca/getCopy.cpp b/src/ca/getCopy.cpp index 583d0a10a..78b8b68e6 100644 --- a/src/ca/getCopy.cpp +++ b/src/ca/getCopy.cpp @@ -22,6 +22,9 @@ #include "oldAccess.h" #include "cac.h" +template class tsFreeList < getCopy, 1024 >; +template class epicsSingleton < tsFreeList < getCopy, 1024 > >; + epicsSingleton < tsFreeList < class getCopy, 1024 > > getCopy::pFreeList; getCopy::getCopy ( oldCAC &cacCtxIn, oldChannelNotify &chanIn, diff --git a/src/ca/hostNameCache.cpp b/src/ca/hostNameCache.cpp index b3f3acc81..928885bfc 100644 --- a/src/ca/hostNameCache.cpp +++ b/src/ca/hostNameCache.cpp @@ -21,6 +21,9 @@ #include "iocinf.h" #include "hostNameCache.h" +template class tsFreeList < hostNameCache, 16 >; +template class epicsSingleton < tsFreeList < hostNameCache, 16 > >; + epicsSingleton < tsFreeList < hostNameCache, 16 > > hostNameCache::pFreeList; hostNameCache::hostNameCache ( const osiSockAddr &addr, ipAddrToAsciiEngine &engine ) : diff --git a/src/ca/msgForMultiplyDefinedPV.cpp b/src/ca/msgForMultiplyDefinedPV.cpp index 47ad593c5..f258f71cb 100644 --- a/src/ca/msgForMultiplyDefinedPV.cpp +++ b/src/ca/msgForMultiplyDefinedPV.cpp @@ -25,6 +25,9 @@ #include "caerr.h" // for ECA_DBLCHNL #undef epicsExportSharedSymbols +template class tsFreeList < msgForMultiplyDefinedPV, 16 >; +template class epicsSingleton < tsFreeList < msgForMultiplyDefinedPV, 16 > >; + epicsSingleton < tsFreeList < class msgForMultiplyDefinedPV, 16 > > msgForMultiplyDefinedPV::pFreeList; diff --git a/src/ca/nciu.cpp b/src/ca/nciu.cpp index ebf01b680..429fe9098 100644 --- a/src/ca/nciu.cpp +++ b/src/ca/nciu.cpp @@ -31,6 +31,9 @@ #include "cadef.h" #include "db_access.h" // for INVALID_DB_REQ +template class tsFreeList < class nciu, 1024 >; +template class epicsSingleton < tsFreeList < class nciu, 1024 > >; + epicsSingleton < tsFreeList < class nciu, 1024 > > nciu::pFreeList; nciu::nciu ( cac & cacIn, netiiu & iiuIn, cacChannelNotify & chanIn, diff --git a/src/ca/oldChannelNotify.cpp b/src/ca/oldChannelNotify.cpp index 33c034f30..d86a78c32 100644 --- a/src/ca/oldChannelNotify.cpp +++ b/src/ca/oldChannelNotify.cpp @@ -21,6 +21,9 @@ #include "oldAccess.h" #include "cac.h" +template class tsFreeList < oldChannelNotify, 1024 >; +template class epicsSingleton < tsFreeList < oldChannelNotify, 1024 > >; + epicsSingleton < tsFreeList < struct oldChannelNotify, 1024 > > oldChannelNotify::pFreeList; extern "C" void cacNoopConnHandler ( struct connection_handler_args ) diff --git a/src/ca/oldSubscription.cpp b/src/ca/oldSubscription.cpp index 8e8a9e0c0..05124c06b 100644 --- a/src/ca/oldSubscription.cpp +++ b/src/ca/oldSubscription.cpp @@ -14,6 +14,9 @@ #include "iocinf.h" #include "oldAccess.h" +template class tsFreeList < oldSubscription, 1024 >; +template class epicsSingleton < tsFreeList < oldSubscription, 1024 > >; + epicsSingleton < tsFreeList < struct oldSubscription, 1024 > > oldSubscription::pFreeList; oldSubscription::~oldSubscription () diff --git a/src/ca/putCallback.cpp b/src/ca/putCallback.cpp index 77b009a56..47b25c314 100644 --- a/src/ca/putCallback.cpp +++ b/src/ca/putCallback.cpp @@ -19,6 +19,9 @@ #include "iocinf.h" #include "oldAccess.h" +template class tsFreeList < class putCallback, 1024 >; +template class epicsSingleton < tsFreeList < class putCallback, 1024 > >; + epicsSingleton < tsFreeList < class putCallback, 1024 > > putCallback::pFreeList; putCallback::putCallback ( oldChannelNotify &chanIn, diff --git a/src/ca/repeater.cpp b/src/ca/repeater.cpp index 449fc6c43..a9e5029de 100644 --- a/src/ca/repeater.cpp +++ b/src/ca/repeater.cpp @@ -100,6 +100,9 @@ private: */ static tsDLList < repeaterClient > client_list; +template class tsFreeList < repeaterClient, 0x20 >; +template class epicsSingleton < tsFreeList < repeaterClient, 0x20 > >; + epicsSingleton < tsFreeList < repeaterClient, 0x20 > > repeaterClient::pFreeList; static char buf [MAX_UDP_RECV]; diff --git a/src/db/dbChannelIO.cpp b/src/db/dbChannelIO.cpp index 13c333d6f..469589c49 100644 --- a/src/db/dbChannelIO.cpp +++ b/src/db/dbChannelIO.cpp @@ -30,6 +30,9 @@ #include "dbChannelIOIL.h" #include "dbPutNotifyBlocker.h" +template tsFreeList < dbChannelIO >; +template class epicsSingleton < tsFreeList < dbChannelIO > >; + epicsSingleton < tsFreeList < dbChannelIO > > dbChannelIO::pFreeList; dbChannelIO::dbChannelIO ( cacChannelNotify ¬ify, diff --git a/src/db/dbPutNotifyBlocker.cpp b/src/db/dbPutNotifyBlocker.cpp index 98378ab69..867d21032 100644 --- a/src/db/dbPutNotifyBlocker.cpp +++ b/src/db/dbPutNotifyBlocker.cpp @@ -35,6 +35,9 @@ #include "dbChannelIOIL.h" #include "dbPutNotifyBlocker.h" +template class tsFreeList < dbPutNotifyBlocker, 1024 >; +template class epicsSingleton < tsFreeList < dbPutNotifyBlocker, 1024 > >; + epicsSingleton < tsFreeList < dbPutNotifyBlocker, 1024 > > dbPutNotifyBlocker::pFreeList; dbPutNotifyBlocker::dbPutNotifyBlocker ( dbChannelIO &chanIn ) : diff --git a/src/db/dbServiceIO.cpp b/src/db/dbServiceIO.cpp index 3d75b6718..e6bd64e7f 100644 --- a/src/db/dbServiceIO.cpp +++ b/src/db/dbServiceIO.cpp @@ -33,6 +33,9 @@ #include "dbChannelIOIL.h" #include "dbPutNotifyBlocker.h" +template class resTable < dbBaseIO, chronIntId >; +template class chronIntIdResTable < dbBaseIO >; + class dbServiceIOLoadTimeInit { public: dbServiceIOLoadTimeInit (); diff --git a/src/db/dbSubscriptionIO.cpp b/src/db/dbSubscriptionIO.cpp index 4c49364ed..0cde10543 100644 --- a/src/db/dbSubscriptionIO.cpp +++ b/src/db/dbSubscriptionIO.cpp @@ -31,6 +31,9 @@ #include "dbChannelIOIL.h" #include "db_access_routines.h" +template tsFreeList < dbSubscriptionIO >; +template class epicsSingleton < tsFreeList < dbSubscriptionIO > >; + epicsSingleton < tsFreeList < dbSubscriptionIO > > dbSubscriptionIO::pFreeList; dbSubscriptionIO::dbSubscriptionIO ( dbServiceIO &serviceIO, dbChannelIO &chanIO, diff --git a/src/libCom/Makefile b/src/libCom/Makefile index 6e041fe62..672b8c1db 100644 --- a/src/libCom/Makefile +++ b/src/libCom/Makefile @@ -56,6 +56,7 @@ INC += tsFreeList.h INC += epicsSingleton.h INC += epicsGuard.h INC += epicsOnce.h +SRCS += resourceLib.cpp SRCS += epicsSingletonBase.cpp SRCS += epicsOnce.cpp diff --git a/src/libCom/cxxTemplates/epicsOnce.cpp b/src/libCom/cxxTemplates/epicsOnce.cpp index 21f6a48e5..da62a66bb 100644 --- a/src/libCom/cxxTemplates/epicsOnce.cpp +++ b/src/libCom/cxxTemplates/epicsOnce.cpp @@ -36,8 +36,11 @@ private: static epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > > pFreeList; }; -epicsSingleton < epicsMutex > epicsOnceImpl::pMutex; +template class epicsSingleton < epicsMutex >; +template class tsFreeList < class epicsOnceImpl, 16 >; +template class epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > >; +epicsSingleton < epicsMutex > epicsOnceImpl::pMutex; epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > > epicsOnceImpl::pFreeList; inline void * epicsOnceImpl::operator new ( size_t size ) diff --git a/src/libCom/fdmgr/fdmgr.cpp b/src/libCom/fdmgr/fdmgr.cpp index b50f71428..30f0ee656 100644 --- a/src/libCom/fdmgr/fdmgr.cpp +++ b/src/libCom/fdmgr/fdmgr.cpp @@ -103,6 +103,8 @@ private: oldFdmgr & operator = ( const oldFdmgr & ); }; +template class chronIntIdResTable ; + epicsShareFunc fdRegForOldFdmgr::fdRegForOldFdmgr (const SOCKET fdIn, const fdRegType typeIn, const bool onceOnlyIn, fdManager &managerIn, diff --git a/src/libCom/test/epicsTimerTest.cpp b/src/libCom/test/epicsTimerTest.cpp index 90b9c9802..a99739c0d 100644 --- a/src/libCom/test/epicsTimerTest.cpp +++ b/src/libCom/test/epicsTimerTest.cpp @@ -99,6 +99,9 @@ inline void delayVerify::start ( const epicsTime &expireTime ) this->timer.start ( *this, expireTime ); } +template class tsFreeList < class delayVerify, 0x20 >; +template class epicsSingleton < tsFreeList < class delayVerify, 0x20 > >; + epicsSingleton < tsFreeList < class delayVerify, 0x20 > > delayVerify::pFreeList; inline void * delayVerify::operator new ( size_t size ) @@ -182,6 +185,9 @@ inline void cancelVerify::start ( const epicsTime &expireTime ) this->timer.start ( *this, expireTime ); } +template class tsFreeList < class cancelVerify, 0x20 >; +template class epicsSingleton < tsFreeList < class cancelVerify, 0x20 > >; + epicsSingleton < tsFreeList < class cancelVerify, 0x20 > > cancelVerify::pFreeList; inline void * cancelVerify::operator new ( size_t size ) @@ -267,6 +273,9 @@ inline void expireDestroVerify::start ( const epicsTime & expireTime ) this->timer.start ( *this, expireTime ); } +template class tsFreeList < class expireDestroVerify, 0x20 >; +template class epicsSingleton < tsFreeList < class expireDestroVerify, 0x20 > >; + epicsSingleton < tsFreeList < class expireDestroVerify, 0x20 > > expireDestroVerify::pFreeList; inline void * expireDestroVerify::operator new ( size_t size ) @@ -344,6 +353,9 @@ inline void periodicVerify::start ( const epicsTime &expireTime ) this->timer.start ( *this, expireTime ); } +template class tsFreeList < class periodicVerify, 0x20 >; +template class epicsSingleton < tsFreeList < class periodicVerify, 0x20 > >; + epicsSingleton < tsFreeList < class periodicVerify, 0x20 > > periodicVerify::pFreeList; inline void * periodicVerify::operator new ( size_t size ) diff --git a/src/libCom/timer/epicsTimer.cpp b/src/libCom/timer/epicsTimer.cpp index daf451094..d2490470f 100644 --- a/src/libCom/timer/epicsTimer.cpp +++ b/src/libCom/timer/epicsTimer.cpp @@ -33,6 +33,13 @@ #include "epicsGuard.h" #include "timerPrivate.h" +template class tsFreeList < epicsTimerForC, 0x20 >; +template class tsFreeList < epicsTimerQueuePassiveForC, 0x10 >; +template class tsFreeList < epicsTimerQueueActiveForC, 0x10 >; +template class epicsSingleton < tsFreeList < epicsTimerForC, 0x20 > >; +template class epicsSingleton < tsFreeList < epicsTimerQueuePassiveForC, 0x10 > >; +template class epicsSingleton < tsFreeList < epicsTimerQueueActiveForC, 0x10 > >; + epicsSingleton < tsFreeList < epicsTimerForC, 0x20 > > epicsTimerForC::pFreeList; epicsSingleton < tsFreeList < epicsTimerQueuePassiveForC, 0x10 > > epicsTimerQueuePassiveForC::pFreeList; epicsSingleton < tsFreeList < epicsTimerQueueActiveForC, 0x10 > > epicsTimerQueueActiveForC::pFreeList; diff --git a/src/libCom/timer/timer.cpp b/src/libCom/timer/timer.cpp index 5b948fc4f..0af1d382e 100644 --- a/src/libCom/timer/timer.cpp +++ b/src/libCom/timer/timer.cpp @@ -35,6 +35,9 @@ #include "epicsGuard.h" #include "timerPrivate.h" +template class tsFreeList < timer, 0x20 >; +template class epicsSingleton < tsFreeList < timer, 0x20 > >; + epicsSingleton < tsFreeList < timer, 0x20 > > timer::pFreeList; timer::timer ( timerQueue &queueIn ) : diff --git a/src/libCom/timer/timerQueueActive.cpp b/src/libCom/timer/timerQueueActive.cpp index c504f1e4b..67d24874d 100644 --- a/src/libCom/timer/timerQueueActive.cpp +++ b/src/libCom/timer/timerQueueActive.cpp @@ -31,6 +31,8 @@ #define epicsExportSharedSymbols #include "timerPrivate.h" +template class epicsSingleton < timerQueueActiveMgr >; + epicsSingleton < timerQueueActiveMgr > pTimerQueueMgrEPICS; epicsTimerQueueActive::~epicsTimerQueueActive () {}