diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-11 10:34:31 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-23 11:00:28 +0100 |
commit | e429e9742a2ca72820f8f3a8958ed138aa562bd9 (patch) | |
tree | bfb44686d6de38fbd5490cb0a37ed98f4fb0bd6e /testsuites/sptests/spintrcritical08 | |
parent | score: Add _Thread_MP_Extract_proxy() (diff) | |
download | rtems-e429e9742a2ca72820f8f3a8958ed138aa562bd9.tar.bz2 |
score: Simplify thread wait state handling
Remove the THREAD_WAIT_STATE_READY_AGAIN and simply use the initial value to
indicate that a thread does not wait on something. Rename
THREAD_WAIT_FLAGS_INITIAL to THREAD_WAIT_STATE_READY. This change is necessary
so that _Thread_Continue() can be called for threads which never waited on
something (for example dormant threads).
Update #4546.
Diffstat (limited to 'testsuites/sptests/spintrcritical08')
-rw-r--r-- | testsuites/sptests/spintrcritical08/init.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/testsuites/sptests/spintrcritical08/init.c b/testsuites/sptests/spintrcritical08/init.c index 7b55a2e328..39855dfa29 100644 --- a/testsuites/sptests/spintrcritical08/init.c +++ b/testsuites/sptests/spintrcritical08/init.c @@ -78,7 +78,7 @@ static T_interrupt_test_state interrupt( void *arg ) T_quiet_eq_int( previous_period_state, RATE_MONOTONIC_ACTIVE ); T_quiet_eq_int( getState( ctx ), RATE_MONOTONIC_ACTIVE ); state = T_INTERRUPT_TEST_DONE; - } else if ( flags == THREAD_WAIT_FLAGS_INITIAL ) { + } else if ( flags == THREAD_WAIT_STATE_READY ) { T_quiet_true( previous_period_state == RATE_MONOTONIC_ACTIVE || previous_period_state == RATE_MONOTONIC_EXPIRED @@ -100,8 +100,6 @@ static void prepare( void *arg ) { test_context *ctx; rtems_status_code sc; - ISR_Level level; - bool success; ctx = arg; @@ -119,15 +117,6 @@ static void prepare( void *arg ) */ sc = rtems_rate_monotonic_period( ctx->period, 1 ); } while ( sc != RTEMS_SUCCESSFUL ); - - _ISR_Local_disable( level ); - success = _Thread_Wait_flags_try_change_release( - ctx->thread, - RATE_MONOTONIC_READY_AGAIN, - THREAD_WAIT_FLAGS_INITIAL - ); - _ISR_Local_enable( level ); - T_quiet_true( success ); } static void action( void *arg ) |