make copy constructor and assignment oper private
This commit is contained in:
@@ -33,6 +33,8 @@ private:
|
||||
cacRecycle &r;
|
||||
tsDLList < class baseNMIU > &eventq;
|
||||
chronIntIdResTable < baseNMIU > &ioTable;
|
||||
autoPtrRecycle ( const autoPtrRecycle & );
|
||||
autoPtrRecycle & operator = ( const autoPtrRecycle & );
|
||||
};
|
||||
|
||||
template < class T >
|
||||
|
||||
@@ -58,6 +58,8 @@ private:
|
||||
void beaconAnomalyNotify ();
|
||||
static tsFreeList < class bhe, 1024 > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
bhe ( const bhe & );
|
||||
bhe & operator = ( const bhe & );
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -259,6 +259,9 @@ private:
|
||||
static const pExcepProtoStubTCP tcpExcepJumpTableCAC [];
|
||||
|
||||
friend class callbackAutoMutex;
|
||||
|
||||
cac ( const cac & );
|
||||
cac & operator = ( const cac & );
|
||||
};
|
||||
|
||||
class callbackAutoMutex {
|
||||
@@ -267,6 +270,8 @@ public:
|
||||
~callbackAutoMutex ();
|
||||
private:
|
||||
cac & ctx;
|
||||
callbackAutoMutex ( const callbackAutoMutex & );
|
||||
callbackAutoMutex & operator = ( const callbackAutoMutex & );
|
||||
};
|
||||
|
||||
inline const char * cac::userNamePointer () const
|
||||
|
||||
+6
-1
@@ -179,6 +179,8 @@ public:
|
||||
|
||||
private:
|
||||
cacChannelNotify & callback;
|
||||
cacChannel ( const cacChannel & );
|
||||
cacChannel & operator = ( const cacChannel & );
|
||||
};
|
||||
|
||||
class cacNotify { // X aCC 655
|
||||
@@ -205,6 +207,7 @@ public:
|
||||
|
||||
class cacServiceList {
|
||||
public:
|
||||
cacServiceList ();
|
||||
epicsShareFunc void registerService ( cacService &service );
|
||||
epicsShareFunc cacChannel * createChannel (
|
||||
const char *pName, cacChannelNotify &,
|
||||
@@ -213,11 +216,13 @@ public:
|
||||
private:
|
||||
tsDLList < cacService > services;
|
||||
mutable epicsMutex mutex;
|
||||
cacServiceList ( const cacServiceList & );
|
||||
cacServiceList & operator = ( const cacServiceList & );
|
||||
};
|
||||
|
||||
epicsShareExtern cacServiceList cacGlobalServiceList;
|
||||
|
||||
epicsShareFunc int epicsShareAPI ca_register_service ( struct cacService *pService );
|
||||
epicsShareFunc int epicsShareAPI ca_register_service ( cacService *pService );
|
||||
|
||||
inline cacChannel::cacChannel ( cacChannelNotify & notify ) :
|
||||
callback ( notify )
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
epicsShareDef cacServiceList cacGlobalServiceList;
|
||||
|
||||
cacServiceList::cacServiceList ()
|
||||
{
|
||||
}
|
||||
|
||||
void cacServiceList::registerService ( cacService &service )
|
||||
{
|
||||
epicsAutoMutex locker ( this->mutex );
|
||||
|
||||
@@ -40,6 +40,8 @@ public:
|
||||
private:
|
||||
tsDLList < comBuf > bufs;
|
||||
unsigned nBytesPending;
|
||||
comQueRecv ( const comQueRecv & );
|
||||
comQueRecv & operator = ( const comQueRecv & );
|
||||
};
|
||||
|
||||
inline unsigned comQueRecv::occupiedBytes () const
|
||||
|
||||
@@ -114,6 +114,8 @@ private:
|
||||
}
|
||||
return;
|
||||
}
|
||||
comQueSend ( const comQueSend & );
|
||||
comQueSend & operator = ( const comQueSend & );
|
||||
};
|
||||
|
||||
inline bool comQueSend::dbr_type_ok ( unsigned type )
|
||||
|
||||
@@ -39,6 +39,8 @@ private:
|
||||
cac &cacRef;
|
||||
static tsFreeList < class msgForMultiplyDefinedPV, 16 > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
msgForMultiplyDefinedPV ( const msgForMultiplyDefinedPV & );
|
||||
msgForMultiplyDefinedPV & operator = ( const msgForMultiplyDefinedPV & );
|
||||
};
|
||||
|
||||
inline void * msgForMultiplyDefinedPV::operator new ( size_t size )
|
||||
|
||||
@@ -44,6 +44,9 @@ protected:
|
||||
// notify
|
||||
//
|
||||
nciu & chan;
|
||||
private:
|
||||
baseNMIU ( const baseNMIU & );
|
||||
baseNMIU & operator = ( const baseNMIU & );
|
||||
};
|
||||
|
||||
class netSubscription : public baseNMIU {
|
||||
@@ -81,6 +84,8 @@ private:
|
||||
void operator delete ( void *, size_t,
|
||||
tsFreeList < class netSubscription, 1024 > & );
|
||||
# endif
|
||||
netSubscription ( const netSubscription & );
|
||||
netSubscription & operator = ( const netSubscription & );
|
||||
};
|
||||
|
||||
class netReadNotifyIO : public baseNMIU {
|
||||
@@ -107,6 +112,8 @@ private:
|
||||
void operator delete ( void *, size_t,
|
||||
tsFreeList < class netReadNotifyIO, 1024 > & );
|
||||
# endif
|
||||
netReadNotifyIO ( const netReadNotifyIO & );
|
||||
netReadNotifyIO & operator = ( const netReadNotifyIO & );
|
||||
};
|
||||
|
||||
class netWriteNotifyIO : public baseNMIU {
|
||||
@@ -133,6 +140,8 @@ private:
|
||||
void operator delete ( void *, size_t,
|
||||
tsFreeList < class netWriteNotifyIO, 1024 > & );
|
||||
# endif
|
||||
netWriteNotifyIO ( const netWriteNotifyIO & );
|
||||
netWriteNotifyIO & operator = ( const netWriteNotifyIO & );
|
||||
};
|
||||
|
||||
inline ca_uint32_t baseNMIU::getID () const
|
||||
|
||||
@@ -65,11 +65,16 @@ private:
|
||||
tsDLList < nciu > channelList;
|
||||
cac *pClientCtx;
|
||||
virtual void lastChannelDetachNotify ();
|
||||
netiiu ( const netiiu & );
|
||||
netiiu & operator = ( const netiiu & );
|
||||
};
|
||||
|
||||
class limboiiu : public netiiu { // X aCC 655
|
||||
public:
|
||||
limboiiu ();
|
||||
private:
|
||||
limboiiu ( const limboiiu & );
|
||||
limboiiu & operator = ( const limboiiu & );
|
||||
};
|
||||
|
||||
extern limboiiu limboIIU;
|
||||
|
||||
@@ -89,6 +89,8 @@ private:
|
||||
bool includeFirstConnectInCountOfOutstandingIO () const;
|
||||
static tsFreeList < struct oldChannelNotify, 1024 > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
oldChannelNotify ( const oldChannelNotify & );
|
||||
oldChannelNotify & operator = ( const oldChannelNotify & );
|
||||
};
|
||||
|
||||
class getCopy : public cacReadNotify {
|
||||
@@ -115,6 +117,8 @@ private:
|
||||
const char *pContext, unsigned type, arrayElementCount count );
|
||||
static tsFreeList < class getCopy, 1024 > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
getCopy ( const getCopy & );
|
||||
getCopy & operator = ( const getCopy & );
|
||||
};
|
||||
|
||||
class getCallback : public cacReadNotify {
|
||||
@@ -136,6 +140,8 @@ private:
|
||||
const char *pContext, unsigned type, arrayElementCount count );
|
||||
static tsFreeList < class getCallback, 1024 > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
getCallback ( const getCallback & );
|
||||
getCallback & operator = ( const getCallback & );
|
||||
};
|
||||
|
||||
class putCallback : public cacWriteNotify {
|
||||
@@ -156,6 +162,8 @@ private:
|
||||
unsigned type, arrayElementCount count );
|
||||
static tsFreeList < class putCallback, 1024 > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
putCallback ( const putCallback & );
|
||||
putCallback & operator = ( const putCallback & );
|
||||
};
|
||||
|
||||
struct oldSubscription : public cacStateNotify {
|
||||
@@ -181,6 +189,8 @@ private:
|
||||
const char *pContext, unsigned type, arrayElementCount count );
|
||||
static tsFreeList < struct oldSubscription, 1024 > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
oldSubscription ( const oldSubscription & );
|
||||
oldSubscription & operator = ( const oldSubscription & );
|
||||
};
|
||||
|
||||
struct oldCAC : public cacNotify
|
||||
@@ -231,6 +241,8 @@ private:
|
||||
void fdWasCreated ( int fd );
|
||||
void fdWasDestroyed ( int fd );
|
||||
void attachToClientCtx ();
|
||||
oldCAC ( const oldCAC & );
|
||||
oldCAC & operator = ( const oldCAC & );
|
||||
};
|
||||
|
||||
int fetchClientContext ( oldCAC **ppcac );
|
||||
|
||||
@@ -35,6 +35,8 @@ private:
|
||||
bool registered;
|
||||
bool once;
|
||||
expireStatus expire ( const epicsTime & currentTime );
|
||||
repeaterSubscribeTimer ( const repeaterSubscribeTimer & );
|
||||
repeaterSubscribeTimer & operator = ( const repeaterSubscribeTimer & );
|
||||
};
|
||||
|
||||
#endif // ifdef repeaterSubscribeTimerh
|
||||
|
||||
@@ -51,6 +51,8 @@ private:
|
||||
bool noDelay;
|
||||
expireStatus expire ( const epicsTime & currentTime );
|
||||
void setRetryInterval ( unsigned retryNo );
|
||||
searchTimer ( const searchTimer & );
|
||||
searchTimer & operator = ( const searchTimer & );
|
||||
};
|
||||
|
||||
#endif // ifdef searchTimerh
|
||||
|
||||
+12
-2
@@ -50,7 +50,9 @@ protected:
|
||||
const unsigned magic;
|
||||
cacChannel::ioid id;
|
||||
bool idIsValid;
|
||||
virtual ~syncGroupNotify ();
|
||||
virtual ~syncGroupNotify ();
|
||||
syncGroupNotify ( const syncGroupNotify & );
|
||||
syncGroupNotify & operator = ( const syncGroupNotify & );
|
||||
};
|
||||
|
||||
class syncGroupReadNotify : public syncGroupNotify, public cacReadNotify {
|
||||
@@ -76,6 +78,8 @@ private:
|
||||
unsigned type, arrayElementCount count, const void *pData );
|
||||
void exception (
|
||||
int status, const char *pContext, unsigned type, arrayElementCount count );
|
||||
syncGroupReadNotify ( const syncGroupReadNotify & );
|
||||
syncGroupReadNotify & operator = ( const syncGroupReadNotify & );
|
||||
};
|
||||
|
||||
class syncGroupWriteNotify : public syncGroupNotify, public cacWriteNotify {
|
||||
@@ -99,7 +103,10 @@ private:
|
||||
tsFreeList < class syncGroupWriteNotify, 128 > & );
|
||||
# endif
|
||||
void completion ();
|
||||
void exception ( int status, const char *pContext, unsigned type, arrayElementCount count );
|
||||
void exception ( int status, const char *pContext,
|
||||
unsigned type, arrayElementCount count );
|
||||
syncGroupWriteNotify ( const syncGroupWriteNotify & );
|
||||
syncGroupWriteNotify & operator = ( const syncGroupWriteNotify & );
|
||||
};
|
||||
|
||||
struct oldCAC;
|
||||
@@ -143,6 +150,9 @@ private:
|
||||
void destroyPendingIO ( syncGroupNotify * );
|
||||
void destroyCompletedIO ();
|
||||
void destroyPendingIO ();
|
||||
|
||||
CASG ( const CASG & );
|
||||
CASG & operator = ( const CASG & );
|
||||
};
|
||||
|
||||
inline bool syncGroupNotify::ioInitiated () const
|
||||
|
||||
@@ -41,6 +41,8 @@ private:
|
||||
bool responsePending;
|
||||
bool beaconAnomaly;
|
||||
expireStatus expire ( const epicsTime & currentTime );
|
||||
tcpRecvWatchdog ( const tcpRecvWatchdog & );
|
||||
tcpRecvWatchdog & operator = ( const tcpRecvWatchdog & );
|
||||
};
|
||||
|
||||
#endif // #ifndef tcpRecvWatchdogh
|
||||
|
||||
@@ -31,6 +31,8 @@ private:
|
||||
epicsTimer & timer;
|
||||
tcpiiu & iiu;
|
||||
expireStatus expire ( const epicsTime & currentTime );
|
||||
tcpSendWatchdog ( const tcpSendWatchdog & );
|
||||
tcpSendWatchdog & operator = ( const tcpSendWatchdog & );
|
||||
};
|
||||
|
||||
#endif // #ifndef tcpSendWatchdog
|
||||
|
||||
@@ -99,6 +99,9 @@ private:
|
||||
const osiSockAddr &net_addr, const epicsTime & );
|
||||
|
||||
friend void cacRecvThreadUDP ( void *pParam );
|
||||
|
||||
udpiiu ( const udpiiu & );
|
||||
udpiiu & operator = ( const udpiiu & );
|
||||
};
|
||||
|
||||
inline bool udpiiu::isCurrentThread () const
|
||||
|
||||
@@ -139,6 +139,9 @@ private:
|
||||
|
||||
friend void cacSendThreadTCP ( void *pParam );
|
||||
friend void cacRecvThreadTCP ( void *pParam );
|
||||
|
||||
tcpiiu ( const tcpiiu & );
|
||||
tcpiiu & operator = ( const tcpiiu & );
|
||||
};
|
||||
|
||||
inline void tcpiiu::flushRequest ()
|
||||
|
||||
@@ -39,6 +39,9 @@ public:
|
||||
virtual dbSubscriptionIO * isSubscription () = 0;
|
||||
virtual void destroy () = 0;
|
||||
virtual void show ( unsigned level ) const = 0;
|
||||
dbBaseIO ();
|
||||
dbBaseIO ( const dbBaseIO & );
|
||||
dbBaseIO & operator = ( const dbBaseIO & );
|
||||
};
|
||||
|
||||
class dbPutNotifyBlocker : public dbBaseIO {
|
||||
@@ -62,6 +65,8 @@ private:
|
||||
static tsFreeList < dbPutNotifyBlocker > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
friend void putNotifyCompletion ( putNotify *ppn );
|
||||
dbPutNotifyBlocker ( const dbPutNotifyBlocker & );
|
||||
dbPutNotifyBlocker & operator = ( const dbPutNotifyBlocker & );
|
||||
};
|
||||
|
||||
extern "C" void dbSubscriptionEventCallback ( void *pPrivate, struct dbAddr *paddr,
|
||||
@@ -91,6 +96,8 @@ private:
|
||||
static epicsMutex freeListMutex;
|
||||
friend void dbSubscriptionEventCallback ( void *pPrivate, struct dbAddr *paddr,
|
||||
int eventsRemaining, struct db_field_log *pfl );
|
||||
dbSubscriptionIO ( const dbSubscriptionIO & );
|
||||
dbSubscriptionIO & operator = ( const dbSubscriptionIO & );
|
||||
};
|
||||
|
||||
class dbServiceIO;
|
||||
@@ -102,6 +109,8 @@ private:
|
||||
tsDLList < dbSubscriptionIO > eventq;
|
||||
dbPutNotifyBlocker *pBlocker;
|
||||
friend class dbServiceIO;
|
||||
dbServicePrivateListOfIO ( const dbServicePrivateListOfIO & );
|
||||
dbServicePrivateListOfIO & operator = ( const dbServicePrivateListOfIO & );
|
||||
};
|
||||
|
||||
class dbChannelIO : public cacChannel, public dbServicePrivateListOfIO {
|
||||
@@ -138,6 +147,8 @@ private:
|
||||
static tsFreeList < dbChannelIO > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
static unsigned nextIdForIO;
|
||||
dbChannelIO ( const dbChannelIO & );
|
||||
dbChannelIO & operator = ( const dbChannelIO & );
|
||||
};
|
||||
|
||||
class dbServiceIO : public cacService {
|
||||
@@ -166,6 +177,8 @@ private:
|
||||
dbEventCtx ctx;
|
||||
char *pEventCallbackCache;
|
||||
mutable epicsMutex mutex;
|
||||
dbServiceIO ( const dbServiceIO & );
|
||||
dbServiceIO & operator = ( const dbServiceIO & );
|
||||
};
|
||||
|
||||
inline dbServicePrivateListOfIO::dbServicePrivateListOfIO () :
|
||||
|
||||
@@ -50,6 +50,8 @@ public:
|
||||
dbServiceIOLoadTimeInit ();
|
||||
private:
|
||||
dbServiceIO dbio;
|
||||
dbServiceIOLoadTimeInit ( const dbServiceIOLoadTimeInit & );
|
||||
dbServiceIOLoadTimeInit & operator = ( const dbServiceIOLoadTimeInit & );
|
||||
};
|
||||
|
||||
// The following is just to force lti to be constructed
|
||||
@@ -58,6 +60,8 @@ extern "C" void dbServiceIOInit()
|
||||
static dbServiceIOLoadTimeInit lti;
|
||||
}
|
||||
|
||||
dbBaseIO::dbBaseIO () {}
|
||||
|
||||
dbServiceIOLoadTimeInit::dbServiceIOLoadTimeInit ()
|
||||
{
|
||||
cacGlobalServiceList.registerService ( this->dbio );
|
||||
|
||||
@@ -67,20 +67,6 @@ template class resTable < fdReg, fdRegId >;
|
||||
|
||||
epicsShareDef fdManager fileDescriptorManager;
|
||||
|
||||
//
|
||||
// this must allow at least enough bits for all states
|
||||
// in type "fdRegType". The actual size of the table
|
||||
// is used because it improves performance.
|
||||
//
|
||||
inline const unsigned fdRegId::minIndexBitWidth ()
|
||||
{
|
||||
return fdManagerHashTableMinIndexBits;
|
||||
}
|
||||
inline const unsigned fdRegId::maxIndexBitWidth ()
|
||||
{
|
||||
return fdManagerHashTableMaxIndexBits;
|
||||
}
|
||||
|
||||
//
|
||||
// fdManager::fdManager()
|
||||
//
|
||||
|
||||
@@ -74,13 +74,10 @@ public:
|
||||
|
||||
resTableIndex hash () const;
|
||||
|
||||
static const unsigned minIndexBitWidth ();
|
||||
static const unsigned maxIndexBitWidth ();
|
||||
|
||||
virtual void show (unsigned level) const;
|
||||
private:
|
||||
const SOCKET fd;
|
||||
const fdRegType type;
|
||||
SOCKET fd;
|
||||
fdRegType type;
|
||||
};
|
||||
|
||||
//
|
||||
@@ -121,6 +118,8 @@ private:
|
||||
epicsShareFunc void installReg (fdReg ®);
|
||||
epicsShareFunc void removeReg (fdReg ®);
|
||||
void lazyInitTimerQueue ();
|
||||
fdManager ( const fdManager & );
|
||||
fdManager & operator = ( const fdManager & );
|
||||
friend class fdReg;
|
||||
};
|
||||
|
||||
@@ -171,6 +170,9 @@ private:
|
||||
unsigned char state; // state enums go here
|
||||
unsigned char onceOnly;
|
||||
fdManager &manager;
|
||||
|
||||
fdReg ( const fdReg & );
|
||||
fdReg & operator = ( const fdReg & );
|
||||
};
|
||||
|
||||
static const unsigned fdManagerHashTableMinIndexBits = 8;
|
||||
|
||||
@@ -60,6 +60,8 @@ private:
|
||||
pCallBackFDMgr pFunc;
|
||||
void *pParam;
|
||||
epicsShareFunc virtual void callBack ();
|
||||
fdRegForOldFdmgr ( const fdRegForOldFdmgr & );
|
||||
fdRegForOldFdmgr & operator = ( const fdRegForOldFdmgr & );
|
||||
};
|
||||
|
||||
class oldFdmgr;
|
||||
@@ -84,6 +86,8 @@ private:
|
||||
void *pParam;
|
||||
unsigned id;
|
||||
epicsShareFunc expireStatus expire ( const epicsTime & currentTime );
|
||||
timerForOldFdmgr ( const timerForOldFdmgr & );
|
||||
timerForOldFdmgr & operator = ( const timerForOldFdmgr & );
|
||||
};
|
||||
|
||||
class oldFdmgr : public fdManager {
|
||||
@@ -95,6 +99,8 @@ public:
|
||||
|
||||
private:
|
||||
chronIntIdResTable <timerForOldFdmgr> resTbl;
|
||||
oldFdmgr ( const oldFdmgr & );
|
||||
oldFdmgr & operator = ( const oldFdmgr & );
|
||||
};
|
||||
|
||||
#if defined ( _MSC_VER )
|
||||
@@ -181,7 +187,7 @@ extern "C" epicsShareFunc fdmgrAlarmId epicsShareAPI fdmgr_add_timeout (
|
||||
double delay = ptimeout->tv_sec + ptimeout->tv_usec / static_cast <const double> (epicsTime::uSecPerSec);
|
||||
oldFdmgr *pfdm = static_cast <oldFdmgr *> (pfdctx);
|
||||
timerForOldFdmgr *pTimer;
|
||||
unsigned id;
|
||||
unsigned id = fdmgrNoAlarm;
|
||||
|
||||
if (!pfdm) {
|
||||
return fdmgrNoAlarm;
|
||||
@@ -206,7 +212,6 @@ extern "C" epicsShareFunc fdmgrAlarmId epicsShareAPI fdmgr_add_timeout (
|
||||
}
|
||||
}
|
||||
else {
|
||||
id = fdmgrNoAlarm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ private:
|
||||
bool callbackInProgress;
|
||||
bool waitingForCancelPendCompletion;
|
||||
static epicsMutex mutex;
|
||||
ipAddrToAsciiEngine ( const ipAddrToAsciiEngine & );
|
||||
ipAddrToAsciiEngine & operator = ( const ipAddrToAsciiEngine & );
|
||||
friend class ipAddrToAsciiAsynchronous;
|
||||
};
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
~epicsAutoMutexRelease ();
|
||||
private:
|
||||
epicsAutoMutexRelease ( const epicsAutoMutex & );
|
||||
epicsAutoMutexRelease & operator = ( const epicsAutoMutex & );
|
||||
epicsAutoMutexRelease & operator = ( const epicsAutoMutexRelease & );
|
||||
epicsMutex & rMutex;
|
||||
};
|
||||
|
||||
@@ -114,8 +114,7 @@ inline epicsMutex ::~epicsMutex ()
|
||||
|
||||
inline void epicsMutex :: lock ()
|
||||
{
|
||||
epicsMutexLockStatus status;
|
||||
status = epicsMutexLock ( this->id );
|
||||
epicsMutexLockStatus status = epicsMutexLock ( this->id );
|
||||
if ( status != epicsMutexLockOK ) {
|
||||
throwWithLocation ( invalidSemaphore () );
|
||||
}
|
||||
@@ -123,8 +122,7 @@ inline void epicsMutex :: lock ()
|
||||
|
||||
inline bool epicsMutex :: lock ( double timeOut )
|
||||
{
|
||||
epicsMutexLockStatus status;
|
||||
status = epicsMutexLockWithTimeout ( this->id, timeOut );
|
||||
epicsMutexLockStatus status = epicsMutexLockWithTimeout ( this->id, timeOut );
|
||||
if (status==epicsMutexLockOK) {
|
||||
return true;
|
||||
} else if (status==epicsMutexLockTimeout) {
|
||||
@@ -137,8 +135,7 @@ inline bool epicsMutex :: lock ( double timeOut )
|
||||
|
||||
inline bool epicsMutex :: tryLock ()
|
||||
{
|
||||
epicsMutexLockStatus status;
|
||||
status = epicsMutexTryLock ( this->id );
|
||||
epicsMutexLockStatus status = epicsMutexTryLock ( this->id );
|
||||
if ( status == epicsMutexLockOK ) {
|
||||
return true;
|
||||
} else if ( status == epicsMutexLockTimeout ) {
|
||||
|
||||
@@ -61,6 +61,7 @@ private:
|
||||
timerQueue &queue;
|
||||
void privateStart ( epicsTimerNotify & notify, const epicsTime & );
|
||||
void privateCancel ();
|
||||
timer & operator = ( const timer & );
|
||||
friend class timerQueue;
|
||||
};
|
||||
|
||||
@@ -74,6 +75,7 @@ private:
|
||||
epicsTimerCallback pCallBack;
|
||||
void * pPrivate;
|
||||
expireStatus expire ( const epicsTime & currentTime );
|
||||
epicsTimerForC & operator = ( const epicsTimerForC & );
|
||||
friend class timerQueue;
|
||||
};
|
||||
|
||||
@@ -96,6 +98,8 @@ private:
|
||||
timer *pExpireTmr;
|
||||
epicsThreadId processThread;
|
||||
bool cancelPending;
|
||||
timerQueue ( const timerQueue & );
|
||||
timerQueue & operator = ( const timerQueue & );
|
||||
friend class timer;
|
||||
};
|
||||
|
||||
@@ -132,6 +136,8 @@ private:
|
||||
void run ();
|
||||
void reschedule ();
|
||||
epicsTimerQueue & getEpicsTimerQueue ();
|
||||
timerQueueActive ( const timerQueueActive & );
|
||||
timerQueueActive & operator = ( const timerQueueActive & );
|
||||
};
|
||||
|
||||
struct epicsTimerQueueActiveForC : public timerQueueActive,
|
||||
@@ -146,10 +152,13 @@ protected:
|
||||
private:
|
||||
static tsFreeList < epicsTimerQueueActiveForC > freeList;
|
||||
static epicsMutex freeListMutex;
|
||||
epicsTimerQueueActiveForC ( const epicsTimerQueueActiveForC & );
|
||||
epicsTimerQueueActiveForC & operator = ( const epicsTimerQueueActiveForC & );
|
||||
};
|
||||
|
||||
class timerQueueActiveMgr {
|
||||
public:
|
||||
timerQueueActiveMgr ();
|
||||
~timerQueueActiveMgr ();
|
||||
epicsTimerQueueActiveForC & allocate ( bool okToShare,
|
||||
unsigned threadPriority = epicsThreadPriorityMin + 10 );
|
||||
@@ -157,6 +166,8 @@ public:
|
||||
private:
|
||||
epicsMutex mutex;
|
||||
tsDLList < epicsTimerQueueActiveForC > sharedQueueList;
|
||||
timerQueueActiveMgr ( const timerQueueActiveMgr & );
|
||||
timerQueueActiveMgr & operator = ( const timerQueueActiveMgr & );
|
||||
};
|
||||
|
||||
extern timerQueueActiveMgr queueMgr;
|
||||
@@ -173,6 +184,8 @@ protected:
|
||||
timerQueue queue;
|
||||
~timerQueuePassive ();
|
||||
epicsTimerQueue & getEpicsTimerQueue ();
|
||||
timerQueuePassive ( const timerQueuePassive & );
|
||||
timerQueuePassive & operator = ( const timerQueuePassive & );
|
||||
};
|
||||
|
||||
inline epicsTimerForC & timerQueue::createTimerForC
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
#define epicsExportSharedSymbols
|
||||
#include "timerPrivate.h"
|
||||
|
||||
timerQueueActiveMgr::timerQueueActiveMgr ()
|
||||
{
|
||||
}
|
||||
|
||||
timerQueueActiveMgr::~timerQueueActiveMgr ()
|
||||
{
|
||||
epicsAutoMutex locker ( this->mutex );
|
||||
|
||||
Reference in New Issue
Block a user