summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-26 22:29:56 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-30 16:16:22 +0200
commit09c5ca4cb4f30ba9e0c3c3915a70af7ff3916ec0 (patch)
tree70b4e6167e38902fce2ffebbf343df6ac8a6fe06 /testsuites/sptests
parentscore: Add semaphore variants (diff)
downloadrtems-09c5ca4cb4f30ba9e0c3c3915a70af7ff3916ec0.tar.bz2
score: Simplify CORE mutex
Remove superfluous support for simple binary semaphores. With this we can get rid of the CORE_MUTEX_NESTING_BLOCKS variant.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/spintrcritical22/init.c7
1 files changed, 4 insertions, 3 deletions
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);