Changeset 1ec9c86 in rtems for cpukit/rtems


Ignore:
Timestamp:
Jul 3, 2017, 8:38:31 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
0232b28
Parents:
6b1d8c7
git-author:
Sebastian Huber <sebastian.huber@…> (07/03/17 08:38:31)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/07/17 05:28:35)
Message:

rtems: Fix rtems_scheduler_remove_processor()

Account for the thread processor affinity and make sure that it is
possible to allocate a processor to each thread dedicated to a scheduler
instance.

Update #3059.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/schedulerremoveprocessor.c

    r6b1d8c7 r1ec9c86  
    4646  _Thread_State_acquire_critical( the_thread, &state_context );
    4747
    48   if ( _Thread_Scheduler_get_home( the_thread ) == iter_context->scheduler ) {
     48  if (
     49    _Thread_Scheduler_get_home( the_thread ) == iter_context->scheduler
     50      && !_Processor_mask_Has_overlap(
     51        &the_thread->Scheduler.Affinity,
     52        _Scheduler_Get_processors( iter_context->scheduler )
     53      )
     54  ) {
    4955    iter_context->status = RTEMS_RESOURCE_IN_USE;
    5056  }
     
    104110  _ISR_lock_ISR_enable( &lock_context );
    105111
    106   if ( processor_count == 0 ) {
    107     _Thread_Iterate( _Scheduler_Check_processor_removal, &iter_context );
    108   }
     112  _Thread_Iterate( _Scheduler_Check_processor_removal, &iter_context );
    109113
    110114  _ISR_lock_ISR_disable( &lock_context );
Note: See TracChangeset for help on using the changeset viewer.