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-12-01 14:25:16 +0100 |
commit | d96e3d11bdb1fc64a3829c0fb32543fa783ba85e (patch) | |
tree | 1cb064973900fe1165bac5fb9e3608cbe0d659b0 | |
parent | 2ec7144d868ac0388fbf199bf81da982359625ef (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, |