summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-24 09:22:03 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-01 14:25:16 +0100
commit6d1a7817b79c9fd44fccf7e955b2f8b5dfa407bf (patch)
tree66fd47c8e8eed78e362fe132ba05ae483e688d38
parent969f7488be36a9eb6b95842b031ab9d7d0fcf281 (diff)
tx-support
-rw-r--r--testsuites/validation/tx-support.c11
-rw-r--r--testsuites/validation/tx-support.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/testsuites/validation/tx-support.c b/testsuites/validation/tx-support.c
index fded29d429..ecdcb8a413 100644
--- a/testsuites/validation/tx-support.c
+++ b/testsuites/validation/tx-support.c
@@ -607,6 +607,17 @@ void WaitForIntendToBlock( rtems_id task_id )
#endif
}
+void WaitForHeir( 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();
+ }
+}
+
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 010fae2180..a41109ec70 100644
--- a/testsuites/validation/tx-support.h
+++ b/testsuites/validation/tx-support.h
@@ -238,6 +238,8 @@ void WaitForExecutionStop( rtems_id task_id );
void WaitForIntendToBlock( rtems_id task_id );
+void WaitForHeir( uint32_t cpu_index, rtems_id task_id );
+
typedef enum {
TASK_TIMER_INVALID,
TASK_TIMER_INACTIVE,