diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2015-12-07 16:02:33 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2016-01-27 23:38:16 -0600 |
commit | 12d756eb87b38ffa8950855429bd22f65da795cb (patch) | |
tree | 64880e512c2797b81b48d4fc31e937fe7d4ccff8 /import/hwpf/fapi2/include/ffdc.H | |
parent | 2dbb83a926271df49228c65844cf9f5c063d22a7 (diff) | |
download | talos-sbe-12d756eb87b38ffa8950855429bd22f65da795cb.tar.gz talos-sbe-12d756eb87b38ffa8950855429bd22f65da795cb.zip |
Need an option to allow HWP to return an error log to platform code.
-Update ReturnCode object to include plat err pointer.
-Modify FFDC code to capture error log pointer
-Add FAPI_ASSERT_NO_EXIT macro
Change-Id: I9d69535416be9d09434766cc15f7db447a72aa60
RTC:13220
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22572
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Brian Silver <bsilver@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23712
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'import/hwpf/fapi2/include/ffdc.H')
-rw-r--r-- | import/hwpf/fapi2/include/ffdc.H | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/import/hwpf/fapi2/include/ffdc.H b/import/hwpf/fapi2/include/ffdc.H index 2134e018..167e6f87 100644 --- a/import/hwpf/fapi2/include/ffdc.H +++ b/import/hwpf/fapi2/include/ffdc.H @@ -7,7 +7,7 @@ /* */ /* EKB Project */ /* */ -/* COPYRIGHT 2011,2015 */ +/* COPYRIGHT 2011,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -63,12 +63,13 @@ class FirstFailureData /// /// @brief Default constructor. - /// @note We don't create our error info be default. It will be created + /// @note We don't create our error info by default. It will be created /// when its needed in the setHwpError() method. Note that dereferencing - /// the error info without will create a problem. + /// the error info without first calling setHwpError() will create a + // problem. /// FirstFailureData(void): - iv_info( nullptr ) + iv_info( nullptr ), iv_platDataPtr(nullptr) {} /// @@ -115,26 +116,18 @@ class FirstFailureData } /// - /// @brief Get a pointer to any PlatData. FirstFailureData is still - /// responsible for deletion of the data. The caller must not - /// delete - /// - /// This is called by PLAT. The expected use-case is to get a pointer to - /// a platform error log. The data pointer should be used immediately in - /// the same thread. - /// - /// @return void *. Pointer to any PlatData. If NULL then no data + /// @return void *. Pointer to error info data. If NULL then no data /// void* getData(void) const; /// - /// @brief Get a pointer to any PlatData and release ownership from + /// @brief Get a pointer to any error info and release ownership from /// FirstFailureData. The caller is responsible for deletion. /// /// This is called by PLAT. The expected use-case is to retrieve a /// platform error log. /// - /// @return void*. Pointer to any PlatData. If NULL then no data + /// @return void*. Pointer to any Error data. If NULL then no data /// inline void* releaseData(void) { @@ -185,10 +178,30 @@ class FirstFailureData iv_info = nullptr; } + /// + /// @brief Returns the platform data pointer value to the caller. + /// + inline void* getPlatDataPtr() + { + return iv_platDataPtr; + }; + + /// + /// @brief Sets objects platform data pointer to the passed in value. + /// + /// + inline void setPlatDataPtr( void* i_ptr ) + { + iv_platDataPtr = i_ptr; + }; + private: - // Pointer to the data + // Pointer to the error info std::shared_ptr<ErrorInfo> iv_info; + + // free format data, to be used by the platform + void* iv_platDataPtr; }; } |