diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-05-21 18:08:32 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-05-21 18:08:32 -0500 |
commit | 24acc6d0c092c244881dd6ffadc3782a8136fccc (patch) | |
tree | 864b4985a7a431bd3520e9d815927eee5315c2df /testsuites/sptests/spintrcritical20/init.c | |
parent | Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems (diff) | |
parent | doc: Add new documentation section for Epiphany architecture (diff) | |
download | rtems-24acc6d0c092c244881dd6ffadc3782a8136fccc.tar.bz2 |
Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems
Diffstat (limited to 'testsuites/sptests/spintrcritical20/init.c')
-rw-r--r-- | testsuites/sptests/spintrcritical20/init.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/testsuites/sptests/spintrcritical20/init.c b/testsuites/sptests/spintrcritical20/init.c index daa8ac7f7e..7e52211742 100644 --- a/testsuites/sptests/spintrcritical20/init.c +++ b/testsuites/sptests/spintrcritical20/init.c @@ -44,6 +44,10 @@ static void semaphore_task(rtems_task_argument arg) test_context *ctx = (test_context *) arg; ctx->semaphore_task_tcb = _Thread_Get_executing(); + _Thread_Wait_set_timeout_code( + ctx->semaphore_task_tcb, + CORE_SEMAPHORE_TIMEOUT + ); while (true) { rtems_status_code sc = rtems_semaphore_obtain( @@ -87,7 +91,7 @@ static bool test_body(void *arg) ctx->thread_queue_was_null = true; } - _Thread_queue_Process_timeout(ctx->semaphore_task_tcb); + _Thread_Timeout(0, ctx->semaphore_task_tcb); switch (ctx->semaphore_task_tcb->Wait.return_code) { case CORE_SEMAPHORE_STATUS_SUCCESSFUL: @@ -103,7 +107,9 @@ static bool test_body(void *arg) _Thread_Enable_dispatch(); - return false; + return ctx->thread_queue_was_null + && ctx->status_was_successful + && ctx->status_was_timeout; } static void Init(rtems_task_argument ignored) |