summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/mdia/mdiamonitor.H
diff options
context:
space:
mode:
authorLarina DSouza <larsouza@in.ibm.com>2012-06-13 22:53:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-09-24 11:10:07 -0500
commitb52c81900043f02fe05d9313cebbde4fe805640c (patch)
treef3c24624f02927b068e72ff1a9f20231b2f021a0 /src/usr/diag/mdia/mdiamonitor.H
parentf754a2a6f0079f3424e2368ae3c3635ac8440612 (diff)
downloadtalos-hostboot-b52c81900043f02fe05d9313cebbde4fe805640c.tar.gz
talos-hostboot-b52c81900043f02fe05d9313cebbde4fe805640c.zip
Process Maintenance Command timeout
When a maintenance cmd timesout, set the target/s WorkFlowStatus to the appropriate state such that the state machine can take further action. RTC: 41894 Change-Id: Iaf5b2b5ab07f9269379b011b720df760e92e178f Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1200 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/mdia/mdiamonitor.H')
-rwxr-xr-xsrc/usr/diag/mdia/mdiamonitor.H107
1 files changed, 44 insertions, 63 deletions
diff --git a/src/usr/diag/mdia/mdiamonitor.H b/src/usr/diag/mdia/mdiamonitor.H
index 866829233..7ba686b8f 100755
--- a/src/usr/diag/mdia/mdiamonitor.H
+++ b/src/usr/diag/mdia/mdiamonitor.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/diag/mdia/mdiamonitor.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/diag/mdia/mdiamonitor.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
#ifndef __MSS_MEMDIAG_MDIAMONITOR_H
#define __MSS_MEMDIAG_MDIAMONITOR_H
@@ -91,43 +92,44 @@ class CommandMonitor
/**
* @brief dtor
*/
- ~CommandMonitor();
+ virtual ~CommandMonitor();
- private:
+ protected:
/**
- * @brief main thread function
+ * @brief serialization mutex
*/
- static void staticMain(void *);
+ mutex_t iv_mutex;
/**
- * @brief main thread function
- *
- * @param[in] i_sm state machine provided for callback
+ * @brief shutdown request indicator
*/
- void threadMain(StateMachine & i_sm);
+ bool iv_shutdown;
/**
- * @brief Get the thread id
- *
- * @retval ThreadID of CommandMonitor
+ * @brief aliases. Map containing monitorID key and timeout entries.
*/
- tid_t getTID();
+ typedef std::map<uint64_t, uint64_t> MonitorMap;
+ typedef MonitorMap::iterator monitorMapIterator;
/**
- * @brief Is the CommandMonitor shut down
- *
- * @retval true if shutdown
- * false if not shutdown
+ * @brief maint command monitors
+ */
+ MonitorMap iv_monitors;
+
+ private:
+
+ /**
+ * @brief main thread function
*/
- bool isShutdown();
+ static void staticMain(void *);
/**
- * @brief Get the monitor id counter
+ * @brief main thread function
*
- * @retval Monitor ID counter
+ * @param[in] i_sm state machine provided for callback
*/
- uint64_t getMonitorID();
+ virtual void threadMain(StateMachine & i_sm);
/**
* @brief Get MonitorMap Timeout entry
@@ -139,37 +141,16 @@ class CommandMonitor
uint64_t getMonitorMapTimeoutEntry(uint64_t i_monitor);
/**
- * @brief serialization mutex
- */
- mutex_t iv_mutex;
-
- /**
* @brief thread number
*/
tid_t iv_tid;
/**
- * @brief shutdown request indicator
- */
- bool iv_shutdown;
-
- /**
* @brief monitor ID counter
*/
uint64_t iv_nextMonitor;
/**
- * @brief aliases. Map containing monitorID key and timeout entries.
- */
- typedef std::map<uint64_t, uint64_t> MonitorMap;
- typedef MonitorMap::iterator monitorMapIterator;
-
- /**
- * @brief maint command monitors
- */
- MonitorMap iv_monitors;
-
- /**
* @brief list of targets to do polling
*/
TARGETING::TargetHandleList iv_pollingList;
OpenPOWER on IntegriCloud