accomodate Marty's osi => epics name changes
This commit is contained in:
+34
-34
@@ -143,7 +143,7 @@ cac::~cac ()
|
||||
// destroy local IO channels
|
||||
//
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
tsDLIterBD < cacLocalChannelIO > iter ( this->localChanList.first () );
|
||||
while ( iter.valid () ) {
|
||||
tsDLIterBD < cacLocalChannelIO > pnext = iter.itemAfter ();
|
||||
@@ -170,13 +170,13 @@ cac::~cac ()
|
||||
// shutdown all tcp connections and wait for threads to exit
|
||||
//
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->iiuListMutex );
|
||||
epicsAutoMutex autoMutex ( this->iiuListMutex );
|
||||
|
||||
tsDLIterBD <tcpiiu> piiu ( this->iiuList.first () );
|
||||
while ( piiu.valid () ) {
|
||||
tsDLIterBD <tcpiiu> pnext = piiu.itemAfter ();
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
piiu->disconnectAllChan ( *this->pudpiiu );
|
||||
}
|
||||
piiu->disconnect ();
|
||||
@@ -213,7 +213,7 @@ cac::~cac ()
|
||||
// requirement that threads
|
||||
//
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
this->pudpiiu->disconnectAllChan ( limboIIU );
|
||||
}
|
||||
delete this->pudpiiu;
|
||||
@@ -236,7 +236,7 @@ cac::~cac ()
|
||||
|
||||
void cac::processRecvBacklog ()
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->iiuListMutex );
|
||||
epicsAutoMutex autoMutex ( this->iiuListMutex );
|
||||
|
||||
tsDLIterBD < tcpiiu > piiu ( this->iiuList.first () );
|
||||
while ( piiu.valid () ) {
|
||||
@@ -261,7 +261,7 @@ void cac::processRecvBacklog ()
|
||||
}
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
piiu->disconnectAllChan ( *this->pudpiiu );
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ void cac::flush ()
|
||||
/*
|
||||
* set the push pending flag on all virtual circuits
|
||||
*/
|
||||
osiAutoMutex autoMutex ( this->iiuListMutex );
|
||||
epicsAutoMutex autoMutex ( this->iiuListMutex );
|
||||
tsDLIterBD <tcpiiu> piiu ( this->iiuList.first () );
|
||||
while ( piiu.valid () ) {
|
||||
piiu->flush ();
|
||||
@@ -312,7 +312,7 @@ void cac::show ( unsigned level ) const
|
||||
this, this->pUserName );
|
||||
if ( level > 0u ) {
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->iiuListMutex );
|
||||
epicsAutoMutex autoMutex ( this->iiuListMutex );
|
||||
|
||||
tsDLIterConstBD < tcpiiu > piiu ( this->iiuList.first () );
|
||||
while ( piiu.valid () ) {
|
||||
@@ -396,7 +396,7 @@ void cac::signalRecvActivity ()
|
||||
*/
|
||||
bhe * cac::lookupBeaconInetAddr (const inetAddrID &ina)
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
bhe *pBHE;
|
||||
pBHE = this->beaconTable.lookup (ina);
|
||||
return pBHE;
|
||||
@@ -407,7 +407,7 @@ bhe * cac::lookupBeaconInetAddr (const inetAddrID &ina)
|
||||
*/
|
||||
bhe *cac::createBeaconHashEntry (const inetAddrID &ina, const osiTime &initialTimeStamp)
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
bhe *pBHE;
|
||||
|
||||
pBHE = this->beaconTable.lookup ( ina );
|
||||
@@ -429,7 +429,7 @@ bhe *cac::createBeaconHashEntry (const inetAddrID &ina, const osiTime &initialTi
|
||||
*/
|
||||
void cac::beaconNotify ( const inetAddrID &addr )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
bhe *pBHE;
|
||||
unsigned port;
|
||||
int netChange;
|
||||
@@ -616,7 +616,7 @@ bool cac::ioComplete () const
|
||||
|
||||
void cac::accessRightsNotify ( unsigned id, caar ar )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
nciu * pChan = this->chanTable.lookup ( id );
|
||||
if ( pChan ) {
|
||||
pChan->accessRightsStateChange ( ar );
|
||||
@@ -626,7 +626,7 @@ void cac::accessRightsNotify ( unsigned id, caar ar )
|
||||
void cac::connectChannel ( bool v44Ok, unsigned id,
|
||||
unsigned nativeType, unsigned long nativeCount, unsigned sid )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
nciu * pChan = this->chanTable.lookup ( id );
|
||||
if ( pChan ) {
|
||||
unsigned sidTmp;
|
||||
@@ -643,7 +643,7 @@ void cac::connectChannel ( bool v44Ok, unsigned id,
|
||||
// this is to only be used by early protocol revisions
|
||||
void cac::connectChannel ( unsigned id )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
nciu * pChan = this->chanTable.lookup ( id );
|
||||
if ( pChan ) {
|
||||
pChan->connect ();
|
||||
@@ -652,7 +652,7 @@ void cac::connectChannel ( unsigned id )
|
||||
|
||||
void cac::channelDestroy ( unsigned id )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
nciu * pChan = this->chanTable.lookup ( id );
|
||||
// channel should already have been deleted
|
||||
if ( pChan ) {
|
||||
@@ -662,7 +662,7 @@ void cac::channelDestroy ( unsigned id )
|
||||
|
||||
void cac::disconnectChannel ( unsigned id )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
nciu * pChan = this->chanTable.lookup ( id );
|
||||
if ( pChan ) {
|
||||
assert ( this->pudpiiu && this->pSearchTmr );
|
||||
@@ -673,19 +673,19 @@ void cac::disconnectChannel ( unsigned id )
|
||||
|
||||
void cac::installCASG (CASG &sg)
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
this->sgTable.add ( sg );
|
||||
}
|
||||
|
||||
void cac::uninstallCASG (CASG &sg)
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
this->sgTable.remove ( sg );
|
||||
}
|
||||
|
||||
CASG * cac::lookupCASG (unsigned id)
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
CASG * psg = this->sgTable.lookup ( id );
|
||||
if ( psg ) {
|
||||
if ( ! psg->verify () ) {
|
||||
@@ -734,7 +734,7 @@ bool cac::createChannelIO (const char *pName, cacChannel &chan)
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
chan.attachIO ( *pNetChan );
|
||||
this->chanTable.add ( *pNetChan );
|
||||
this->pudpiiu->attachChannel ( *pNetChan );
|
||||
@@ -748,7 +748,7 @@ bool cac::createChannelIO (const char *pName, cacChannel &chan)
|
||||
}
|
||||
}
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
this->localChanList.add ( *pIO );
|
||||
}
|
||||
return true;
|
||||
@@ -756,14 +756,14 @@ bool cac::createChannelIO (const char *pName, cacChannel &chan)
|
||||
|
||||
void cac::uninstallLocalChannel ( cacLocalChannelIO &localIO )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
this->localChanList.remove ( localIO );
|
||||
}
|
||||
|
||||
bool cac::setupUDP ()
|
||||
{
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
|
||||
if ( this->pudpiiu ) {
|
||||
return true;
|
||||
@@ -802,7 +802,7 @@ bool cac::setupUDP ()
|
||||
|
||||
void cac::registerForFileDescriptorCallBack ( CAFDHANDLER *pFunc, void *pArg )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
this->fdRegFunc = pFunc;
|
||||
this->fdRegArg = pArg;
|
||||
}
|
||||
@@ -823,7 +823,7 @@ void cac::disableCallbackPreemption ()
|
||||
|
||||
void cac::changeExceptionEvent ( caExceptionHandler *pfunc, void *arg )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
if ( pfunc ) {
|
||||
this->ca_exception_func = pfunc;
|
||||
this->ca_exception_arg = arg;
|
||||
@@ -858,7 +858,7 @@ void cac::genLocalExcepWFL (long stat, const char *ctx, const char *pFile, unsig
|
||||
args.lineNo = lineNo;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
pExceptionFunc = this->ca_exception_func;
|
||||
args.usr = this->ca_exception_arg;
|
||||
}
|
||||
@@ -883,7 +883,7 @@ void cac::repeaterSubscribeConfirmNotify ()
|
||||
|
||||
void cac::replaceErrLogHandler ( caPrintfFunc *ca_printf_func )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
if ( ca_printf_func ) {
|
||||
this->pVPrintfFunc = ca_printf_func;
|
||||
}
|
||||
@@ -908,7 +908,7 @@ tcpiiu * cac::constructTCPIIU ( const osiSockAddr &addr, unsigned minorVersion )
|
||||
* look for an existing virtual circuit
|
||||
*/
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
pBHE = this->lookupBeaconInetAddr ( addr.ia );
|
||||
if ( ! pBHE ) {
|
||||
pBHE = this->createBeaconHashEntry ( addr.ia, osiTime () );
|
||||
@@ -929,7 +929,7 @@ tcpiiu * cac::constructTCPIIU ( const osiSockAddr &addr, unsigned minorVersion )
|
||||
}
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->iiuListMutex );
|
||||
epicsAutoMutex autoMutex ( this->iiuListMutex );
|
||||
piiu = iiuListLimbo.get ();
|
||||
}
|
||||
|
||||
@@ -942,18 +942,18 @@ tcpiiu * cac::constructTCPIIU ( const osiSockAddr &addr, unsigned minorVersion )
|
||||
|
||||
if ( piiu->fullyConstructed () ) {
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->iiuListMutex );
|
||||
epicsAutoMutex autoMutex ( this->iiuListMutex );
|
||||
this->iiuList.add ( *piiu );
|
||||
}
|
||||
if ( ! piiu->initiateConnect ( addr, minorVersion, *pBHE, this->ipToAEngine ) ) {
|
||||
osiAutoMutex autoMutex ( this->iiuListMutex );
|
||||
epicsAutoMutex autoMutex ( this->iiuListMutex );
|
||||
this->iiuList.remove ( *piiu );
|
||||
this->iiuListLimbo.add ( *piiu );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
if ( ! this->enablePreemptiveCallback && this->fdRegFunc ) {
|
||||
( * this->fdRegFunc )
|
||||
( (void *) this->fdRegArg, piiu->getSock (), TRUE );
|
||||
@@ -976,7 +976,7 @@ void cac::lookupChannelAndTransferToTCP ( unsigned cid, unsigned sid,
|
||||
tcpiiu *allocpiiu;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
nciu *chan;
|
||||
|
||||
/*
|
||||
@@ -1022,7 +1022,7 @@ void cac::lookupChannelAndTransferToTCP ( unsigned cid, unsigned sid,
|
||||
void cac::destroyNCIU ( nciu & chan )
|
||||
{
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->defaultMutex );
|
||||
epicsAutoMutex autoMutex ( this->defaultMutex );
|
||||
nciu *pChan = this->chanTable.remove ( chan );
|
||||
assert ( pChan = &chan );
|
||||
chan.getPIIU ()->detachChannel ( chan );
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "tsDLList.h"
|
||||
#include "osiMutex.h"
|
||||
#include "epicsMutex.h"
|
||||
|
||||
#include "shareLib.h"
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
private:
|
||||
};
|
||||
|
||||
class cacServiceList : private osiMutex {
|
||||
class cacServiceList : private epicsMutex {
|
||||
public:
|
||||
epicsShareFunc cacServiceList ();
|
||||
epicsShareFunc void registerService ( cacServiceIO &service );
|
||||
|
||||
+21
-21
@@ -47,8 +47,8 @@
|
||||
#include "osiSem.h"
|
||||
#include "osiThread.h"
|
||||
#include "osiTimer.h"
|
||||
#include "osiMutex.h"
|
||||
#include "osiEvent.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsEvent.h"
|
||||
#include "resourceLib.h"
|
||||
#include "localHostName.h"
|
||||
#include "ipAddrToAsciiAsynchronous.h"
|
||||
@@ -236,8 +236,8 @@ class netiiu;
|
||||
|
||||
class nciuPrivate {
|
||||
private:
|
||||
osiMutex mutex;
|
||||
osiEvent ptrLockReleaseWakeup;
|
||||
epicsMutex mutex;
|
||||
epicsEvent ptrLockReleaseWakeup;
|
||||
|
||||
friend class nciu;
|
||||
};
|
||||
@@ -521,7 +521,7 @@ public:
|
||||
|
||||
protected:
|
||||
cac * pCAC () const;
|
||||
mutable osiMutex mutex;
|
||||
mutable epicsMutex mutex;
|
||||
private:
|
||||
tsDLList < nciu > channelList;
|
||||
class cac *pClientCtx;
|
||||
@@ -537,7 +537,7 @@ extern limboiiu limboIIU;
|
||||
|
||||
class udpiiu;
|
||||
|
||||
class searchTimer : private osiTimer, private osiMutex {
|
||||
class searchTimer : private osiTimer, private epicsMutex {
|
||||
|
||||
public:
|
||||
searchTimer ( udpiiu &iiu, osiTimerQueue &queue );
|
||||
@@ -761,7 +761,7 @@ public:
|
||||
bool alive () const;
|
||||
bhe * getBHE () const;
|
||||
private:
|
||||
osiMutex flushMutex; // only one thread flushes at a time
|
||||
epicsMutex flushMutex; // only one thread flushes at a time
|
||||
chronIntIdResTable < baseNMIU > ioTable;
|
||||
comQueSend sendQue;
|
||||
comQueRecv recvQue;
|
||||
@@ -918,11 +918,11 @@ private:
|
||||
// and therefore reduces the chance of creating
|
||||
// a deadlock window during code maintenance.
|
||||
//
|
||||
osiEvent recvActivity;
|
||||
epicsEvent recvActivity;
|
||||
class cac *pcac;
|
||||
osiEvent exit;
|
||||
osiEvent processingDone;
|
||||
mutable osiMutex mutex;
|
||||
epicsEvent exit;
|
||||
epicsEvent processingDone;
|
||||
mutable epicsMutex mutex;
|
||||
unsigned enableRefCount;
|
||||
unsigned blockingForCompletion;
|
||||
bool processing;
|
||||
@@ -937,9 +937,9 @@ public:
|
||||
void signalShutDown ();
|
||||
void signalActivity ();
|
||||
private:
|
||||
osiEvent sendActivity;
|
||||
epicsEvent sendActivity;
|
||||
class cac &cacRef;
|
||||
osiEvent exit;
|
||||
epicsEvent exit;
|
||||
bool shutDown;
|
||||
};
|
||||
|
||||
@@ -994,8 +994,8 @@ private:
|
||||
unsigned magic;
|
||||
unsigned long opPendCount;
|
||||
unsigned long seqNo;
|
||||
osiEvent sem;
|
||||
osiMutex mutex;
|
||||
epicsEvent sem;
|
||||
epicsMutex mutex;
|
||||
tsDLList <syncGroupNotify> ioList;
|
||||
|
||||
static tsFreeList < struct CASG, 128 > freeList;
|
||||
@@ -1018,10 +1018,10 @@ public:
|
||||
void showOutstandingIO ( unsigned level ) const;
|
||||
void waitForCompletionOfIO ( double delaySec );
|
||||
private:
|
||||
unsigned pndrecvcnt;
|
||||
unsigned readSeq;
|
||||
osiMutex mutex;
|
||||
osiEvent ioDone;
|
||||
unsigned pndrecvcnt;
|
||||
unsigned readSeq;
|
||||
epicsMutex mutex;
|
||||
epicsEvent ioDone;
|
||||
};
|
||||
|
||||
//
|
||||
@@ -1125,9 +1125,9 @@ private:
|
||||
osiTime programBeginTime;
|
||||
double connTMO;
|
||||
// defaultMutex can be applied if iiuListMutex is already applied
|
||||
mutable osiMutex defaultMutex;
|
||||
mutable epicsMutex defaultMutex;
|
||||
// iiuListMutex must not be applied if defaultMutex is already applied
|
||||
mutable osiMutex iiuListMutex;
|
||||
mutable epicsMutex iiuListMutex;
|
||||
osiTimerQueue *pTimerQueue;
|
||||
caExceptionHandler *ca_exception_func;
|
||||
void *ca_exception_arg;
|
||||
|
||||
+8
-8
@@ -27,7 +27,7 @@ netiiu::~netiiu ()
|
||||
|
||||
void netiiu::show ( unsigned level ) const
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
printf ( "network IO base class\n" );
|
||||
if ( level > 1 ) {
|
||||
@@ -52,7 +52,7 @@ unsigned netiiu::channelCount () const
|
||||
// calling this
|
||||
void netiiu::attachChannel ( nciu &chan )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
this->channelList.add ( chan );
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void netiiu::attachChannel ( nciu &chan )
|
||||
void netiiu::detachChannel ( nciu &chan )
|
||||
{
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
this->channelList.remove ( chan );
|
||||
if ( this->channelList.count () == 0u ) {
|
||||
this->lastChannelDetachNotify ();
|
||||
@@ -76,7 +76,7 @@ void netiiu::disconnectAllChan ( netiiu & newiiu )
|
||||
tsDLList < nciu > list;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
tsDLIterBD < nciu > chan ( this->channelList.first () );
|
||||
while ( chan.valid () ) {
|
||||
tsDLIterBD < nciu > next = chan.itemAfter ();
|
||||
@@ -89,14 +89,14 @@ void netiiu::disconnectAllChan ( netiiu & newiiu )
|
||||
}
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( newiiu.mutex );
|
||||
epicsAutoMutex autoMutex ( newiiu.mutex );
|
||||
newiiu.channelList.add ( list );
|
||||
}
|
||||
}
|
||||
|
||||
void netiiu::connectTimeoutNotify ()
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
tsDLIterBD < nciu > chan ( this->channelList.first () );
|
||||
while ( chan.valid () ) {
|
||||
chan->connectTimeoutNotify ();
|
||||
@@ -106,7 +106,7 @@ void netiiu::connectTimeoutNotify ()
|
||||
|
||||
void netiiu::resetChannelRetryCounts ()
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
tsDLIterBD < nciu > chan ( this->channelList.first () );
|
||||
while ( chan.valid () ) {
|
||||
chan->resetRetryCount ();
|
||||
@@ -118,7 +118,7 @@ bool netiiu::searchMsg ( unsigned short retrySeqNumber, unsigned &retryNoForThis
|
||||
{
|
||||
bool status;
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
tsDLIterBD < nciu > chan = this->channelList.first ();
|
||||
if ( chan.valid () ) {
|
||||
|
||||
@@ -44,7 +44,7 @@ void recvProcessThread::entryPoint ()
|
||||
while ( ! this->shutDown ) {
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
if ( this->enableRefCount ) {
|
||||
this->processing = true;
|
||||
}
|
||||
@@ -56,7 +56,7 @@ void recvProcessThread::entryPoint ()
|
||||
|
||||
bool signalNeeded;
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
this->processing = false;
|
||||
signalNeeded = this->blockingForCompletion > 0u;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ void recvProcessThread::enable ()
|
||||
unsigned copy;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
assert ( this->enableRefCount < UINT_MAX );
|
||||
copy = this->enableRefCount;
|
||||
this->enableRefCount++;
|
||||
@@ -97,7 +97,7 @@ void recvProcessThread::disable ()
|
||||
bool wakeupNeeded;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( ! this->processing ) {
|
||||
assert ( this->enableRefCount != 0u );
|
||||
@@ -113,7 +113,7 @@ void recvProcessThread::disable ()
|
||||
this->processingDone.wait ();
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( ! this->processing ) {
|
||||
assert ( this->enableRefCount > 0u );
|
||||
@@ -138,7 +138,7 @@ void recvProcessThread::signalActivity ()
|
||||
|
||||
void recvProcessThread::show ( unsigned level ) const
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
printf ( "CA receive processing thread at %p state=%s\n",
|
||||
this, this->processing ? "busy" : "idle");
|
||||
if ( level > 0u ) {
|
||||
|
||||
+46
-46
@@ -105,7 +105,7 @@ extern "C" void cacSendThreadTCP ( void *pParam )
|
||||
}
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( piiu->mutex );
|
||||
epicsAutoMutex autoMutex ( piiu->mutex );
|
||||
laborNeeded = piiu->busyStateDetected != piiu->flowControlActive;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ extern "C" void cacSendThreadTCP ( void *pParam )
|
||||
}
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( piiu->mutex );
|
||||
epicsAutoMutex autoMutex ( piiu->mutex );
|
||||
laborNeeded = piiu->echoRequestPending;
|
||||
piiu->echoRequestPending = false;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ extern "C" void cacSendThreadTCP ( void *pParam )
|
||||
}
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( piiu->mutex );
|
||||
epicsAutoMutex autoMutex ( piiu->mutex );
|
||||
laborNeeded = piiu->flushPending;
|
||||
piiu->flushPending = false;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ unsigned tcpiiu::recvBytes ( void *pBuf, unsigned nBytesInBuf )
|
||||
totalBytes = static_cast <unsigned> ( status );
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
if ( nBytesInBuf == totalBytes ) {
|
||||
if ( this->contigRecvMsgCount >= contiguousMsgCountWhichTriggersFlowControl ) {
|
||||
this->busyStateDetected = true;
|
||||
@@ -300,7 +300,7 @@ extern "C" void cacRecvThreadTCP ( void *pParam )
|
||||
piiu->connect ();
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( piiu->mutex );
|
||||
epicsAutoMutex autoMutex ( piiu->mutex );
|
||||
if ( piiu->state == iiu_connected ) {
|
||||
unsigned priorityOfSend;
|
||||
threadBoolStatus tbs;
|
||||
@@ -330,7 +330,7 @@ extern "C" void cacRecvThreadTCP ( void *pParam )
|
||||
while ( piiu->state == iiu_connected ) {
|
||||
unsigned nBytes;
|
||||
{
|
||||
osiAutoMutex autoMutex ( piiu->mutex );
|
||||
epicsAutoMutex autoMutex ( piiu->mutex );
|
||||
nBytes = piiu->recvQue.occupiedBytes ();
|
||||
}
|
||||
if ( nBytes >= 0x4000 ) {
|
||||
@@ -342,7 +342,7 @@ extern "C" void cacRecvThreadTCP ( void *pParam )
|
||||
unsigned nBytesIn = pComBuf->fillFromWire ( *piiu );
|
||||
if ( nBytesIn ) {
|
||||
{
|
||||
osiAutoMutex autoMutex ( piiu->mutex );
|
||||
epicsAutoMutex autoMutex ( piiu->mutex );
|
||||
piiu->recvQue.pushLastComBufReceived ( *pComBuf );
|
||||
}
|
||||
piiu->pCAC ()->signalRecvActivity ();
|
||||
@@ -434,7 +434,7 @@ bool tcpiiu::initiateConnect ( const osiSockAddr &addrIn, unsigned minorVersion,
|
||||
int status;
|
||||
int flag;
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
this->addr = addrIn;
|
||||
|
||||
@@ -543,7 +543,7 @@ void tcpiiu::connect ()
|
||||
|
||||
this->cancelSendWatchdog ();
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( this->state == iiu_connecting ) {
|
||||
// put the iiu into the connected state
|
||||
@@ -589,7 +589,7 @@ void tcpiiu::cleanShutdown ()
|
||||
this->cancelSendWatchdog ();
|
||||
this->cancelRecvWatchdog ();
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( this->state == iiu_connected ) {
|
||||
int status = ::shutdown ( this->sock, SD_BOTH );
|
||||
@@ -635,7 +635,7 @@ void tcpiiu::forcedShutdown ()
|
||||
this->cancelSendWatchdog ();
|
||||
this->cancelRecvWatchdog ();
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( this->state != iiu_disconnected ) {
|
||||
// force abortive shutdown sequence (discard outstanding sends
|
||||
@@ -671,7 +671,7 @@ void tcpiiu::disconnect ()
|
||||
assert ( this->fullyConstructedFlag );
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
this->ioTable.traverse ( &baseNMIU::destroy );
|
||||
}
|
||||
|
||||
@@ -738,7 +738,7 @@ void tcpiiu::disconnect ()
|
||||
* free message body cache
|
||||
*/
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( this->pCurData ) {
|
||||
free ( this->pCurData );
|
||||
@@ -813,7 +813,7 @@ bool tcpiiu::isVirtaulCircuit ( const char *pChannelName, const osiSockAddr &add
|
||||
}
|
||||
|
||||
if ( ! match ) {
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
char acc[64];
|
||||
if ( this->pHostNameCache ) {
|
||||
this->pHostNameCache->hostName ( acc, sizeof ( acc ) );
|
||||
@@ -831,7 +831,7 @@ bool tcpiiu::isVirtaulCircuit ( const char *pChannelName, const osiSockAddr &add
|
||||
|
||||
void tcpiiu::show ( unsigned level ) const
|
||||
{
|
||||
osiAutoMutex autoMuext ( this->mutex );
|
||||
epicsAutoMutex autoMuext ( this->mutex );
|
||||
char buf[256];
|
||||
if ( this->pHostNameCache ) {
|
||||
this->pHostNameCache->hostName ( buf, sizeof ( buf ) );
|
||||
@@ -877,7 +877,7 @@ void tcpiiu::show ( unsigned level ) const
|
||||
bool tcpiiu::setEchoRequestPending ()
|
||||
{
|
||||
{
|
||||
osiAutoMutex autoMuext ( this->mutex );
|
||||
epicsAutoMutex autoMuext ( this->mutex );
|
||||
this->echoRequestPending = true;
|
||||
}
|
||||
this->flush ();
|
||||
@@ -909,7 +909,7 @@ int tcpiiu::hostNameSetRequest ()
|
||||
this->flush ();
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( postSize + 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -945,7 +945,7 @@ int tcpiiu::userNameSetRequest ()
|
||||
this->flush ();
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( postSize + 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -969,7 +969,7 @@ int tcpiiu::disableFlowControlRequest ()
|
||||
this->flush ();
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -990,7 +990,7 @@ int tcpiiu::enableFlowControlRequest ()
|
||||
this->flush ();
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1011,7 +1011,7 @@ int tcpiiu::noopRequest ()
|
||||
this->flush ();
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1032,7 +1032,7 @@ int tcpiiu::echoRequest ()
|
||||
this->flush ();
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1181,7 +1181,7 @@ void tcpiiu::exceptionRespAction ()
|
||||
caHdr *req = (caHdr *) this->pCurData;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( this->pHostNameCache ) {
|
||||
this->pHostNameCache->hostName ( hostName, sizeof ( hostName ) );
|
||||
@@ -1263,7 +1263,7 @@ void tcpiiu::badTCPRespAction ()
|
||||
char hostName[64];
|
||||
bool hostNameInit;
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
if ( this->pHostNameCache ) {
|
||||
this->pHostNameCache->hostName ( hostName, sizeof ( hostName ) );
|
||||
hostNameInit = true;
|
||||
@@ -1294,7 +1294,7 @@ void tcpiiu::processIncoming ()
|
||||
// fetch a complete message header
|
||||
//
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( ! this->msgHeaderAvailable ) {
|
||||
|
||||
@@ -1438,7 +1438,7 @@ int tcpiiu::writeRequest ( nciu &chan, unsigned type, unsigned nElem, const void
|
||||
this->flushToWire ( true );
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( postcnt + 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1501,7 +1501,7 @@ int tcpiiu::writeNotifyRequest ( nciu &chan, cacNotify ¬ify, unsigned type,
|
||||
this->flushToWire ( true );
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( postcnt + 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1549,7 +1549,7 @@ int tcpiiu::readCopyRequest ( nciu &chan, unsigned type, unsigned nElem, void *p
|
||||
this->flushToWire ( true );
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1592,7 +1592,7 @@ int tcpiiu::readNotifyRequest ( nciu &chan, cacNotify ¬ify,
|
||||
this->flushToWire ( true );
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1646,7 +1646,7 @@ int tcpiiu::createChannelRequest ( nciu &chan )
|
||||
this->flush ();
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( postCnt + 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1683,7 +1683,7 @@ int tcpiiu::clearChannelRequest ( nciu &chan )
|
||||
this->flushToWire ( true );
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1733,7 +1733,7 @@ int tcpiiu::subscriptionRequest ( netSubscription &subscr, bool userThread )
|
||||
}
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 32u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1770,7 +1770,7 @@ int tcpiiu::subscriptionCancelRequest ( netSubscription &subscr )
|
||||
this->flushToWire ( true );
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
int status = this->sendQue.reserveSpace ( 16u );
|
||||
if ( status == ECA_NORMAL ) {
|
||||
@@ -1816,13 +1816,13 @@ bool tcpiiu::flushToWire ( bool userThread )
|
||||
// only one thread at a time can perform a flush. Nevertheless,
|
||||
// the primary lock must not be held while sending in order
|
||||
// to prevent push pull deadlocks
|
||||
osiAutoMutex autoFlushMutex ( this->flushMutex );
|
||||
epicsAutoMutex autoFlushMutex ( this->flushMutex );
|
||||
|
||||
while ( true ) {
|
||||
comBuf * pBuf;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
pBuf = this->sendQue.popNextComBufToSend ();
|
||||
}
|
||||
|
||||
@@ -1835,7 +1835,7 @@ bool tcpiiu::flushToWire ( bool userThread )
|
||||
pBuf->destroy ();
|
||||
|
||||
if ( ! success ) {
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
while ( ( pBuf = this->sendQue.popNextComBufToSend () ) ) {
|
||||
pBuf->destroy ();
|
||||
}
|
||||
@@ -1853,7 +1853,7 @@ bool tcpiiu::flushToWire ( bool userThread )
|
||||
void tcpiiu::ioCompletionNotify ( unsigned id, unsigned type,
|
||||
unsigned long count, const void *pData )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
baseNMIU * pmiu = this->ioTable.lookup ( id );
|
||||
if ( pmiu ) {
|
||||
pmiu->completionNotify ( type, count, pData );
|
||||
@@ -1862,7 +1862,7 @@ void tcpiiu::ioCompletionNotify ( unsigned id, unsigned type,
|
||||
|
||||
void tcpiiu::ioExceptionNotify ( unsigned id, int status, const char *pContext )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
baseNMIU * pmiu = this->ioTable.lookup ( id );
|
||||
if ( pmiu ) {
|
||||
pmiu->exceptionNotify ( status, pContext );
|
||||
@@ -1872,7 +1872,7 @@ void tcpiiu::ioExceptionNotify ( unsigned id, int status, const char *pContext )
|
||||
void tcpiiu::ioExceptionNotify ( unsigned id, int status,
|
||||
const char *pContext, unsigned type, unsigned long count )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
baseNMIU * pmiu = this->ioTable.lookup ( id );
|
||||
if ( pmiu ) {
|
||||
pmiu->exceptionNotify ( status, pContext, type, count );
|
||||
@@ -1884,7 +1884,7 @@ void tcpiiu::ioCompletionNotifyAndDestroy ( unsigned id )
|
||||
baseNMIU * pmiu;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
pmiu = this->ioTable.remove ( id );
|
||||
if ( pmiu ) {
|
||||
pmiu->channel ().tcpiiuPrivateListOfIO::eventq.remove ( *pmiu );
|
||||
@@ -1903,7 +1903,7 @@ void tcpiiu::ioCompletionNotifyAndDestroy ( unsigned id,
|
||||
baseNMIU * pmiu;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
pmiu = this->ioTable.remove ( id );
|
||||
if ( pmiu ) {
|
||||
pmiu->channel ().tcpiiuPrivateListOfIO::eventq.remove ( *pmiu );
|
||||
@@ -1921,7 +1921,7 @@ void tcpiiu::ioExceptionNotifyAndDestroy ( unsigned id, int status, const char *
|
||||
baseNMIU * pmiu;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
pmiu = this->ioTable.remove ( id );
|
||||
if ( pmiu ) {
|
||||
pmiu->channel ().tcpiiuPrivateListOfIO::eventq.remove ( *pmiu );
|
||||
@@ -1940,7 +1940,7 @@ void tcpiiu::ioExceptionNotifyAndDestroy ( unsigned id, int status,
|
||||
baseNMIU * pmiu;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
pmiu = this->ioTable.remove ( id );
|
||||
if ( pmiu ) {
|
||||
pmiu->channel ().tcpiiuPrivateListOfIO::eventq.remove ( *pmiu );
|
||||
@@ -1957,7 +1957,7 @@ void tcpiiu::ioExceptionNotifyAndDestroy ( unsigned id, int status,
|
||||
// resubscribe for monitors from this channel
|
||||
void tcpiiu::subscribeAllIO ( nciu &chan )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
if ( chan.verifyConnected ( *this ) ) {
|
||||
tsDLIterBD < baseNMIU > iter =
|
||||
chan.tcpiiuPrivateListOfIO::eventq.first ();
|
||||
@@ -1971,7 +1971,7 @@ void tcpiiu::subscribeAllIO ( nciu &chan )
|
||||
// cancel IO operations and monitor subscriptions
|
||||
void tcpiiu::disconnectAllIO ( nciu &chan )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
if ( chan.verifyConnected ( *this ) ) {
|
||||
tsDLIterBD < baseNMIU > iter =
|
||||
chan.tcpiiuPrivateListOfIO::eventq.first ();
|
||||
@@ -1990,7 +1990,7 @@ void tcpiiu::disconnectAllIO ( nciu &chan )
|
||||
|
||||
void tcpiiu::unistallSubscription ( nciu &chan, netSubscription &subscr )
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
if ( chan.verifyConnected ( *this ) ) {
|
||||
baseNMIU *p = this->ioTable.remove ( subscr );
|
||||
if ( p ) {
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ inline bool tcpiiu::fullyConstructed () const
|
||||
|
||||
inline void tcpiiu::hostName ( char *pBuf, unsigned bufLength ) const
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
if ( this->pHostNameCache ) {
|
||||
this->pHostNameCache->hostName ( pBuf, bufLength );
|
||||
}
|
||||
@@ -48,7 +48,7 @@ inline SOCKET tcpiiu::getSock () const
|
||||
inline void tcpiiu::flush ()
|
||||
{
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
this->flushPending = true;
|
||||
}
|
||||
semBinaryGive ( this->sendThreadFlushSignal );
|
||||
|
||||
+4
-4
@@ -459,7 +459,7 @@ void udpiiu::shutdown ()
|
||||
bool laborNeeded;
|
||||
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
laborNeeded = ! this->shutdownCmd;
|
||||
this->shutdownCmd = true;
|
||||
}
|
||||
@@ -741,7 +741,7 @@ bool udpiiu::pushDatagramMsg ( const caHdr &msg, const void *pExt, ca_uint16_t e
|
||||
return false;
|
||||
}
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( msgsize + this->nBytesInXmitBuf > sizeof ( this->xmitBuf ) ) {
|
||||
return false;
|
||||
@@ -767,7 +767,7 @@ void udpiiu::flush ()
|
||||
{
|
||||
osiSockAddrNode *pNode;
|
||||
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
|
||||
if ( this->nBytesInXmitBuf == 0u ) {
|
||||
return;
|
||||
@@ -831,7 +831,7 @@ SOCKET udpiiu::getSock () const
|
||||
|
||||
void udpiiu::show ( unsigned level ) const
|
||||
{
|
||||
osiAutoMutex autoMutex ( this->mutex );
|
||||
epicsAutoMutex autoMutex ( this->mutex );
|
||||
printf ( "Datagram IO circuit (and disconnected channel repository)\n");
|
||||
if ( level > 1u ) {
|
||||
this->netiiu::show ( level - 1u );
|
||||
|
||||
@@ -276,7 +276,7 @@ void caServerI::show (unsigned level) const
|
||||
printf( "Channel Access Server Status V%d.%d\n",
|
||||
CA_PROTOCOL_VERSION, CA_MINOR_VERSION);
|
||||
|
||||
this->osiMutex::show(level);
|
||||
this->epicsMutex::show(level);
|
||||
|
||||
this->lock();
|
||||
tsDLIterBD<casStrmClient> iterCl( this->clientList.first () );
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.6 2000/04/28 02:23:30 jhill
|
||||
* many, many changes
|
||||
*
|
||||
* Revision 1.5 1999/09/15 00:00:40 jhill
|
||||
* changed the field name "m_type" to "m_dataType" to avoid
|
||||
* collision with a MACRO that is defined by the SENS IP stack
|
||||
@@ -60,7 +63,7 @@
|
||||
//
|
||||
casClientMon::casClientMon(casChannelI &chan, caResId clientIdIn,
|
||||
const unsigned long count, const unsigned type,
|
||||
const casEventMask &maskIn, osiMutex &mutexIn) :
|
||||
const casEventMask &maskIn, epicsMutex &mutexIn) :
|
||||
casMonitor(clientIdIn, chan, count, type, maskIn, mutexIn)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ void casCoreClient::show (unsigned level) const
|
||||
this->casEventSys::show (level);
|
||||
printf ("\t%d io ops in progess\n", this->ioInProgList.count());
|
||||
this->ctx.show (level);
|
||||
this->osiMutex::show (level);
|
||||
this->epicsMutex::show (level);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
};
|
||||
|
||||
class ioBlockedList;
|
||||
class osiMutex;
|
||||
class epicsMutex;
|
||||
|
||||
//
|
||||
// ioBlocked
|
||||
@@ -147,7 +147,7 @@ class casMonitor : public tsDLNode<casMonitor>, public casRes {
|
||||
public:
|
||||
casMonitor(caResId clientIdIn, casChannelI &chan,
|
||||
unsigned long nElem, unsigned dbrType,
|
||||
const casEventMask &maskIn, osiMutex &mutexIn);
|
||||
const casEventMask &maskIn, epicsMutex &mutexIn);
|
||||
virtual ~casMonitor();
|
||||
|
||||
caStatus executeEvent(casMonEvent *);
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
private:
|
||||
casMonEvent overFlowEvent;
|
||||
unsigned long const nElem;
|
||||
osiMutex &mutex;
|
||||
epicsMutex &mutex;
|
||||
casChannelI &ciu;
|
||||
const casEventMask mask;
|
||||
caResId const clientId;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
//
|
||||
casMonitor::casMonitor(caResId clientIdIn, casChannelI &chan,
|
||||
unsigned long nElemIn, unsigned dbrTypeIn,
|
||||
const casEventMask &maskIn, osiMutex &mutexIn) :
|
||||
const casEventMask &maskIn, epicsMutex &mutexIn) :
|
||||
nElem(nElemIn),
|
||||
mutex(mutexIn),
|
||||
ciu(chan),
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
//
|
||||
#define epicsExportSharedSymbols
|
||||
#include "casdef.h" // sets proper def for shareLib.h defines
|
||||
#include "osiMutex.h"
|
||||
#include "epicsMutex.h"
|
||||
void casVerifyFunc(const char *pFile, unsigned line, const char *pExp);
|
||||
void serverToolDebugFunc(const char *pFile, unsigned line, const char *pComment);
|
||||
#define serverToolDebug(COMMENT) \
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
|
||||
private:
|
||||
tsDLList<casEvent> eventLogQue;
|
||||
osiMutex mutex;
|
||||
epicsMutex mutex;
|
||||
casEventPurgeEv *pPurgeEvent; // flow control purge complete event
|
||||
unsigned numEventBlocks; // N event blocks installed
|
||||
unsigned maxLogEntries; // max log entries
|
||||
@@ -166,7 +166,7 @@ class casClientMon : public casMonitor {
|
||||
public:
|
||||
casClientMon(casChannelI &, caResId clientId,
|
||||
const unsigned long count, const unsigned type,
|
||||
const casEventMask &maskIn, osiMutex &mutexIn);
|
||||
const casEventMask &maskIn, epicsMutex &mutexIn);
|
||||
virtual ~casClientMon();
|
||||
|
||||
caStatus callBack (const smartConstGDDPointer &pValue);
|
||||
@@ -294,7 +294,7 @@ protected:
|
||||
bufSizeT popCtx (const inBufCtx &); // returns actual size
|
||||
|
||||
private:
|
||||
osiMutex mutex;
|
||||
epicsMutex mutex;
|
||||
char *pBuf;
|
||||
bufSizeT bufSize;
|
||||
bufSizeT bytesInBuffer;
|
||||
@@ -389,7 +389,7 @@ protected:
|
||||
void clear ();
|
||||
|
||||
private:
|
||||
osiMutex mutex;
|
||||
epicsMutex mutex;
|
||||
char *pBuf;
|
||||
bufSizeT bufSize;
|
||||
bufSizeT stack;
|
||||
@@ -411,7 +411,7 @@ private:
|
||||
// (this will eventually support direct communication
|
||||
// between the client lib and the server lib)
|
||||
//
|
||||
class casCoreClient : public osiMutex, public ioBlocked,
|
||||
class casCoreClient : public epicsMutex, public ioBlocked,
|
||||
public casEventSys {
|
||||
|
||||
//
|
||||
@@ -815,7 +815,7 @@ class casClientMon;
|
||||
// caServerI
|
||||
//
|
||||
class caServerI :
|
||||
public osiMutex, // osiMutex must be first because it is used
|
||||
public epicsMutex, // osiMutex must be first because it is used
|
||||
// by ioBlockedList and casEventRegistry
|
||||
public caServerOS,
|
||||
public caServerIO,
|
||||
|
||||
Reference in New Issue
Block a user