From 1041de1ab071d126148f0c02e5da0db637001f1c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 20 Apr 2015 09:45:10 +0200 Subject: score: Add _Thread_Get_interrupt_disable() Remove _Thread_Acquire() and _Thread_Acquire_for_executing(). Add utility functions for the default thread lock. Use the default thread lock for the RTEMS events. There is no need to disable thread dispatching and a Giant acquire in _Event_Timeout() since this was already done by the caller. Update #2273. --- testsuites/sptests/spintrcritical10/init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/spintrcritical10/init.c b/testsuites/sptests/spintrcritical10/init.c index 4d25ce6b7c..441b161b5b 100644 --- a/testsuites/sptests/spintrcritical10/init.c +++ b/testsuites/sptests/spintrcritical10/init.c @@ -51,7 +51,7 @@ static void any_satisfy_before_timeout(rtems_id timer, void *arg) { rtems_status_code sc; test_context *ctx = arg; - const Thread_Control *thread = ctx->thread; + Thread_Control *thread = ctx->thread; Thread_Wait_flags flags = _Thread_Wait_flags_get(thread); if (blocks_for_event(flags)) { @@ -78,7 +78,7 @@ static void any_satisfy_before_timeout(rtems_id timer, void *arg) ); rtems_test_assert(thread->Wait.return_code == RTEMS_SUCCESSFUL); - _Event_Timeout(thread->Object.id, NULL); + _Event_Timeout(0, thread); rtems_test_assert( *(rtems_event_set *) thread->Wait.return_argument == GREEN @@ -148,7 +148,7 @@ static void all_satisfy_before_timeout(rtems_id timer, void *arg) { rtems_status_code sc; test_context *ctx = arg; - const Thread_Control *thread = ctx->thread; + Thread_Control *thread = ctx->thread; Thread_Wait_flags flags = _Thread_Wait_flags_get(thread); if (blocks_for_event(flags)) { @@ -175,7 +175,7 @@ static void all_satisfy_before_timeout(rtems_id timer, void *arg) ); rtems_test_assert(thread->Wait.return_code == RTEMS_SUCCESSFUL); - _Event_Timeout(thread->Object.id, NULL); + _Event_Timeout(0, thread); rtems_test_assert( *(rtems_event_set *) thread->Wait.return_argument == EVENTS @@ -240,7 +240,7 @@ static void timeout_before_satisfied(rtems_id timer, void *arg) { rtems_status_code sc; test_context *ctx = arg; - const Thread_Control *thread = ctx->thread; + Thread_Control *thread = ctx->thread; Thread_Wait_flags flags = _Thread_Wait_flags_get(thread); if (blocks_for_event(flags)) { @@ -251,7 +251,7 @@ static void timeout_before_satisfied(rtems_id timer, void *arg) ); rtems_test_assert(thread->Wait.return_code == RTEMS_SUCCESSFUL); - _Event_Timeout(thread->Object.id, NULL); + _Event_Timeout(0, thread); rtems_test_assert( *(rtems_event_set *) thread->Wait.return_argument == DEADBEEF -- cgit v1.2.3