From 18b8d897574a943d4f764b1e24a92a31e9134041 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 24 Nov 2021 19:42:03 +0100 Subject: tx-support --- testsuites/validation/tx-support.c | 15 +++++++++++++++ testsuites/validation/tx-support.h | 2 ++ 2 files changed, 17 insertions(+) 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, -- cgit v1.2.3