summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpmigration02/init.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testsuites/smptests/smpmigration02/init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuites/smptests/smpmigration02/init.c b/testsuites/smptests/smpmigration02/init.c
index 40ac8ffa38..ed10c2bc35 100644
--- a/testsuites/smptests/smpmigration02/init.c
+++ b/testsuites/smptests/smpmigration02/init.c
@@ -140,6 +140,7 @@ static void test_double_migration(test_context *ctx)
uint32_t cpu_other_index = 1;
Per_CPU_Control *cpu_self = _Per_CPU_Get_by_index(cpu_self_index);
Per_CPU_Control *cpu_other = _Per_CPU_Get_by_index(cpu_other_index);
+ Per_CPU_Control *cpu_self_dispatch_disabled;
Thread_Control *self;
Thread_Control *other;
@@ -173,7 +174,8 @@ static void test_double_migration(test_context *ctx)
/* Wait */
}
- _Thread_Disable_dispatch();
+ cpu_self_dispatch_disabled = _Thread_Dispatch_disable();
+ rtems_test_assert(cpu_self == cpu_self_dispatch_disabled);
self = _Thread_Executing;
@@ -215,7 +217,7 @@ static void test_double_migration(test_context *ctx)
rtems_test_assert(cpu_other->heir == other);
- _Thread_Enable_dispatch();
+ _Thread_Dispatch_enable(cpu_self_dispatch_disabled);
while (!_Thread_Is_executing_on_a_processor(other)) {
/* Wait */