fix testdbCaWaitForEvent()

sync with CA context thread(s) as well as dbCa worker.
This commit is contained in:
Michael Davidsaver
2025-10-17 16:18:43 -07:00
committed by mdavidsaver
parent bbc4c6358e
commit 71e4635d34
9 changed files with 57 additions and 5 deletions
+12
View File
@@ -717,6 +717,18 @@ int epicsStdCall ca_context_status ( ca_client_context * pcac, unsigned level )
return ECA_NORMAL;
}
extern "C"
LIBCA_API
void dbCaSyncLocal(void);
void dbCaSyncLocal(void)
{
if(struct ca_client_context * ctxt = ca_current_context()) {
// bounce for access to private data member
ctxt->sync();
}
}
/*
* ca_current_context ()
*
@@ -728,6 +728,12 @@ epicsMutex & ca_client_context::mutexRef () const
return this->mutex;
}
void ca_client_context::sync()
{
// bounce through vtable
this->pServiceContext->sync();
}
cacContext & ca_client_context::createNetworkContext (
epicsMutex & mutexIn, epicsMutex & cbMutexIn )
{
+2
View File
@@ -398,6 +398,8 @@ void cac::flush ( epicsGuard < epicsMutex > & guard )
}
}
void cac::sync() {}
unsigned cac::circuitCount (
epicsGuard < epicsMutex > & guard ) const
{
+1
View File
@@ -115,6 +115,7 @@ public:
// IO management
void flush ( epicsGuard < epicsMutex > & guard );
void sync ();
bool executeResponse ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, caHdrLargeArray &, char *pMsgBody );
+1
View File
@@ -279,6 +279,7 @@ public:
cacChannel::priLev = cacChannel::priorityDefault ) = 0;
virtual void flush (
epicsGuard < epicsMutex > & ) = 0;
virtual void sync () = 0;
virtual unsigned circuitCount (
epicsGuard < epicsMutex > & ) const = 0;
virtual void selfTest (
+1
View File
@@ -349,6 +349,7 @@ public:
void destroyPutCallback ( epicsGuard < epicsMutex > &, putCallback & );
void destroySubscription ( epicsGuard < epicsMutex > &, oldSubscription & );
epicsMutex & mutexRef () const;
void sync();
template < class T >
void whenThereIsAnExceptionDestroySyncGroupIO ( epicsGuard < epicsMutex > &, T & );