From 5eac967651866b0501593dcfea458452ef9e9128 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 17 May 2016 14:54:48 +0200 Subject: testsuites: Replace _Thread_Get() Replace _Thread_Get() with _Thread_Get_interrupt_disable() to avoid the Giant lock. Update #2555. --- testsuites/sptests/spintrcritical23/init.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/spintrcritical23/init.c b/testsuites/sptests/spintrcritical23/init.c index 89fea25a12..4857d99585 100644 --- a/testsuites/sptests/spintrcritical23/init.c +++ b/testsuites/sptests/spintrcritical23/init.c @@ -42,13 +42,12 @@ static test_context ctx_instance; static Thread_Control *get_tcb(rtems_id id) { - Objects_Locations location; + ISR_lock_Context lock_context; Thread_Control *tcb; - tcb = _Thread_Get(id, &location); - _Objects_Put(&tcb->Object); - - rtems_test_assert(tcb != NULL && location == OBJECTS_LOCAL); + tcb = _Thread_Get_interrupt_disable(id, &lock_context); + rtems_test_assert(tcb != NULL); + _ISR_lock_ISR_enable(&lock_context); return tcb; } -- cgit v1.2.3