From a38ced268314dfe3f61cbba5b982eeb77c2b8de4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 10 Oct 2014 09:09:19 +0200 Subject: 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. --- testsuites/sptests/spthreadlife01/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'testsuites/sptests/spthreadlife01/init.c') 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; -- cgit v1.2.3