diff --git a/src/ca/CASG.cpp b/src/ca/CASG.cpp index 5bc9fe3ba..f115e07a6 100644 --- a/src/ca/CASG.cpp +++ b/src/ca/CASG.cpp @@ -30,7 +30,7 @@ #include "iocinf.h" #include "oldAccess.h" -tsFreeList < struct CASG > CASG::freeList; +tsFreeList < struct CASG, 128 > CASG::freeList; CASG::CASG (cac &cacIn) : client (cacIn), magic (CASG_MAGIC), opPendCount (0u), seqNo (0u) diff --git a/src/ca/bhe.cpp b/src/ca/bhe.cpp index 57579eede..1ada50554 100644 --- a/src/ca/bhe.cpp +++ b/src/ca/bhe.cpp @@ -12,7 +12,7 @@ #include "iocinf.h" -tsFreeList < class bhe > bhe::freeList; +tsFreeList < class bhe, 1024 > bhe::freeList; /* * update beacon period diff --git a/src/ca/caDiagnostics.h b/src/ca/caDiagnostics.h index 1807f5a46..f7732763a 100644 --- a/src/ca/caDiagnostics.h +++ b/src/ca/caDiagnostics.h @@ -3,4 +3,5 @@ enum appendNumberFlag {appendNumber, dontAppendNumber}; int catime (char *channelName, enum appendNumberFlag appNF); -int acctst (char *pname); \ No newline at end of file +int acctst (char *pname); + diff --git a/src/ca/cadef.h b/src/ca/cadef.h index 9bef61047..98c85d33e 100644 --- a/src/ca/cadef.h +++ b/src/ca/cadef.h @@ -723,7 +723,7 @@ epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char */ epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel); /* thread safe version */ -const void epicsShareAPI ca_get_host_name ( chid pChan, char *pBuf, unsigned bufLength ); +epicsShareFunc void epicsShareAPI ca_get_host_name ( chid pChan, char *pBuf, unsigned bufLength ); /* * CA_ADD_FD_REGISTRATION diff --git a/src/ca/getCallback.cpp b/src/ca/getCallback.cpp index 97cf06083..6e6e38c4d 100644 --- a/src/ca/getCallback.cpp +++ b/src/ca/getCallback.cpp @@ -18,7 +18,7 @@ #include "iocinf.h" #include "oldAccess.h" -tsFreeList < class getCallback > getCallback::freeList; +tsFreeList < class getCallback, 1024 > getCallback::freeList; getCallback::getCallback (oldChannel &chanIn, caEventCallBackFunc *pFuncIn, void *pPrivateIn) : chan (chanIn), pFunc (pFuncIn), pPrivate (pPrivateIn) @@ -66,4 +66,4 @@ void * getCallback::operator new ( size_t size ) void getCallback::operator delete ( void *pCadaver, size_t size ) { getCallback::freeList.release ( pCadaver, size ); -} \ No newline at end of file +} diff --git a/src/ca/iocinf.h b/src/ca/iocinf.h index 8081c11b5..3f98b34d3 100644 --- a/src/ca/iocinf.h +++ b/src/ca/iocinf.h @@ -225,7 +225,7 @@ private: unsigned short typeCode; unsigned f_connected:1; unsigned f_fullyConstructed:1; - static tsFreeList < class nciu > freeList; + static tsFreeList < class nciu, 1024 > freeList; ~nciu (); // force pool allocation int nciu::issuePut ( ca_uint16_t cmd, unsigned id, chtype type, unsigned long count, const void *pvalue ); @@ -267,7 +267,7 @@ private: unsigned long count; unsigned short mask; ~netSubscription (); - static tsFreeList < class netSubscription > freeList; + static tsFreeList < class netSubscription, 1024 > freeList; }; class netReadCopyIO : public baseNMIU { @@ -288,7 +288,7 @@ private: void *pValue; unsigned seqNumber; ~netReadCopyIO (); // must be allocated from pool - static tsFreeList < class netReadCopyIO > freeList; + static tsFreeList < class netReadCopyIO, 1024 > freeList; }; class netReadNotifyIO : public cacNotifyIO, public baseNMIU { @@ -304,7 +304,7 @@ public: static void operator delete ( void *pCadaver, size_t size ); private: ~netReadNotifyIO (); - static tsFreeList < class netReadNotifyIO > freeList; + static tsFreeList < class netReadNotifyIO, 1024 > freeList; }; class netWriteNotifyIO : public cacNotifyIO, public baseNMIU { @@ -320,7 +320,7 @@ public: static void operator delete ( void *pCadaver, size_t size ); private: ~netWriteNotifyIO (); - static tsFreeList < class netWriteNotifyIO > freeList; + static tsFreeList < class netWriteNotifyIO, 1024 > freeList; }; /* @@ -621,7 +621,7 @@ private: osiTime timeStamp; double averagePeriod; - static tsFreeList < class bhe > freeList; + static tsFreeList < class bhe, 1024 > freeList; ~bhe (); // force allocation from freeList }; @@ -679,7 +679,7 @@ private: void *pValue; unsigned long seqNo; - static tsFreeList < class syncGroupNotify > freeList; + static tsFreeList < class syncGroupNotify, 1024 > freeList; }; /* @@ -709,7 +709,7 @@ private: osiMutex mutex; tsDLList ioList; - static tsFreeList < struct CASG > freeList; + static tsFreeList < struct CASG, 128 > freeList; ~CASG (); friend class syncGroupNotify; diff --git a/src/ca/nciu.cpp b/src/ca/nciu.cpp index 7b625025d..a2e17add2 100644 --- a/src/ca/nciu.cpp +++ b/src/ca/nciu.cpp @@ -12,7 +12,7 @@ #include "iocinf.h" -tsFreeList < class nciu > nciu::freeList; +tsFreeList < class nciu, 1024 > nciu::freeList; struct putCvrtBuf { ELLNODE node; @@ -835,4 +835,4 @@ void nciu::decrementOutstandingIO () void nciu::decrementOutstandingIO ( unsigned seqNumber ) { this->piiu->pcas->decrementOutstandingIO ( seqNumber ); -} \ No newline at end of file +} diff --git a/src/ca/netReadCopyIO.cpp b/src/ca/netReadCopyIO.cpp index 8f131dbe9..53c16785e 100644 --- a/src/ca/netReadCopyIO.cpp +++ b/src/ca/netReadCopyIO.cpp @@ -12,7 +12,7 @@ #include "iocinf.h" -tsFreeList < class netReadCopyIO > netReadCopyIO::freeList; +tsFreeList < class netReadCopyIO, 1024 > netReadCopyIO::freeList; netReadCopyIO::netReadCopyIO ( nciu &chanIn, unsigned typeIn, unsigned long countIn, void *pValueIn, unsigned seqNumberIn ) : diff --git a/src/ca/netReadNotifyIO.cpp b/src/ca/netReadNotifyIO.cpp index e8369e789..a954b60ee 100644 --- a/src/ca/netReadNotifyIO.cpp +++ b/src/ca/netReadNotifyIO.cpp @@ -12,7 +12,7 @@ #include "iocinf.h" -tsFreeList < class netReadNotifyIO > netReadNotifyIO::freeList; +tsFreeList < class netReadNotifyIO, 1024 > netReadNotifyIO::freeList; netReadNotifyIO::netReadNotifyIO ( nciu &chan, cacNotify ¬ifyIn ) : baseNMIU ( chan ), cacNotifyIO ( notifyIn ) diff --git a/src/ca/netSubscription.cpp b/src/ca/netSubscription.cpp index f2db2fc78..4c8e70392 100644 --- a/src/ca/netSubscription.cpp +++ b/src/ca/netSubscription.cpp @@ -12,7 +12,7 @@ #include "iocinf.h" -tsFreeList < class netSubscription > netSubscription::freeList; +tsFreeList < class netSubscription, 1024 > netSubscription::freeList; netSubscription::netSubscription ( nciu &chan, chtype typeIn, unsigned long countIn, unsigned short maskIn, cacNotify ¬ifyIn ) : diff --git a/src/ca/netWriteNotifyIO.cpp b/src/ca/netWriteNotifyIO.cpp index 1bc00ee1d..b9424b7f4 100644 --- a/src/ca/netWriteNotifyIO.cpp +++ b/src/ca/netWriteNotifyIO.cpp @@ -12,7 +12,7 @@ #include "iocinf.h" -tsFreeList < class netWriteNotifyIO > netWriteNotifyIO::freeList; +tsFreeList < class netWriteNotifyIO, 1024 > netWriteNotifyIO::freeList; netWriteNotifyIO::netWriteNotifyIO (nciu &chan, cacNotify ¬ifyIn) : baseNMIU (chan), cacNotifyIO (notifyIn) @@ -52,4 +52,4 @@ void netWriteNotifyIO::exceptionNotify ( int status, const char *pContext ) void netWriteNotifyIO::exceptionNotify ( int status, const char *pContext, unsigned type, unsigned long count ) { this->cacNotifyIO::exceptionNotify (status, pContext, type, count); -} \ No newline at end of file +} diff --git a/src/ca/oldAccess.h b/src/ca/oldAccess.h index 4be4ff4c2..5e79735a4 100644 --- a/src/ca/oldAccess.h +++ b/src/ca/oldAccess.h @@ -39,7 +39,7 @@ private: void connectNotify (); void disconnectNotify (); void accessRightsNotify ( caar ); - static tsFreeList < struct oldChannel > freeList; + static tsFreeList < struct oldChannel, 1024 > freeList; friend int epicsShareAPI ca_array_get (chtype type, unsigned long count, chid pChan, void *pValue); }; @@ -48,8 +48,6 @@ class getCallback : public cacNotify { public: getCallback (oldChannel &chan, caEventCallBackFunc *pFunc, void *pPrivate); void destroy (); - virtual void completionNotify (unsigned type, unsigned long count, const void *pData); - virtual void exceptionNotify (int status, const char *pContext); static void * operator new ( size_t size ); static void operator delete ( void *pCadaver, size_t size ); @@ -59,15 +57,15 @@ private: caEventCallBackFunc *pFunc; void *pPrivate; ~getCallback (); // allocate only out of pool - static tsFreeList < class getCallback > freeList; + virtual void completionNotify (unsigned type, unsigned long count, const void *pData); + virtual void exceptionNotify (int status, const char *pContext); + static tsFreeList < class getCallback, 1024 > freeList; }; class putCallback : public cacNotify { public: putCallback (oldChannel &chan, caEventCallBackFunc *pFunc, void *pPrivate ); void destroy (); - virtual void completionNotify (); - virtual void exceptionNotify ( int status, const char *pContext ); static void * operator new ( size_t size ); static void operator delete ( void *pCadaver, size_t size ); @@ -77,7 +75,9 @@ private: caEventCallBackFunc *pFunc; void *pPrivate; ~putCallback (); // allocate only out of pool - static tsFreeList < class putCallback > freeList; + virtual void completionNotify (); + virtual void exceptionNotify ( int status, const char *pContext ); + static tsFreeList < class putCallback, 1024 > freeList; }; struct oldSubscription : public cacNotify { @@ -97,5 +97,5 @@ private: void exceptionNotify ( int status, const char *pContext ); ~oldSubscription (); // must allocate from pool - static tsFreeList < struct oldSubscription > freeList; -}; \ No newline at end of file + static tsFreeList < struct oldSubscription, 1024 > freeList; +}; diff --git a/src/ca/oldChannel.cpp b/src/ca/oldChannel.cpp index 48297afef..fb4003391 100644 --- a/src/ca/oldChannel.cpp +++ b/src/ca/oldChannel.cpp @@ -18,7 +18,7 @@ #include "iocinf.h" #include "oldAccess.h" -tsFreeList < struct oldChannel > oldChannel::freeList; +tsFreeList < struct oldChannel, 1024 > oldChannel::freeList; oldChannel::oldChannel (caCh *pConnCallBackIn, void *pPrivateIn) : pConnCallBack (pConnCallBackIn), pPrivate (pPrivateIn), pAccessRightsFunc (0) diff --git a/src/ca/oldSubscription.cpp b/src/ca/oldSubscription.cpp index 2da564ffc..c77cc86d7 100644 --- a/src/ca/oldSubscription.cpp +++ b/src/ca/oldSubscription.cpp @@ -13,7 +13,7 @@ #include "iocinf.h" #include "oldAccess.h" -tsFreeList < struct oldSubscription > oldSubscription::freeList; +tsFreeList < struct oldSubscription, 1024 > oldSubscription::freeList; oldSubscription::oldSubscription ( oldChannel &chanIn, caEventCallBackFunc *pFuncIn, void *pPrivateIn ) : chan (chanIn), pFunc (pFuncIn), pPrivate (pPrivateIn) diff --git a/src/ca/putCallback.cpp b/src/ca/putCallback.cpp index 0d69837df..3167e1513 100644 --- a/src/ca/putCallback.cpp +++ b/src/ca/putCallback.cpp @@ -18,7 +18,7 @@ #include "iocinf.h" #include "oldAccess.h" -tsFreeList < class putCallback > putCallback::freeList; +tsFreeList < class putCallback, 1024 > putCallback::freeList; putCallback::putCallback (oldChannel &chanIn, caEventCallBackFunc *pFuncIn, void *pPrivateIn ) : chan (chanIn), pFunc (pFuncIn), pPrivate (pPrivateIn) @@ -68,4 +68,4 @@ void * putCallback::operator new ( size_t size ) void putCallback::operator delete ( void *pCadaver, size_t size ) { putCallback::freeList.release ( pCadaver, size ); -} \ No newline at end of file +} diff --git a/src/ca/syncGroupNotify.cpp b/src/ca/syncGroupNotify.cpp index e3b3ff5a9..7decdf7cc 100644 --- a/src/ca/syncGroupNotify.cpp +++ b/src/ca/syncGroupNotify.cpp @@ -30,7 +30,7 @@ #include "iocinf.h" -tsFreeList < class syncGroupNotify > syncGroupNotify::freeList; +tsFreeList < class syncGroupNotify, 1024 > syncGroupNotify::freeList; syncGroupNotify::syncGroupNotify ( CASG &sgIn, void *pValueIn ) : sg (sgIn), magic (CASG_MAGIC), pValue (pValueIn), seqNo ( sgIn.seqNo )