From a3e0f538f7e59358e14a8f895f5c6608adac5cef Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 22 May 2006 22:49:06 +0000 Subject: [PATCH] ipAddrToAsciiTransactionPrivate free list is __not__ locked externally so the epicsMutexNOOP non-default template parameter causes the free list to not be locked. The free list was changed to embed a lock/unlock around all allocate and deallocate requests. --- src/libCom/misc/ipAddrToAsciiAsynchronous.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libCom/misc/ipAddrToAsciiAsynchronous.cpp b/src/libCom/misc/ipAddrToAsciiAsynchronous.cpp index e9ce53747..4b1896233 100644 --- a/src/libCom/misc/ipAddrToAsciiAsynchronous.cpp +++ b/src/libCom/misc/ipAddrToAsciiAsynchronous.cpp @@ -50,9 +50,9 @@ public: osiSockAddr address () const; void show ( unsigned level ) const; void * operator new ( size_t size, tsFreeList - < ipAddrToAsciiTransactionPrivate, 0x80, epicsMutexNOOP > & ); + < ipAddrToAsciiTransactionPrivate, 0x80 > & ); epicsPlacementDeleteOperator (( void *, tsFreeList - < ipAddrToAsciiTransactionPrivate, 0x80, epicsMutexNOOP > & )) + < ipAddrToAsciiTransactionPrivate, 0x80 > & )) private: osiSockAddr addr; ipAddrToAsciiEnginePrivate & engine; @@ -71,7 +71,7 @@ private: #endif template class tsFreeList - < ipAddrToAsciiTransactionPrivate, 0x80, epicsMutexNOOP >; + < ipAddrToAsciiTransactionPrivate, 0x80 >; #ifdef _MSC_VER # pragma warning ( pop ) @@ -89,7 +89,7 @@ public: private: char nameTmp [1024]; tsFreeList - < ipAddrToAsciiTransactionPrivate, 0x80, epicsMutexNOOP > + < ipAddrToAsciiTransactionPrivate, 0x80 > transactionFreeList; tsDLList < ipAddrToAsciiTransactionPrivate > labor; mutable epicsMutex mutex; @@ -198,14 +198,14 @@ void ipAddrToAsciiEnginePrivate::show ( unsigned level ) const } inline void * ipAddrToAsciiTransactionPrivate::operator new ( size_t size, tsFreeList - < ipAddrToAsciiTransactionPrivate, 0x80, epicsMutexNOOP > & freeList ) + < ipAddrToAsciiTransactionPrivate, 0x80 > & freeList ) { return freeList.allocate ( size ); } #ifdef CXX_PLACEMENT_DELETE inline void ipAddrToAsciiTransactionPrivate::operator delete ( void * pTrans, tsFreeList - < ipAddrToAsciiTransactionPrivate, 0x80, epicsMutexNOOP > & freeList ) + < ipAddrToAsciiTransactionPrivate, 0x80 > & freeList ) { freeList.release ( pTrans ); }