diff options
| author | William Hoffa <wghoffa@us.ibm.com> | 2014-01-13 09:01:58 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-23 21:11:09 -0600 |
| commit | 11d2812ff72ac63822195483a76fbc0839774093 (patch) | |
| tree | 6cf0ea95ae0169b2797ed6b4a0bf5c74f2321ced /src | |
| parent | 9438bbaf7eeaea26eb0645e5d5bfbc60c81b9e24 (diff) | |
| download | blackbird-hostboot-11d2812ff72ac63822195483a76fbc0839774093.tar.gz blackbird-hostboot-11d2812ff72ac63822195483a76fbc0839774093.zip | |
Create interface indicating whether poweroff is requested
Change-Id: Ib8eb9e531c145036605ab964ae82c03c0f32bfa3
RTC:93630
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8016
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: Donald E. Dahle <dedahle@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/usr/initservice/istepdispatcherif.H | 8 | ||||
| -rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 20 | ||||
| -rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.H | 7 |
3 files changed, 35 insertions, 0 deletions
diff --git a/src/include/usr/initservice/istepdispatcherif.H b/src/include/usr/initservice/istepdispatcherif.H index 2d2b2b2d8..1f2fad442 100644 --- a/src/include/usr/initservice/istepdispatcherif.H +++ b/src/include/usr/initservice/istepdispatcherif.H @@ -58,6 +58,14 @@ errlHndl_t sendSyncPoint ( void ); */ errlHndl_t sendIstepCompleteMsg ( void ); +/** + * @brief This function is to be used by external code to check whether + * a shutdown has been requested + * + * @return bool - true if shutdown requested, false if not + */ +bool isShutdownRequested ( void ); + } #endif diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 90007d6fe..f67b39bbd 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -1079,6 +1079,21 @@ void IStepDispatcher::iStepBreakPoint(uint32_t i_info) } // ---------------------------------------------------------------------------- +// IStepDispatcher::isShutdownRequested() +// ---------------------------------------------------------------------------- +bool IStepDispatcher::isShutdownRequested() +{ + TRACFCOMP(g_trac_initsvc, ENTER_MRK"IStepDispatcher::isShutdownRequested"); + + mutex_lock(&iv_mutex); + bool isShutdownRequested = iv_shutdown; + mutex_unlock(&iv_mutex); + + TRACFCOMP(g_trac_initsvc, EXIT_MRK"IStepDispatcher::isShutdownRequested"); + return isShutdownRequested; +} + +// ---------------------------------------------------------------------------- // IStepDispatcher::handleIStepRequestMsg() // ---------------------------------------------------------------------------- void IStepDispatcher::handleIStepRequestMsg(msg_t * & io_pMsg) @@ -1464,6 +1479,11 @@ void iStepBreakPoint(uint32_t i_info) IStepDispatcher::getTheInstance().iStepBreakPoint( i_info ); } +bool isShutdownRequested() +{ + return IStepDispatcher::getTheInstance().isShutdownRequested(); +} + // ---------------------------------------------------------------------------- // IStepDispatcher::getIstepInfo() // ---------------------------------------------------------------------------- diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H index 2cd8000da..de235cc7e 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.H +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H @@ -163,6 +163,13 @@ public: void getIstepInfo ( uint8_t & o_iStep, uint8_t & o_subStep ); + /** + * @brief This function determines if a shutdown was requested or not + * + * @return bool - true if shutdown requested, false if not + */ + bool isShutdownRequested(); + protected: /** |

