epicsAutoMutex has a new name, fixed free lists, and use c++ thread class,

and fixed dll symbol exports
This commit is contained in:
Jeff Hill
2002-03-21 23:10:06 +00:00
parent e625e5dc5f
commit 28ef90cb1b
38 changed files with 617 additions and 852 deletions

View File

@@ -16,23 +16,12 @@
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#define epicsExportSharedSymbols
#include "iocinf.h"
#include "oldAccess.h"
#include "cac.h"
#if defined ( _MSC_VER )
# pragma warning ( push )
# pragma warning ( disable: 4660 )
#endif
template class tsFreeList < struct oldChannelNotify, 1024 >;
#if defined ( _MSC_VER )
# pragma warning ( pop )
#endif
tsFreeList < struct oldChannelNotify, 1024 > oldChannelNotify::freeList;
epicsMutex oldChannelNotify::freeListMutex;
epicsSingleton < tsFreeList < struct oldChannelNotify, 1024 > > oldChannelNotify::pFreeList;
extern "C" void cacNoopConnHandler ( struct connection_handler_args )
{
@@ -144,12 +133,10 @@ bool oldChannelNotify::includeFirstConnectInCountOfOutstandingIO () const
void * oldChannelNotify::operator new ( size_t size )
{
epicsAutoMutex locker ( oldChannelNotify::freeListMutex );
return oldChannelNotify::freeList.allocate ( size );
return oldChannelNotify::pFreeList->allocate ( size );
}
void oldChannelNotify::operator delete ( void *pCadaver, size_t size )
{
epicsAutoMutex locker ( oldChannelNotify::freeListMutex );
oldChannelNotify::freeList.release ( pCadaver, size );
oldChannelNotify::pFreeList->release ( pCadaver, size );
}