From 09c5ca4cb4f30ba9e0c3c3915a70af7ff3916ec0 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 26 May 2016 22:29:56 +0200 Subject: score: Simplify CORE mutex Remove superfluous support for simple binary semaphores. With this we can get rid of the CORE_MUTEX_NESTING_BLOCKS variant. --- testsuites/sptests/spintrcritical22/init.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/spintrcritical22/init.c b/testsuites/sptests/spintrcritical22/init.c index 9b5c5e13be..6c8198b293 100644 --- a/testsuites/sptests/spintrcritical22/init.c +++ b/testsuites/sptests/spintrcritical22/init.c @@ -48,12 +48,13 @@ static void release_semaphore(rtems_id timer, void *arg) /* The arg is NULL */ test_context *ctx = &ctx_instance; rtems_status_code sc; - CORE_mutex_Control *mtx = &ctx->semaphore_control->Core_control.mutex; if ( _Thread_Wait_flags_get(ctx->main_task_control) == (THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_INTEND_TO_BLOCK) ) { + CORE_semaphore_Control *sem; + ctx->done = true; sc = rtems_semaphore_release(ctx->semaphore_id); @@ -63,8 +64,8 @@ static void release_semaphore(rtems_id timer, void *arg) _Thread_Wait_flags_get(ctx->main_task_control) == (THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_READY_AGAIN) ); - rtems_test_assert(mtx->nest_count == 1); - rtems_test_assert(mtx->holder == ctx->main_task_control); + sem = &ctx->semaphore_control->Core_control.semaphore; + rtems_test_assert(sem->count == 0); } else { sc = rtems_semaphore_release(ctx->semaphore_id); rtems_test_assert(sc == RTEMS_SUCCESSFUL); -- cgit v1.2.3