diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-17 14:48:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 07:49:40 +0200 |
commit | 92f6883073126f96973252cd57a5c7e24d88d412 (patch) | |
tree | ffd51e3b4744c0ef1a4334333ea67c267fd4d92e /testsuites/sptests | |
parent | rtems: Avoid Giant lock for rtems_task_delete() (diff) | |
download | rtems-92f6883073126f96973252cd57a5c7e24d88d412.tar.bz2 |
sptests/spintrcritical22: Avoid _Objects_Get()
Use _Semaphore_Get_interrupt_disable() instead.
Update #2555.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/spintrcritical22/init.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |