summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpscheduler01/init.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-17 15:43:31 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-20 07:49:41 +0200
commitdab902d5b2688fe958118299f7d44d1adbf13878 (patch)
treefa54fcf607d93dd03017f9d0eb1f82ca0f55aca4 /testsuites/smptests/smpscheduler01/init.c
parentscore: Avoid Giant _Objects_Extend_information() (diff)
downloadrtems-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/smpscheduler01/init.c')
-rw-r--r--testsuites/smptests/smpscheduler01/init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuites/smptests/smpscheduler01/init.c b/testsuites/smptests/smpscheduler01/init.c
index db61933f7e..9518a4d5fe 100644
--- a/testsuites/smptests/smpscheduler01/init.c
+++ b/testsuites/smptests/smpscheduler01/init.c
@@ -103,8 +103,9 @@ static bool is_per_cpu_state_ok(void)
static void test_scheduler_cross(void)
{
bool per_cpu_state_ok;
+ Per_CPU_Control *cpu_self;
- _Thread_Disable_dispatch();
+ cpu_self = _Thread_Dispatch_disable();
suspend(0);
suspend(1);
@@ -113,7 +114,7 @@ static void test_scheduler_cross(void)
per_cpu_state_ok = is_per_cpu_state_ok();
- _Thread_Enable_dispatch();
+ _Thread_Dispatch_enable( cpu_self );
rtems_test_assert(per_cpu_state_ok);
}
@@ -121,8 +122,9 @@ static void test_scheduler_cross(void)
static void test_scheduler_move_heir(void)
{
bool per_cpu_state_ok;
+ Per_CPU_Control *cpu_self;
- _Thread_Disable_dispatch();
+ cpu_self = _Thread_Dispatch_disable();
suspend(2);
suspend(3);
@@ -136,7 +138,7 @@ static void test_scheduler_move_heir(void)
resume(1);
- _Thread_Enable_dispatch();
+ _Thread_Dispatch_enable( cpu_self );
rtems_test_assert(per_cpu_state_ok);
}