diff --git a/src/ca/CASG.cpp b/src/ca/CASG.cpp index 457d0c0e4..aaa9b15e8 100644 --- a/src/ca/CASG.cpp +++ b/src/ca/CASG.cpp @@ -35,6 +35,11 @@ #include "autoPtrDestroy.h" #include "cac.h" +template class tsSLNode < CASG>; +template class tsFreeList < CASG, 128, 0 >; +template class tsFreeList < syncGroupWriteNotify, 128, 0 >; +template class tsFreeList < syncGroupReadNotify, 128, 0 >; + tsFreeList < struct CASG, 128 > CASG::freeList; epicsMutex CASG::freeListMutex; diff --git a/src/ca/bhe.cpp b/src/ca/bhe.cpp index ad1081acb..a18dca00d 100644 --- a/src/ca/bhe.cpp +++ b/src/ca/bhe.cpp @@ -19,6 +19,8 @@ #include "bhe.h" #undef epicsExportSharedSymbols +template class tsFreeList < class bhe, 1024 >; + tsFreeList < class bhe, 1024 > bhe::freeList; epicsMutex bhe::freeListMutex; diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 9ae44e58f..4f10c5185 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -36,6 +36,20 @@ #include "net_convert.h" #undef epicsExportSharedSymbols +template class resTable < nciu, chronIntId >; +template class chronIntIdResTable < nciu >; +template class tsSLNode < tcpiiu >; +template class resTable < tcpiiu, caServerID >; +template class tsSLNode < bhe >; +template class resTable < bhe, inetAddrID >; +template class resTable < baseNMIU, chronIntId >; +template class chronIntIdResTable < baseNMIU >; +template class resTable < CASG, chronIntId >; +template class chronIntIdResTable < CASG >; +template class tsFreeList < netReadNotifyIO, 1024, 0 >; +template class tsFreeList < netWriteNotifyIO, 1024, 0 >; +template class tsFreeList < netSubscription, 1024, 0 >; + // TCP response dispatch table const cac::pProtoStubTCP cac::tcpJumpTableCAC [] = { diff --git a/src/ca/comBuf.cpp b/src/ca/comBuf.cpp index 11f424907..67e6ae057 100644 --- a/src/ca/comBuf.cpp +++ b/src/ca/comBuf.cpp @@ -19,6 +19,11 @@ #include "iocinf.h" #include "comBuf.h" +template class tsFreeList < class comBuf, 0x20 >; + +tsFreeList < class comBuf, 0x20 > comBuf::freeList; +epicsMutex comBuf::freeListMutex; + bool comBuf::flushToWire ( wireSendAdapter &wire ) { unsigned occupied = this->occupiedBytes (); diff --git a/src/ca/comQueSend.cpp b/src/ca/comQueSend.cpp index db56f5919..1f3a02f09 100644 --- a/src/ca/comQueSend.cpp +++ b/src/ca/comQueSend.cpp @@ -66,9 +66,6 @@ #include "db_access.h" // for dbr_short_t etc #undef epicsExportSharedSymbols -tsFreeList < class comBuf, 0x20 > comBuf::freeList; -epicsMutex comBuf::freeListMutex; - comQueSend::comQueSend ( wireSendAdapter & wireIn ) : wire ( wireIn ), nBytesPending ( 0u ) { diff --git a/src/ca/getCallback.cpp b/src/ca/getCallback.cpp index cfc8cacd8..6847ce69b 100644 --- a/src/ca/getCallback.cpp +++ b/src/ca/getCallback.cpp @@ -18,6 +18,8 @@ #include "iocinf.h" #include "oldAccess.h" +template class tsFreeList < class getCallback, 1024 >; + tsFreeList < class getCallback, 1024 > getCallback::freeList; epicsMutex getCallback::freeListMutex; diff --git a/src/ca/getCopy.cpp b/src/ca/getCopy.cpp index bb9feefff..77521c32c 100644 --- a/src/ca/getCopy.cpp +++ b/src/ca/getCopy.cpp @@ -21,6 +21,8 @@ #include "oldAccess.h" #include "cac.h" +template class tsFreeList < class getCopy, 1024 >; + tsFreeList < class getCopy, 1024 > getCopy::freeList; epicsMutex getCopy::freeListMutex; diff --git a/src/ca/hostNameCache.cpp b/src/ca/hostNameCache.cpp index ba8c883ce..123fad3b7 100644 --- a/src/ca/hostNameCache.cpp +++ b/src/ca/hostNameCache.cpp @@ -21,6 +21,8 @@ #include "iocinf.h" #include "hostNameCache.h" +template class tsFreeList < hostNameCache, 16 >; + tsFreeList < hostNameCache, 16 > hostNameCache::freeList; epicsMutex hostNameCache::freeListMutex; diff --git a/src/ca/iocinf.cpp b/src/ca/iocinf.cpp index f10ba092e..088eb4279 100644 --- a/src/ca/iocinf.cpp +++ b/src/ca/iocinf.cpp @@ -14,10 +14,12 @@ #include #include +#include +#include #include "envDefs.h" #include "epicsAssert.h" -#include "locationException.h" +#include "errlog.h" #define epicsExportSharedSymbols #include "addrList.h" diff --git a/src/ca/msgForMultiplyDefinedPV.cpp b/src/ca/msgForMultiplyDefinedPV.cpp index d7938f0d3..206b25d41 100644 --- a/src/ca/msgForMultiplyDefinedPV.cpp +++ b/src/ca/msgForMultiplyDefinedPV.cpp @@ -25,7 +25,10 @@ #include "caerr.h" // for ECA_DBLCHNL #undef epicsExportSharedSymbols -tsFreeList < class msgForMultiplyDefinedPV, 16 > msgForMultiplyDefinedPV::freeList; +template class tsFreeList < class msgForMultiplyDefinedPV, 16 >; + +tsFreeList < class msgForMultiplyDefinedPV, 16 > + msgForMultiplyDefinedPV::freeList; epicsMutex msgForMultiplyDefinedPV::freeListMutex; msgForMultiplyDefinedPV::msgForMultiplyDefinedPV ( diff --git a/src/ca/nciu.cpp b/src/ca/nciu.cpp index 9f70499c4..9029e0d7a 100644 --- a/src/ca/nciu.cpp +++ b/src/ca/nciu.cpp @@ -32,6 +32,9 @@ #include "db_access.h" // for INVALID_DB_REQ #undef epicsExportSharedSymbols +template class tsFreeList < nciu, 1024, 0 >; +template class tsSLNode < baseNMIU >; + tsFreeList < class nciu, 1024 > nciu::freeList; epicsMutex nciu::freeListMutex; diff --git a/src/ca/netiiu.cpp b/src/ca/netiiu.cpp index d2f37af68..28d36e69d 100644 --- a/src/ca/netiiu.cpp +++ b/src/ca/netiiu.cpp @@ -19,6 +19,8 @@ #include "cac.h" #include "netiiu.h" +template class tsSLNode < nciu >; + netiiu::netiiu ( cac *pClientCtxIn ) : pClientCtx ( pClientCtxIn ) { } diff --git a/src/ca/oldChannelNotify.cpp b/src/ca/oldChannelNotify.cpp index 2041f072c..25be4ec54 100644 --- a/src/ca/oldChannelNotify.cpp +++ b/src/ca/oldChannelNotify.cpp @@ -21,6 +21,8 @@ #include "oldAccess.h" #include "cac.h" +template class tsFreeList < struct oldChannelNotify, 1024 >; + tsFreeList < struct oldChannelNotify, 1024 > oldChannelNotify::freeList; epicsMutex oldChannelNotify::freeListMutex; diff --git a/src/ca/oldSubscription.cpp b/src/ca/oldSubscription.cpp index 10761011a..bd44e7408 100644 --- a/src/ca/oldSubscription.cpp +++ b/src/ca/oldSubscription.cpp @@ -13,6 +13,8 @@ #include "iocinf.h" #include "oldAccess.h" +template class tsFreeList < struct oldSubscription, 1024 >; + tsFreeList < struct oldSubscription, 1024 > oldSubscription::freeList; epicsMutex oldSubscription::freeListMutex; diff --git a/src/ca/putCallback.cpp b/src/ca/putCallback.cpp index a3f3a6ad3..7ce46cf02 100644 --- a/src/ca/putCallback.cpp +++ b/src/ca/putCallback.cpp @@ -18,6 +18,8 @@ #include "iocinf.h" #include "oldAccess.h" +template class tsFreeList < class putCallback, 1024 >; + tsFreeList < class putCallback, 1024 > putCallback::freeList; epicsMutex putCallback::freeListMutex; diff --git a/src/ca/repeater.cpp b/src/ca/repeater.cpp index 905497943..83ea5ee8b 100644 --- a/src/ca/repeater.cpp +++ b/src/ca/repeater.cpp @@ -99,6 +99,7 @@ private: * per machine so we dont care about reentrancy */ static tsDLList < repeaterClient > client_list; +template class tsFreeList < repeaterClient, 0x20 >; tsFreeList < repeaterClient, 0x20 > repeaterClient::freeList; epicsMutex repeaterClient::freeListMutex; diff --git a/src/ca/syncGroupReadNotify.cpp b/src/ca/syncGroupReadNotify.cpp index 437f14f59..fdcdda089 100644 --- a/src/ca/syncGroupReadNotify.cpp +++ b/src/ca/syncGroupReadNotify.cpp @@ -106,7 +106,7 @@ void * syncGroupReadNotify::operator new ( size_t size, #if ! defined ( NO_PLACEMENT_DELETE ) void syncGroupReadNotify::operator delete ( void *pCadaver, size_t size, - tsFreeList < class syncGroupWriteNotify, 128 > &freeList ) + tsFreeList < class syncGroupReadNotify, 128 > &freeList ) { freeList.release ( pCadaver, size ); } diff --git a/src/ca/udpiiu.cpp b/src/ca/udpiiu.cpp index 68d9c8cd8..05a0f20a2 100644 --- a/src/ca/udpiiu.cpp +++ b/src/ca/udpiiu.cpp @@ -136,7 +136,7 @@ udpiiu::udpiiu ( cac &cac ) : this->recvThreadExitSignal = epicsEventMustCreate ( epicsEventEmpty ); if ( ! this->recvThreadExitSignal ) { socket_close ( this->sock ); - throwWithLocation ( std::bad_alloc () ); + throw std::bad_alloc (); } /* @@ -164,7 +164,7 @@ udpiiu::udpiiu ( cac &cac ) : this->printf ("CA: unable to create UDP receive thread\n"); epicsEventDestroy (this->recvThreadExitSignal); socket_close (this->sock); - throwWithLocation ( std::bad_alloc () ); + throw std::bad_alloc (); } } diff --git a/src/cas/example/simple/exPV.cc b/src/cas/example/simple/exPV.cc index 968d19c86..220043dc6 100644 --- a/src/cas/example/simple/exPV.cc +++ b/src/cas/example/simple/exPV.cc @@ -4,6 +4,10 @@ #include "exServer.h" #include "gddApps.h" +template class gddAppFuncTable < exPV >; +template class tsSLNode < pvEntry >; +template class resTable < pvEntry, stringId >; + // // static data for exPV // diff --git a/src/cas/example/simple/exServer.cc b/src/cas/example/simple/exServer.cc index b7107c80b..aaae6e932 100644 --- a/src/cas/example/simple/exServer.cc +++ b/src/cas/example/simple/exServer.cc @@ -8,6 +8,7 @@ // #include "exServer.h" +template class tsSLNode < exPV >; // // static list of pre-created PVs diff --git a/src/libCom/fdmgr/fdManager.cpp b/src/libCom/fdmgr/fdManager.cpp index 72a44910e..de2dbd459 100644 --- a/src/libCom/fdmgr/fdManager.cpp +++ b/src/libCom/fdmgr/fdManager.cpp @@ -53,6 +53,10 @@ #include "fdManager.h" #include "locationException.h" +template class tsSLNode < fdReg >; +template class intId < unsigned int, 8, 32 >; +template class resTable < fdReg, fdRegId >; + epicsShareDef fdManager fileDescriptorManager; // diff --git a/src/libCom/fdmgr/fdmgr.cpp b/src/libCom/fdmgr/fdmgr.cpp index c3a033031..31f4cebd1 100644 --- a/src/libCom/fdmgr/fdmgr.cpp +++ b/src/libCom/fdmgr/fdmgr.cpp @@ -97,6 +97,10 @@ private: chronIntIdResTable resTbl; }; +template class resTable < timerForOldFdmgr, chronIntId >; +template class tsSLNode < timerForOldFdmgr >; +template class chronIntIdResTable < timerForOldFdmgr >; + 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 5482781d5..f045dfa63 100644 --- a/src/libCom/test/epicsTimerTest.cpp +++ b/src/libCom/test/epicsTimerTest.cpp @@ -348,6 +348,10 @@ void testPeriodic () queue.release (); } +template class tsFreeList < delayVerify, 32, 0 >; +template class tsFreeList < cancelVerify, 32, 0 >; +template class tsFreeList < periodicVerify, 32, 0 >; + void epicsTimerTest () { testAccuracy (); diff --git a/src/libCom/timer/epicsTimer.cpp b/src/libCom/timer/epicsTimer.cpp index 7aa053966..5333ed638 100644 --- a/src/libCom/timer/epicsTimer.cpp +++ b/src/libCom/timer/epicsTimer.cpp @@ -32,6 +32,10 @@ #include "epicsTimer.h" #include "timerPrivate.h" +template class tsFreeList < epicsTimerForC, 32, 0 >; +template class tsFreeList < epicsTimerQueueActiveForC, 1024, 0 >; +template class tsFreeList < epicsTimerQueuePassiveForC, 1024, 0 >; + struct epicsTimerQueuePassiveForC : public epicsTimerQueueNotify, public timerQueuePassive { public: epicsTimerQueuePassiveForC ( epicsTimerQueueRescheduleCallback pCallback, void *pPrivate ); diff --git a/src/libCom/timer/timer.cpp b/src/libCom/timer/timer.cpp index 26f5d0bb2..cced050c2 100644 --- a/src/libCom/timer/timer.cpp +++ b/src/libCom/timer/timer.cpp @@ -32,6 +32,8 @@ #define epicsExportSharedSymbols #include "timerPrivate.h" +template class tsFreeList < timer, 32, 0 >; + timer::timer ( timerQueue &queueIn ) : curState ( stateLimbo ), pNotify ( 0 ), queue ( queueIn ) {