usue oldCAC specific mutex

This commit is contained in:
Jeff Hill
2002-04-25 18:24:11 +00:00
parent 2e11e7aacd
commit f670103a0c
2 changed files with 38 additions and 10 deletions

View File

@@ -14,6 +14,10 @@
* 505 665 1831
*/
#ifdef _MSC_VER
# pragma warning(disable:4355)
#endif
#include <stdio.h>
#define epicsExportSharedSymbols
@@ -36,7 +40,7 @@ oldCAC::~oldCAC ()
void oldCAC::changeExceptionEvent ( caExceptionHandler *pfunc, void *arg )
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
this->ca_exception_func = pfunc;
this->ca_exception_arg = arg;
// should block here until releated callback in progress completes
@@ -44,7 +48,7 @@ void oldCAC::changeExceptionEvent ( caExceptionHandler *pfunc, void *arg )
void oldCAC::replaceErrLogHandler ( caPrintfFunc *ca_printf_func )
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
if ( ca_printf_func ) {
this->pVPrintfFunc = ca_printf_func;
}
@@ -56,7 +60,7 @@ void oldCAC::replaceErrLogHandler ( caPrintfFunc *ca_printf_func )
void oldCAC::registerForFileDescriptorCallBack ( CAFDHANDLER *pFunc, void *pArg )
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
this->fdRegFunc = pFunc;
this->fdRegArg = pArg;
// should block here until releated callback in progress completes
@@ -80,7 +84,7 @@ int oldCAC::vPrintf ( const char *pformat, va_list args ) const // X aCC 361
{
caPrintfFunc *pFunc;
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
pFunc = this->pVPrintfFunc;
}
if ( pFunc ) {
@@ -98,7 +102,7 @@ void oldCAC::exception ( int stat, const char *pCtx,
caExceptionHandler *pFunc;
void *pArg;
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
pFunc = this->ca_exception_func;
pArg = this->ca_exception_arg;
}
@@ -130,7 +134,7 @@ void oldCAC::exception ( int status, const char *pContext,
caExceptionHandler *pFunc;
void *pArg;
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
pFunc = this->ca_exception_func;
pArg = this->ca_exception_arg;
}
@@ -163,7 +167,7 @@ void oldCAC::fdWasCreated ( int fd )
CAFDHANDLER *pFunc;
void *pArg;
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
pFunc = this->fdRegFunc;
pArg = this->fdRegArg;
}
@@ -177,7 +181,7 @@ void oldCAC::fdWasDestroyed ( int fd )
CAFDHANDLER *pFunc;
void *pArg;
{
epicsGuard < epicsMutex > autoMutex ( this->mutex );
epicsGuard < oldCACMutex > autoMutex ( this->mutex );
pFunc = this->fdRegFunc;
pArg = this->fdRegArg;
}