summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spthreadlife01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-10 09:09:19 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-13 14:30:22 +0200
commita38ced268314dfe3f61cbba5b982eeb77c2b8de4 (patch)
tree2fa13257e71eb2d5e391d8bc2a95f74a2d6fce74 /testsuites/sptests/spthreadlife01
parentarm/nds: Warning clean up (diff)
downloadrtems-a38ced268314dfe3f61cbba5b982eeb77c2b8de4.tar.bz2
score: Rework global construction
Ensure that the global construction is performed in the context of the first initialization thread. On SMP this was not guaranteed in the previous implementation.
Diffstat (limited to 'testsuites/sptests/spthreadlife01')
-rw-r--r--testsuites/sptests/spthreadlife01/init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/testsuites/sptests/spthreadlife01/init.c b/testsuites/sptests/spthreadlife01/init.c
index 4e6c98487b..f4005169de 100644
--- a/testsuites/sptests/spthreadlife01/init.c
+++ b/testsuites/sptests/spthreadlife01/init.c
@@ -136,17 +136,21 @@ static void restart_extension(
rtems_status_code sc;
rtems_test_assert(executing == restarted);
- rtems_test_assert(ctx->worker_task_id == rtems_task_self());
switch (ctx->current) {
case RESTART_0:
+ rtems_test_assert(ctx->worker_task_id == rtems_task_self());
ctx->current = RESTART_1;
sc = rtems_task_restart(RTEMS_SELF, 0);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
break;
case RESTART_1:
+ rtems_test_assert(ctx->worker_task_id == rtems_task_self());
ctx->current = RESTART_2;
break;
+ case INIT:
+ /* Restart via _Thread_Global_construction() */
+ break;
default:
rtems_test_assert(0);
break;