diff options
Diffstat (limited to 'cpukit/include')
-rw-r--r-- | cpukit/include/rtems/rtems/tasks.h | 9 | ||||
-rw-r--r-- | cpukit/include/rtems/score/schedulersmpimpl.h | 16 |
2 files changed, 13 insertions, 12 deletions
diff --git a/cpukit/include/rtems/rtems/tasks.h b/cpukit/include/rtems/rtems/tasks.h index 0392586759..8e87bfd14a 100644 --- a/cpukit/include/rtems/rtems/tasks.h +++ b/cpukit/include/rtems/rtems/tasks.h @@ -867,9 +867,12 @@ rtems_status_code rtems_scheduler_add_processor( * * @retval ::RTEMS_INVALID_NUMBER The processor was not owned by the scheduler. * - * @retval ::RTEMS_RESOURCE_IN_USE The set of processors owned by the scheduler - * would have been empty after the processor removal and there was at least - * one non-idle task that used this scheduler as its home scheduler. + * @retval ::RTEMS_RESOURCE_IN_USE The processor was required by at least one + * non-idle task that used the scheduler as its home scheduler. + * + * @retval ::RTEMS_RESOURCE_IN_USE The processor was the last processor owned + * by the scheduler and there was at least one task that used the scheduler + * as a helping scheduler. * * @par Notes * Removing a processor from a scheduler is a complex operation that involves diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/schedulersmpimpl.h index 97a77121ed..c37f53c8c0 100644 --- a/cpukit/include/rtems/score/schedulersmpimpl.h +++ b/cpukit/include/rtems/score/schedulersmpimpl.h @@ -1978,8 +1978,9 @@ static inline Thread_Control *_Scheduler_SMP_Remove_processor( victim_owner = _Scheduler_Node_get_owner( victim_node ); if ( !victim_owner->is_idle ) { - Thread_Control *victim_idle; - Scheduler_Node *idle_node; + Thread_Control *victim_idle; + Scheduler_Node *idle_node; + Priority_Control insert_priority; victim_idle = _Scheduler_Release_idle_thread_if_necessary( victim_node, @@ -1996,13 +1997,10 @@ static inline Thread_Control *_Scheduler_SMP_Remove_processor( _Scheduler_SMP_Allocate_processor_exact ); - if ( !_Chain_Is_empty( &self->Scheduled ) ) { - Priority_Control insert_priority; - - insert_priority = _Scheduler_SMP_Node_priority( victim_node ); - insert_priority = SCHEDULER_PRIORITY_APPEND( insert_priority ); - ( *enqueue )( &self->Base, victim_node, insert_priority ); - } + _Assert( !_Chain_Is_empty( &self->Scheduled ) ); + insert_priority = _Scheduler_SMP_Node_priority( victim_node ); + insert_priority = SCHEDULER_PRIORITY_APPEND( insert_priority ); + ( *enqueue )( &self->Base, victim_node, insert_priority ); } else { _Assert( victim_owner == victim_user ); _Assert( _Scheduler_Node_get_idle( victim_node ) == NULL ); |