summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-07-11 15:43:13 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-07-25 16:50:09 -0500
commit9c0e69b8cdf3aabcd77c119c3b3425fda66706da (patch)
tree77a5b7f1c4f58da3a74048e54575a5b9a7785f34 /src/include
parentb679a1729d7aea0870544e886ddb4b03e1ecf4c4 (diff)
downloadtalos-hostboot-9c0e69b8cdf3aabcd77c119c3b3425fda66706da.tar.gz
talos-hostboot-9c0e69b8cdf3aabcd77c119c3b3425fda66706da.zip
Cleanup from previous reviews, add barrier for CxxTest
- add IStep1 for demo - cleanup: remove inheritance, add errlog tags, etc. - inadvertently ran copyright script, this is OK. - more cleanup: indentation, etc. - add barrier for CxxTests - rename cxxtest_stub.C to cxxtest_data.C - merge problems on gerrit - fix review comments Change-Id: Iee988b8595d8c6dd521fd94d4d58cb403898d948 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/207 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/usr/cxxtest/TestSuite.H23
-rw-r--r--src/include/usr/initservice/taskargs.H66
-rw-r--r--src/include/usr/trace/interface.H32
3 files changed, 102 insertions, 19 deletions
diff --git a/src/include/usr/cxxtest/TestSuite.H b/src/include/usr/cxxtest/TestSuite.H
index ff40ce06b..5674bf164 100755
--- a/src/include/usr/cxxtest/TestSuite.H
+++ b/src/include/usr/cxxtest/TestSuite.H
@@ -1,3 +1,20 @@
+/****************************************************************************
+ * $IBMCopyrightBlock:
+ *
+ * IBM Confidential
+ *
+ * Licensed Internal Code Source Materials
+ *
+ * IBM HostBoot Licensed Internal Code
+ *
+ * (C) Copyright IBM Corp. 2011
+ *
+ * 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.
+ * $
+****************************************************************************/
+
/** @file TestSuite.H
*
* Imported from FSP tree - /src/test/cxxtest/cxxtest/
@@ -19,10 +36,16 @@ extern trace_desc_t *g_trac_test;
namespace CxxTest
{
+/**
+ * @note extern declarations - see lib/cxxtest_data.C
+ *
+ * @see g_TotalTests, g_TraceCalls, g_Warnings, g_FailedTests
+ */
extern uint64_t g_TotalTests;
extern uint64_t g_TraceCalls;
extern uint64_t g_Warnings;
extern uint64_t g_FailedTests;
+extern barrier_t g_CxxTestBarrier;
/**
* @class TestSuite
diff --git a/src/include/usr/initservice/taskargs.H b/src/include/usr/initservice/taskargs.H
index 17e5cbce3..ea12f1800 100644
--- a/src/include/usr/initservice/taskargs.H
+++ b/src/include/usr/initservice/taskargs.H
@@ -1,3 +1,20 @@
+/****************************************************************************
+ * $IBMCopyrightBlock:
+ *
+ * IBM Confidential
+ *
+ * Licensed Internal Code Source Materials
+ *
+ * IBM HostBoot Licensed Internal Code
+ *
+ * (C) Copyright IBM Corp. 2011
+ *
+ * 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.
+ * $
+****************************************************************************/
+
#ifndef __TASKARGS_TASKARGS_H
#define __TASKARGS_TASKARGS_H
@@ -14,6 +31,9 @@
#include <sys/sync.h>
#include <trace/interface.H>
+#include <errl/errlentry.H>
+#include <errl/errlmanager.H>
+
/**
* @note macro to set up a _start() task entry routine.
*/
@@ -63,6 +83,7 @@ class TaskArgs
public:
+
/**
* @brief TaskArgs constructor
*
@@ -75,6 +96,7 @@ public:
*/
~TaskArgs();
+
/**
* @brief waitParentSync()
*
@@ -107,7 +129,7 @@ public:
* @param[in] i_returncode;
*
*/
- void postReturnCode( const uint64_t &i_returncode );
+ void postReturnCode( const uint64_t i_returncode );
/**
@@ -128,7 +150,7 @@ public:
*
* @param[in] i_command;
*/
- void setCommand( const uint64_t &i_command );
+ void setCommand( const uint64_t i_command );
/**
@@ -144,6 +166,39 @@ public:
uint64_t getCommand( ) const;
+ /**
+ * @brief postErrorLog
+ *
+ * Child task can use this to post an errorlog to InitServices
+ * Caller is responsible for creating a new errorlog, etc.
+ * No checking is done.
+ *
+ * @param[in] i_errl;
+ *
+ */
+ void postErrorLog( errlHndl_t i_errl );
+
+
+ /**
+ * @brief getErrorLog
+ *
+ * Parent task can use this to get an errorlog from the child
+ *
+ * @return iv_errl
+ *
+ */
+ errlHndl_t getErrorLog( );
+
+
+ /**
+ * @brief clear taskargs struct between uses
+ * - barrier is left alone,
+ * - if iv_errl is non zero, we commit it here just to avoid
+ * a memory leak.
+ */
+ void clear();
+
+
private:
/**
@@ -153,14 +208,15 @@ private:
TaskArgs& operator=(const TaskArgs& i_right);
- barrier_t iv_sync_barrier;
-
+ errlHndl_t iv_errl;
uint64_t iv_taskreturncode;
uint64_t iv_taskcommand;
+ barrier_t iv_sync_barrier;
+
};
-}; // namespace TASKARGS
+}; // namespace
#endif
diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H
index 742600e90..84c2e5217 100644
--- a/src/include/usr/trace/interface.H
+++ b/src/include/usr/trace/interface.H
@@ -1,16 +1,20 @@
-/******************************************************************************
- * IBM Confidential
- *
- * Licensed Internal Code Source Materials
- *
- * IBM Flexible Support Processor Licensed Internal Code
- *
- * (c) Copyright IBM Corp. 2004, 2010
- *
- * The source code is for this program is not published or otherwise divested
- * of its trade secrets, irrespective of what has been deposited with the
- * U.S. Copyright Office.
- *****************************************************************************/
+/****************************************************************************
+ * $IBMCopyrightBlock:
+ *
+ * IBM Confidential
+ *
+ * Licensed Internal Code Source Materials
+ *
+ * IBM HostBoot Licensed Internal Code
+ *
+ * (C) Copyright IBM Corp. 2011
+ *
+ * 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.
+ * $
+****************************************************************************/
+
#ifndef __TRACE_INTERFACE_H
#define __TRACE_INTERFACE_H
@@ -169,7 +173,7 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
/**
* Field and Debug trace macros
* Users must define COMP_TD for their components prior to using macros.
- * Additionally, users must define COMP_NAMESPACE, COMP_CLASS & COMP_FN
+ * Additionally, users must define COMP_NAMESPACE, COMP_CLASS & COMP_FN
* prior to using the ENTER_/EXIT_ macros.
* Example:
* #define COMP_TD g_my_trace_desc
OpenPOWER on IntegriCloud