From 77c5ddd4967d418855fb5251b3f16af4010717f3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 14 Jan 2015 07:34:44 +0100 Subject: smptests/smpmrsp01: Fix task delete race condition Do not supsend self while waiting for termination since the rtems_task_delete() may take place while the rtems_task_suspend() waits for the Giant lock preventing delivery of the inter-processor interrupt. The result is a suspended and terminated thread (this is a valid state, but leads in this case to a test failure). --- testsuites/smptests/smpmrsp01/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testsuites/smptests/smpmrsp01/init.c b/testsuites/smptests/smpmrsp01/init.c index f01caead1a..a1aae86276 100644 --- a/testsuites/smptests/smpmrsp01/init.c +++ b/testsuites/smptests/smpmrsp01/init.c @@ -275,8 +275,9 @@ static void obtain_and_release_worker(rtems_task_argument arg) /* Worker done (H) */ barrier(ctx, &barrier_state); - rtems_task_suspend(RTEMS_SELF); - rtems_test_assert(0); + while (true) { + /* Wait for termination */ + } } static void test_mrsp_obtain_and_release(test_context *ctx) -- cgit v1.2.3