diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-20 06:50:12 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-20 08:11:16 +0200 |
commit | bc47ec1c99cb519a26fea585c2945c47b234b941 (patch) | |
tree | 740fee07513c12db0a178dcc716994de6c0d495e /testsuites/sptests | |
parent | sptests/spsysinit01: Move begin of test message (diff) | |
download | rtems-bc47ec1c99cb519a26fea585c2945c47b234b941.tar.bz2 |
score: Refine system initialization order
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/spsysinit01/init.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c index 88185da29f..1ce22d5c08 100644 --- a/testsuites/sptests/spsysinit01/init.c +++ b/testsuites/sptests/spsysinit01/init.c @@ -143,6 +143,18 @@ typedef enum { #endif /* RTEMS_POSIX_API */ STD_FILE_DESCRIPTORS_PRE, STD_FILE_DESCRIPTORS_POST, + LAST_FIRST, + LAST_SECOND, + LAST_THIRD, + LAST_FOURTH, + LAST_FIFTH, + LAST_SIXTH, + LAST_SEVENTH, + LAST_EIGHTH, + LAST_NINETH, + LAST_TENTH, + LAST_MIDDLE, + LAST_LAST, INIT_TASK, DONE } init_step; @@ -165,6 +177,17 @@ typedef enum { ); \ static void x##_last(void) +#define LAST_STEP(x) \ + static void last_##x(void) \ + { \ + next_step(LAST_##x); \ + } \ + RTEMS_SYSINIT_ITEM( \ + last_##x, \ + RTEMS_SYSINIT_LAST, \ + RTEMS_SYSINIT_ORDER_##x \ + ) + static init_step step; static void next_step(init_step expected) @@ -674,6 +697,19 @@ LAST(RTEMS_SYSINIT_STD_FILE_DESCRIPTORS) next_step(STD_FILE_DESCRIPTORS_POST); } +LAST_STEP(FIRST); +LAST_STEP(SECOND); +LAST_STEP(THIRD); +LAST_STEP(FOURTH); +LAST_STEP(FIFTH); +LAST_STEP(SIXTH); +LAST_STEP(SEVENTH); +LAST_STEP(EIGHTH); +LAST_STEP(NINETH); +LAST_STEP(TENTH); +LAST_STEP(MIDDLE); +LAST_STEP(LAST); + static void Init(rtems_task_argument arg) { #ifdef RTEMS_POSIX_API |