diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-17 15:43:31 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 07:49:41 +0200 |
commit | dab902d5b2688fe958118299f7d44d1adbf13878 (patch) | |
tree | fa54fcf607d93dd03017f9d0eb1f82ca0f55aca4 /testsuites/smptests/smpmigration02 | |
parent | score: Avoid Giant _Objects_Extend_information() (diff) | |
download | rtems-dab902d5b2688fe958118299f7d44d1adbf13878.tar.bz2 |
testsuites: Avoid Giant lock
Replace _Thread_Disable_dispatch() with _Thread_Dispatch_disable().
Replace _Thread_Enable_dispatch() with _Thread_Dispatch_enable().
This is a preparation to remove the Giant lock.
Update #2555.
Diffstat (limited to 'testsuites/smptests/smpmigration02')
-rw-r--r-- | testsuites/smptests/smpmigration02/init.c | 6 |
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 */ |