diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-24 19:42:03 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-25 09:24:32 +0100 |
commit | 18b8d897574a943d4f764b1e24a92a31e9134041 (patch) | |
tree | 12c0a57afbfc2adfcc9b73dd0e39845ac5f01151 | |
parent | 85df065ea0fa95b079af4ab11f83675b84b87060 (diff) |
tx-support
-rw-r--r-- | testsuites/validation/tx-support.c | 15 | ||||
-rw-r--r-- | testsuites/validation/tx-support.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testsuites/validation/tx-support.c b/testsuites/validation/tx-support.c index ecdcb8a413..2336bcfa87 100644 --- a/testsuites/validation/tx-support.c +++ b/testsuites/validation/tx-support.c @@ -618,6 +618,21 @@ void WaitForHeir( uint32_t cpu_index, rtems_id task_id ) } } +void WaitForNextTask( uint32_t cpu_index, rtems_id task_id ) +{ + Per_CPU_Control *cpu; + + cpu = _Per_CPU_Get_by_index( cpu_index ); + + while ( cpu->heir->Object.id == task_id ) { + RTEMS_COMPILER_MEMORY_BARRIER(); + } + + while ( cpu->thread_dispatch_disable_level != 0 ) { + RTEMS_COMPILER_MEMORY_BARRIER(); + } +} + void GetTaskTimerInfo( rtems_id id, TaskTimerInfo *info ) { GetTaskTimerInfoByThread( GetThread( id ), info ); diff --git a/testsuites/validation/tx-support.h b/testsuites/validation/tx-support.h index a41109ec70..28d8e8cb7f 100644 --- a/testsuites/validation/tx-support.h +++ b/testsuites/validation/tx-support.h @@ -240,6 +240,8 @@ void WaitForIntendToBlock( rtems_id task_id ); void WaitForHeir( uint32_t cpu_index, rtems_id task_id ); +void WaitForNextTask( uint32_t cpu_index, rtems_id task_id ); + typedef enum { TASK_TIMER_INVALID, TASK_TIMER_INACTIVE, |