summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/hwpf/fapi/fapiUtil.H18
-rw-r--r--src/usr/hwpf/fapi/fapiHwAccess.C13
-rw-r--r--src/usr/hwpf/plat/fapiPlatUtil.C17
3 files changed, 24 insertions, 24 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiUtil.H b/src/include/usr/hwpf/fapi/fapiUtil.H
index 3c2978ff3..e3a3b9f3a 100644
--- a/src/include/usr/hwpf/fapi/fapiUtil.H
+++ b/src/include/usr/hwpf/fapi/fapiUtil.H
@@ -37,7 +37,7 @@
* camvanng 09/06/2011 Added fapiLogError
* mjjones 09/14/2011 Prepended fapi to delay
* mjjones 10/05/2011 Added fapiCheckType
- *
+ * mjjones 10/13/2011 Added extern "C" to functions
*/
#ifndef FAPIUTIL_H_
@@ -45,10 +45,13 @@
#include <stdint.h>
#include <stddef.h>
-#include <fapi.H>
+#include <fapiReturnCode.H>
-namespace fapi
+// It is an eCMD requirement that these functions have a "C" symbol
+// because they may be used from a dynamically linked shared library
+extern "C"
{
+
/**
* @brief Assert that an expression is true. Aborting the process if false.
*
@@ -108,7 +111,7 @@ fapi::ReturnCode fapiDelay(uint64_t i_nanoSeconds, uint64_t i_simCycles);
* FAPI_EXEC_HWP(l_rc, function2, i_target)
* return rc;
*/
-void fapiLogError(ReturnCode & io_rc);
+void fapiLogError(fapi::ReturnCode & io_rc);
/** @brief This function answers the question, is scand tracing turned on?
* The implementation of this function is specific to the platform.
@@ -123,7 +126,12 @@ bool platIsScanTraceEnabled();
* @param[in] True to enable or false to disable scan trace.
* @return void
*/
-void platSetScanTrace( bool i_enable );
+void platSetScanTrace(bool i_enable);
+
+}
+
+namespace fapi
+{
/**
* @brief Check the type of a variable
diff --git a/src/usr/hwpf/fapi/fapiHwAccess.C b/src/usr/hwpf/fapi/fapiHwAccess.C
index 62403fdc0..02cb8c9ff 100644
--- a/src/usr/hwpf/fapi/fapiHwAccess.C
+++ b/src/usr/hwpf/fapi/fapiHwAccess.C
@@ -37,6 +37,7 @@
* copelanm 09/13/2011 new for common scan traces
* mjjones 09/14/2011 Prepended fapi to functions
* and enabled all functions
+ * mjjones 10/13/2011 util namespace change
*/
#include <fapi.H>
@@ -54,7 +55,7 @@ fapi::ReturnCode fapiGetScom(const fapi::Target& i_target,
{
fapi::ReturnCode l_rc;
char l_string[fapi::MAX_ECMD_STRING_LEN] = {0};
- bool l_traceit = fapi::platIsScanTraceEnabled();
+ bool l_traceit = platIsScanTraceEnabled();
if( l_traceit )
@@ -93,7 +94,7 @@ fapi::ReturnCode fapiPutScom(const fapi::Target& i_target,
{
fapi::ReturnCode l_rc;
char l_string[fapi::MAX_ECMD_STRING_LEN] = {0};
- bool l_traceit = fapi::platIsScanTraceEnabled();
+ bool l_traceit = platIsScanTraceEnabled();
if( l_traceit )
{
@@ -130,7 +131,7 @@ fapi::ReturnCode fapiPutScomUnderMask(const fapi::Target& i_target,
{
fapi::ReturnCode l_rc;
char l_string[fapi::MAX_ECMD_STRING_LEN] = {0};
- bool l_traceit = fapi::platIsScanTraceEnabled();
+ bool l_traceit = platIsScanTraceEnabled();
if( l_traceit )
{
@@ -165,7 +166,7 @@ fapi::ReturnCode fapiGetCfamRegister(const fapi::Target& i_target,
{
fapi::ReturnCode l_rc;
char l_string[fapi::MAX_ECMD_STRING_LEN] = {0};
- bool l_traceit = fapi::platIsScanTraceEnabled();
+ bool l_traceit = platIsScanTraceEnabled();
if( l_traceit )
{
@@ -200,7 +201,7 @@ fapi::ReturnCode fapiPutCfamRegister(const fapi::Target& i_target,
{
fapi::ReturnCode l_rc;
char l_string[fapi::MAX_ECMD_STRING_LEN] = {0};
- bool l_traceit = fapi::platIsScanTraceEnabled();
+ bool l_traceit = platIsScanTraceEnabled();
if( l_traceit )
{
@@ -236,7 +237,7 @@ fapi::ReturnCode fapiModifyCfamRegister(const fapi::Target& i_target,
{
fapi::ReturnCode l_rc;
char l_string[fapi::MAX_ECMD_STRING_LEN] = {0};
- bool l_traceit = fapi::platIsScanTraceEnabled();
+ bool l_traceit = platIsScanTraceEnabled();
const char * l_pMode = NULL;
if( l_traceit )
diff --git a/src/usr/hwpf/plat/fapiPlatUtil.C b/src/usr/hwpf/plat/fapiPlatUtil.C
index 291d3fb23..fd989e398 100644
--- a/src/usr/hwpf/plat/fapiPlatUtil.C
+++ b/src/usr/hwpf/plat/fapiPlatUtil.C
@@ -54,7 +54,7 @@ TRAC_INIT(&g_fapiErrTd, FAPI_ERR_TRACE_NAME, 4096);
TRAC_INIT(&g_fapiDbgTd, FAPI_DBG_TRACE_NAME, 4096);
TRAC_INIT(&g_fapiScanTd, FAPI_SCAN_TRACE_NAME, 4096);
-namespace fapi
+extern "C"
{
//******************************************************************************
@@ -92,7 +92,7 @@ fapi::ReturnCode fapiDelay(uint64_t i_nanoSeconds, uint64_t i_simCycles)
//******************************************************************************
// fapiLogError
//******************************************************************************
-void fapiLogError(ReturnCode & io_rc)
+void fapiLogError(fapi::ReturnCode & io_rc)
{
errlHndl_t l_pError = NULL;
@@ -108,12 +108,6 @@ void fapiLogError(ReturnCode & io_rc)
errlCommit(l_pError);
}
-
-
-
-
-
-
//****************************************************************************
// platform-level implementation
@@ -127,14 +121,11 @@ bool platIsScanTraceEnabled()
//****************************************************************************
// platform-level implementation
-void platSetScanTrace( bool i_enable )
+void platSetScanTrace(bool i_enable)
{
// TODO: enable or disable scan trace via the SCAN trace buffer. Camvan
// has not pushed the code yet.
return;
}
-
-
-
-} // namespace fapi
+}
OpenPOWER on IntegriCloud