Changeset 6b1d8c7 in rtems for cpukit/rtems


Ignore:
Timestamp:
Jul 4, 2017, 5:28:44 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
1ec9c86
Parents:
7851555
git-author:
Sebastian Huber <sebastian.huber@…> (07/04/17 05:28:44)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/07/17 05:28:35)
Message:

score: Add processor set to scheduler context

Replace the simple processor count with the processor set owned by the
scheduler instance.

Update #3059.

Location:
cpukit/rtems/src
Files:
3 edited

Legend:

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

    r7851555 r6b1d8c7  
    9696    _ISR_lock_ISR_disable( &lock_context );
    9797    _Scheduler_Acquire_critical( scheduler, &lock_context );
    98     ++scheduler_context->processor_count;
     98    _Processor_mask_Set( &scheduler_context->Processors, cpu_index );
    9999    cpu->Scheduler.control = scheduler;
    100100    cpu->Scheduler.context = scheduler_context;
  • cpukit/rtems/src/schedulergetprocessorset.c

    r7851555 r6b1d8c7  
    11/*
    2  * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2014, 2017 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    2727)
    2828{
    29   const Scheduler_Control *scheduler;
     29  const Scheduler_Control    *scheduler;
     30  const Processor_mask       *processor_set;
     31  Processor_mask_Copy_status  status;
    3032
    3133  if ( cpuset == NULL ) {
     
    3840  }
    3941
    40   if ( !_CPU_set_Is_large_enough( cpusetsize ) ) {
     42  processor_set = _Scheduler_Get_processors( scheduler );
     43  status = _Processor_mask_To_cpu_set_t( processor_set, cpusetsize, cpuset );
     44  if ( status != PROCESSOR_MASK_COPY_LOSSLESS ) {
    4145    return RTEMS_INVALID_NUMBER;
    4246  }
    4347
    44   _Scheduler_Get_processor_set( scheduler, cpusetsize, cpuset );
    45 
    4648  return RTEMS_SUCCESSFUL;
    4749}
  • cpukit/rtems/src/schedulerremoveprocessor.c

    r7851555 r6b1d8c7  
    9999  _ISR_lock_ISR_disable( &lock_context );
    100100  _Scheduler_Acquire_critical( scheduler, &lock_context );
    101   processor_count = scheduler_context->processor_count - 1;
    102   scheduler_context->processor_count = processor_count;
     101  _Processor_mask_Clear( &scheduler_context->Processors, cpu_index );
     102  processor_count = _Processor_mask_Count( &scheduler_context->Processors );
    103103  _Scheduler_Release_critical( scheduler, &lock_context );
    104104  _ISR_lock_ISR_enable( &lock_context );
     
    131131    _Assert( _Chain_Is_empty( &idle->Scheduler.Scheduler_nodes ) );
    132132  } else {
    133     ++scheduler_context->processor_count;
     133    _Processor_mask_Set( &scheduler_context->Processors, cpu_index );
    134134  }
    135135
Note: See TracChangeset for help on using the changeset viewer.