use explicit template instantiation

This commit is contained in:
Jeff Hill
2001-10-20 00:43:26 +00:00
parent 7c4ddfffcd
commit f1d7722f80
25 changed files with 77 additions and 8 deletions

View File

@@ -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;

View File

@@ -19,6 +19,8 @@
#include "bhe.h"
#undef epicsExportSharedSymbols
template class tsFreeList < class bhe, 1024 >;
tsFreeList < class bhe, 1024 > bhe::freeList;
epicsMutex bhe::freeListMutex;

View File

@@ -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 [] =
{

View File

@@ -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 ();

View File

@@ -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 )
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -21,6 +21,8 @@
#include "iocinf.h"
#include "hostNameCache.h"
template class tsFreeList < hostNameCache, 16 >;
tsFreeList < hostNameCache, 16 > hostNameCache::freeList;
epicsMutex hostNameCache::freeListMutex;

View File

@@ -14,10 +14,12 @@
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "envDefs.h"
#include "epicsAssert.h"
#include "locationException.h"
#include "errlog.h"
#define epicsExportSharedSymbols
#include "addrList.h"

View File

@@ -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 (

View File

@@ -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;

View File

@@ -19,6 +19,8 @@
#include "cac.h"
#include "netiiu.h"
template class tsSLNode < nciu >;
netiiu::netiiu ( cac *pClientCtxIn ) : pClientCtx ( pClientCtxIn )
{
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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 ();
}
}

View File

@@ -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
//

View File

@@ -8,6 +8,7 @@
//
#include "exServer.h"
template class tsSLNode < exPV >;
//
// static list of pre-created PVs

View File

@@ -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;
//

View File

@@ -97,6 +97,10 @@ private:
chronIntIdResTable <timerForOldFdmgr> 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,

View File

@@ -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 ();

View File

@@ -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 );

View File

@@ -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 )
{