summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spintrcritical20/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/sptests/spintrcritical20/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/sptests/spintrcritical20/init.c')
-rw-r--r--testsuites/sptests/spintrcritical20/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuites/sptests/spintrcritical20/init.c b/testsuites/sptests/spintrcritical20/init.c
index 85c1645b5c..9c9b5f0903 100644
--- a/testsuites/sptests/spintrcritical20/init.c
+++ b/testsuites/sptests/spintrcritical20/init.c
@@ -71,8 +71,9 @@ static bool test_body(void *arg)
{
test_context *ctx = arg;
int busy;
+ Per_CPU_Control *cpu_self;
- _Thread_Disable_dispatch();
+ cpu_self = _Thread_Dispatch_disable();
rtems_test_assert(
ctx->semaphore_task_tcb->Wait.return_code
@@ -105,7 +106,7 @@ static bool test_body(void *arg)
break;
}
- _Thread_Enable_dispatch();
+ _Thread_Dispatch_enable(cpu_self);
return ctx->thread_queue_was_null
&& ctx->status_was_successful