summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsachin gupta <sgupta2m@in.ibm.com>2014-05-08 00:17:22 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-08 14:38:59 -0500
commitede62c2119ed0996b744b022cb9a014ef91439d6 (patch)
treedf7fb4b9510aa48673e542dd11d6be111db970e1 /src
parent34e3f40d66d04197875ca282e216f248cd607be7 (diff)
downloadtalos-hostboot-ede62c2119ed0996b744b022cb9a014ef91439d6.tar.gz
talos-hostboot-ede62c2119ed0996b744b022cb9a014ef91439d6.zip
PRD: Fix mutex issue
Change-Id: I2a63b3c16c03fb0763613d9419d14b4bf1d43365 CQ: SW260692 Backport: release-fips810 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11010 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Tested-by: Jenkins Server Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11027
Diffstat (limited to 'src')
-rw-r--r--src/usr/diag/prdf/prdfGlobal.H8
-rwxr-xr-xsrc/usr/diag/prdf/prdfMain.C10
2 files changed, 12 insertions, 6 deletions
diff --git a/src/usr/diag/prdf/prdfGlobal.H b/src/usr/diag/prdf/prdfGlobal.H
index 5ebd03f03..0994f2bc7 100644
--- a/src/usr/diag/prdf/prdfGlobal.H
+++ b/src/usr/diag/prdf/prdfGlobal.H
@@ -186,16 +186,12 @@ inline prdfScopeMutex::~prdfScopeMutex()
ivMutex->unlock();
}
-/**
- * @brief Mutex to prevent concurrent accesses
- *
- */
-static prdfMutex g_mutex;
+extern prdfMutex g_prdMutex;
/**
* @brief macro to acquire global scope mutex
*/
#define PRDF_SYSTEM_SCOPELOCK \
- prdfScopeMutex dataLock(g_mutex);
+ prdfScopeMutex dataLock(g_prdMutex);
#endif // PRDF_GLOBAL_HB_H
diff --git a/src/usr/diag/prdf/prdfMain.C b/src/usr/diag/prdf/prdfMain.C
index f70b4af5b..e320c4b94 100755
--- a/src/usr/diag/prdf/prdfMain.C
+++ b/src/usr/diag/prdf/prdfMain.C
@@ -39,6 +39,16 @@
using namespace TARGETING;
using namespace HWAS;
+//------------------------------------------------------------------------------
+// Global variable
+//------------------------------------------------------------------------------
+
+/**
+ * @brief Mutex to prevent concurrent accesses
+ *
+ */
+prdfMutex g_prdMutex;
+
namespace PRDF
{
OpenPOWER on IntegriCloud