diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-17 14:54:48 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 07:49:40 +0200 |
commit | 5eac967651866b0501593dcfea458452ef9e9128 (patch) | |
tree | 318c199360e7f6eef5f78412e4c6b037aba7ea6f /testsuites/smptests | |
parent | sptests/spintrcritical22: Avoid _Objects_Get() (diff) | |
download | rtems-5eac967651866b0501593dcfea458452ef9e9128.tar.bz2 |
testsuites: Replace _Thread_Get()
Replace _Thread_Get() with _Thread_Get_interrupt_disable() to avoid the
Giant lock.
Update #2555.
Diffstat (limited to '')
-rw-r--r-- | testsuites/smptests/smpmigration02/init.c | 8 | ||||
-rw-r--r-- | testsuites/smptests/smpscheduler03/init.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/testsuites/smptests/smpmigration02/init.c b/testsuites/smptests/smpmigration02/init.c index 9af7752eac..40ac8ffa38 100644 --- a/testsuites/smptests/smpmigration02/init.c +++ b/testsuites/smptests/smpmigration02/init.c @@ -118,12 +118,12 @@ static void busy_loop_task(rtems_task_argument arg) static Thread_Control *get_thread_by_id(rtems_id task_id) { - Objects_Locations location; + ISR_lock_Context lock_context; Thread_Control *thread; - thread = _Thread_Get(task_id, &location); - rtems_test_assert(location == OBJECTS_LOCAL); - _Thread_Enable_dispatch(); + thread = _Thread_Get_interrupt_disable(task_id, &lock_context); + rtems_test_assert(thread != NULL); + _ISR_lock_ISR_enable(&lock_context); return thread; } diff --git a/testsuites/smptests/smpscheduler03/init.c b/testsuites/smptests/smpscheduler03/init.c index 1888048d28..54735001e6 100644 --- a/testsuites/smptests/smpscheduler03/init.c +++ b/testsuites/smptests/smpscheduler03/init.c @@ -100,12 +100,12 @@ static rtems_id start_task(rtems_task_priority prio) static Thread_Control *get_thread_by_id(rtems_id task_id) { - Objects_Locations location; + ISR_lock_Context lock_context; Thread_Control *thread; - thread = _Thread_Get(task_id, &location); - rtems_test_assert(location == OBJECTS_LOCAL); - _Thread_Enable_dispatch(); + thread = _Thread_Get_interrupt_disable(task_id, &lock_context); + rtems_test_assert(thread != NULL); + _ISR_lock_ISR_enable(&lock_context); return thread; } |