summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-24 19:42:03 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-08 17:25:15 +0100
commit4ba00822e8f9e7e3bb2dcf76560f04394074c789 (patch)
tree13e6d5e3ae7f4b8e20465fd5e8bb658f099018d7
parente4a6eac110b666b3947579f9739737db05717fc7 (diff)
tx-support
-rw-r--r--testsuites/validation/tx-support.c15
-rw-r--r--testsuites/validation/tx-support.h2
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,