summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/usr/diag/prdf/common/prdfMain_common.C11
-rw-r--r--src/usr/diag/prdf/prdfGlobal.H6
2 files changed, 17 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C
index f11bec2b7..be56e4835 100755
--- a/src/usr/diag/prdf/common/prdfMain_common.C
+++ b/src/usr/diag/prdf/common/prdfMain_common.C
@@ -88,6 +88,11 @@ errlHndl_t initialize()
{
PRDF_ENTER( "PRDF::initialize()" );
+ // will unlock when going out of scope
+ // this lock is recursive so it's ok to lock again
+ // as long as calling from the same thread
+ PRDF_SYSTEM_SCOPELOCK;
+
g_prd_errlHndl = NULL; // This forces any previous errls to be committed
// Synchronize SCOM access to hardware
@@ -151,6 +156,9 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType,
{
PRDF_ENTER( "PRDF::main() Global attnType=%04X", i_attentionType );
+ // will unlock when going out of scope
+ PRDF_SYSTEM_SCOPELOCK;
+
g_prd_errlHndl = NULL;
uint32_t rc = SUCCESS;
@@ -276,6 +284,9 @@ errlHndl_t refresh()
errlHndl_t l_errl = NULL;
+ // will unlock when going out of scope
+ PRDF_SYSTEM_SCOPELOCK;
+
if((false == g_initialized) || (NULL == systemPtr))
{
l_errl = initialize();
diff --git a/src/usr/diag/prdf/prdfGlobal.H b/src/usr/diag/prdf/prdfGlobal.H
index 0f89ffe8d..9257db08d 100644
--- a/src/usr/diag/prdf/prdfGlobal.H
+++ b/src/usr/diag/prdf/prdfGlobal.H
@@ -77,4 +77,10 @@
#define PRDF_RUNTIME_DECONFIG( i_pTarget ) \
SUCCESS
+/**
+ * @brief macro to acquire scope lock on system target
+ * This macro is currently not used in hostboot.
+ */
+#define PRDF_SYSTEM_SCOPELOCK
+
#endif // PRDF_GLOBAL_HB_H
OpenPOWER on IntegriCloud