From 92f6883073126f96973252cd57a5c7e24d88d412 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 17 May 2016 14:48:46 +0200 Subject: sptests/spintrcritical22: Avoid _Objects_Get() Use _Semaphore_Get_interrupt_disable() instead. Update #2555. --- testsuites/sptests/spintrcritical22/init.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/spintrcritical22/init.c b/testsuites/sptests/spintrcritical22/init.c index 1a377f7838..aada98dae7 100644 --- a/testsuites/sptests/spintrcritical22/init.c +++ b/testsuites/sptests/spintrcritical22/init.c @@ -34,13 +34,12 @@ static test_context ctx_instance; static Semaphore_Control *get_semaphore_control(rtems_id id) { Objects_Locations location; + ISR_lock_Context lock_context; Semaphore_Control *sem; - sem = (Semaphore_Control *) - _Objects_Get(&_Semaphore_Information, id, &location); - _Thread_Unnest_dispatch(); - - rtems_test_assert(sem != NULL && location == OBJECTS_LOCAL); + sem = _Semaphore_Get_interrupt_disable(id, &location, &lock_context); + rtems_test_assert(sem != NULL); + _ISR_lock_ISR_enable(&lock_context); return sem; } -- cgit v1.2.3