summaryrefslogtreecommitdiffstats
path: root/src/include/usr/initservice/taskargs.H
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-09-22 17:42:01 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-10-20 18:07:04 -0500
commit591bf9abfe58c662a8e81820fdc96b90b85a9b55 (patch)
treee603935f90a1c49d5d8767d535168cd71da56b16 /src/include/usr/initservice/taskargs.H
parent0eb945c47156b32f4028867969b153652baa3ad3 (diff)
downloadtalos-hostboot-591bf9abfe58c662a8e81820fdc96b90b85a9b55.tar.gz
talos-hostboot-591bf9abfe58c662a8e81820fdc96b90b85a9b55.zip
RTC3872: Hardware Availability Service: Add HWAS as first ISTEP
- first commit - change isteplist to call hwas - comment out test isteps - modify xml to add HWAS_STATE attribute - add macros to taskargs - remove debug trace from taskargs - add call to init_fsi - post-review - merge xml files - forgot one printkd Change-Id: Iab3b1f85c401f9a176ed84ddb91263caf25a3d56 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/430 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/initservice/taskargs.H')
-rw-r--r--src/include/usr/initservice/taskargs.H46
1 files changed, 33 insertions, 13 deletions
diff --git a/src/include/usr/initservice/taskargs.H b/src/include/usr/initservice/taskargs.H
index 39c7c86cc..7f32b05c0 100644
--- a/src/include/usr/initservice/taskargs.H
+++ b/src/include/usr/initservice/taskargs.H
@@ -41,25 +41,45 @@
#include <errl/errlentry.H>
#include <errl/errlmanager.H>
+
+/**
+ * @note macro to setup the input void * pArgs pointer.
+ * Casts it to a pointer to the incoming TaskArgs struct
+ */
+#define TASKARGS_INIT_TASKARGS(P_ARGS) \
+ INITSERVICE::TaskArgs *pTaskArgs = \
+ static_cast<INITSERVICE::TaskArgs *>(P_ARGS)
+
+/**
+ * @note macro to wait on the TaskArgs barrier and end the task
+ */
+#define TASKARGS_WAIT_AND_ENDTASK() \
+ if ( pTaskArgs ) \
+ { \
+ pTaskArgs->waitChildSync(); \
+ } \
+ task_end() \
+
+/**
+ * @note macro to post an error log to IStepDispatcher
+ */
+#define POST_ERROR_LOG( MyErrl ) \
+ pTaskArgs->postErrorLog( MyErrl )
+
+
/**
* @note macro to set up a _start() task entry routine.
*/
#define TASK_ENTRY_MACRO( MyInitFn ) \
-extern "C" \
-void _start( void *io_pArgs ) \
-{ \
- INITSERVICE::TaskArgs *pTaskArgs = \
- static_cast<INITSERVICE::TaskArgs *>(io_pArgs); \
- \
- MyInitFn( pTaskArgs ); \
+ extern "C" \
+ void _start( void *io_pArgs ) \
+ { \
+ TASKARGS_INIT_TASKARGS(io_pArgs); \
\
- if ( pTaskArgs ) \
- { \
- pTaskArgs->waitChildSync(); \
- } \
+ MyInitFn( pTaskArgs ); \
\
- task_end(); \
-}
+ TASKARGS_WAIT_AND_ENDTASK(); \
+ }
namespace INITSERVICE
OpenPOWER on IntegriCloud