From 5b09bb6e7199c5a8bbc327d602a25aaed74a3c4e Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 3 Apr 2019 15:18:18 -0700 Subject: [PATCH] Set file+line for epicsMutex Makes the output of epicsMutexShowAll more useful wrt. libca. --- modules/ca/src/client/ca_client_context.cpp | 2 ++ modules/ca/src/client/repeaterSubscribeTimer.cpp | 1 + modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp | 1 + modules/libcom/src/timer/timerQueue.cpp | 1 + modules/libcom/src/timer/timerQueueActiveMgr.cpp | 1 + 5 files changed, 6 insertions(+) diff --git a/modules/ca/src/client/ca_client_context.cpp b/modules/ca/src/client/ca_client_context.cpp index 2bb3e24a8..08562612a 100644 --- a/modules/ca/src/client/ca_client_context.cpp +++ b/modules/ca/src/client/ca_client_context.cpp @@ -67,6 +67,8 @@ cacService * ca_client_context::pDefaultService = 0; epicsMutex * ca_client_context::pDefaultServiceInstallMutex; ca_client_context::ca_client_context ( bool enablePreemptiveCallback ) : + mutex(__FILE__, __LINE__), + cbMutex(__FILE__, __LINE__), createdByThread ( epicsThreadGetIdSelf () ), ca_exception_func ( 0 ), ca_exception_arg ( 0 ), pVPrintfFunc ( errlogVprintf ), fdRegFunc ( 0 ), fdRegArg ( 0 ), diff --git a/modules/ca/src/client/repeaterSubscribeTimer.cpp b/modules/ca/src/client/repeaterSubscribeTimer.cpp index 948ccebd5..71ba5ad06 100644 --- a/modules/ca/src/client/repeaterSubscribeTimer.cpp +++ b/modules/ca/src/client/repeaterSubscribeTimer.cpp @@ -37,6 +37,7 @@ repeaterSubscribeTimer::repeaterSubscribeTimer ( epicsMutex & cbMutexIn, cacContextNotify & ctxNotifyIn ) : timer ( queueIn.createTimer () ), iiu ( iiuIn ), cbMutex ( cbMutexIn ),ctxNotify ( ctxNotifyIn ), + stateMutex(__FILE__, __LINE__), attempts ( 0 ), registered ( false ), once ( false ) { } diff --git a/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp b/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp index 4301612c9..ec2c16ded 100644 --- a/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp +++ b/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp @@ -171,6 +171,7 @@ ipAddrToAsciiEngine & ipAddrToAsciiEngine::allocate () } ipAddrToAsciiGlobal::ipAddrToAsciiGlobal () : + mutex(__FILE__, __LINE__), thread ( *this, "ipToAsciiProxy", epicsThreadGetStackSize(epicsThreadStackBig), epicsThreadPriorityLow ), diff --git a/modules/libcom/src/timer/timerQueue.cpp b/modules/libcom/src/timer/timerQueue.cpp index 5a798d4d4..8f7f98e12 100644 --- a/modules/libcom/src/timer/timerQueue.cpp +++ b/modules/libcom/src/timer/timerQueue.cpp @@ -25,6 +25,7 @@ const double timerQueue :: exceptMsgMinPeriod = 60.0 * 5.0; // seconds epicsTimerQueue::~epicsTimerQueue () {} timerQueue::timerQueue ( epicsTimerQueueNotify & notifyIn ) : + mutex(__FILE__, __LINE__), notify ( notifyIn ), pExpireTmr ( 0 ), processThread ( 0 ), diff --git a/modules/libcom/src/timer/timerQueueActiveMgr.cpp b/modules/libcom/src/timer/timerQueueActiveMgr.cpp index d6349a84c..eff2e0c53 100644 --- a/modules/libcom/src/timer/timerQueueActiveMgr.cpp +++ b/modules/libcom/src/timer/timerQueueActiveMgr.cpp @@ -20,6 +20,7 @@ #include "timerPrivate.h" timerQueueActiveMgr::timerQueueActiveMgr () + :mutex(__FILE__, __LINE__) { }