diff options
author | Mark Wenning <wenning@us.ibm.com> | 2011-07-10 21:14:46 -0500 |
---|---|---|
committer | Mark W. Wenning <wenning@us.ibm.com> | 2011-07-14 16:54:12 -0500 |
commit | 353cc0391b0982b936fe0437fbaa0439f775a6dd (patch) | |
tree | dd892737420cecffec8104a0eeef3dd2282a23a5 /src/include/usr/initservice | |
parent | 5530b7609c0351deb5d707c5950a56309842a325 (diff) | |
download | talos-hostboot-353cc0391b0982b936fe0437fbaa0439f775a6dd.tar.gz talos-hostboot-353cc0391b0982b936fe0437fbaa0439f775a6dd.zip |
IStep Dispatcher
- remove refs to include/src/usr/taskargs/ dir
- use _start() macro in IStepDispatcher
- post-review fixes
- fixed - inadvertently ran copyright script on staged files
Change-Id: I2b256524746d0eb25ed04e0835450e220dc65492
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/191
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Diffstat (limited to 'src/include/usr/initservice')
-rw-r--r-- | src/include/usr/initservice/initsvcreasoncodes.H | 12 | ||||
-rw-r--r-- | src/include/usr/initservice/taskargs.H | 21 |
2 files changed, 31 insertions, 2 deletions
diff --git a/src/include/usr/initservice/initsvcreasoncodes.H b/src/include/usr/initservice/initsvcreasoncodes.H index 029276829..83d1c9f28 100644 --- a/src/include/usr/initservice/initsvcreasoncodes.H +++ b/src/include/usr/initservice/initsvcreasoncodes.H @@ -46,6 +46,12 @@ enum InitServiceModuleID DISABLE_WATCHDOG_ERRL_ID, EXECUTE_ISTEPS_ERRL_ID, + ISTEP_1_ERRL_ID, + ISTEP_2_ERRL_ID, + ISTEP_3_ERRL_ID, + ISTEP_4_ERRL_ID, + ISTEP_5_ERRL_ID, + // reserve some tasks for my unit tests... START_CXXTEST_ERRL_ID = 0xf0, INIT_SVC_TEST1_ERRL_ID, @@ -59,8 +65,10 @@ enum InitServiceModuleID enum InitServiceReasonCode { - START_TASK_FAILED = INITSVC_COMP_ID | 0x01, - INVALID_TASK_TYPE = INITSVC_COMP_ID | 0x02, + START_TASK_FAILED = INITSVC_COMP_ID | 0x01, + INVALID_TASK_TYPE = INITSVC_COMP_ID | 0x02, + START_FN_FAILED = INITSVC_COMP_ID | 0x03, + NULL_FN_PTR = INITSVC_COMP_ID | 0x04, }; diff --git a/src/include/usr/initservice/taskargs.H b/src/include/usr/initservice/taskargs.H index 5c8a908d8..17e5cbce3 100644 --- a/src/include/usr/initservice/taskargs.H +++ b/src/include/usr/initservice/taskargs.H @@ -14,6 +14,27 @@ #include <sys/sync.h> #include <trace/interface.H> +/** + * @note macro to set up a _start() task entry routine. + */ +#define TASK_ENTRY_MACRO( MyInitFn ) \ +extern "C" \ +void _start( void *io_pArgs ) \ +{ \ + INITSERVICE::TaskArgs::TaskArgs *pTaskArgs = \ + reinterpret_cast<INITSERVICE::TaskArgs::TaskArgs *>(io_pArgs); \ + \ + MyInitFn( pTaskArgs ); \ + \ + if ( pTaskArgs ) \ + { \ + pTaskArgs->waitChildSync(); \ + } \ + \ + task_end(); \ +} + + namespace INITSERVICE { |