Changeset fb272963 in rtems


Ignore:
Timestamp:
Nov 2, 2017, 8:01:06 PM (19 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
32ceb38
Parents:
0c286e3
git-author:
Sebastian Huber <sebastian.huber@…> (11/02/17 20:01:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/06/17 08:06:21)
Message:

score: Use Processor_mask instead of cpu_set_t

Location:
cpukit/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h

    r0c286e3 rfb272963  
    168168
    169169  /**
    170    * Structure containing affinity set data and size
     170   * @brief The thread processor affinity set.
    171171   */
    172   cpu_set_t affinity;
     172  Processor_mask Affinity;
    173173} Scheduler_priority_affinity_SMP_Node;
    174174
  • cpukit/score/src/schedulerpriorityaffinitysmp.c

    r0c286e3 rfb272963  
    8585   */
    8686  the_node = _Scheduler_priority_affinity_SMP_Node_downcast( node );
    87   _Processor_mask_To_cpu_set_t(
    88     _SMP_Get_online_processors(),
    89     sizeof( the_node->affinity ),
    90     &the_node->affinity
    91   );
     87  _Processor_mask_Assign( &the_node->Affinity, _SMP_Get_online_processors() );
    9288}
    9389
     
    157153       * Can this thread run on this CPU?
    158154       */
    159       if ( CPU_ISSET( (int) victim_cpu_index, &node->affinity ) ) {
     155      if ( _Processor_mask_Is_set( &node->Affinity, victim_cpu_index ) ) {
    160156        highest = &node->Base.Base.Base;
    161157        break;
     
    234230    cpu_index = _Per_CPU_Get_index( _Thread_Get_CPU( thread ) );
    235231
    236     if ( CPU_ISSET( (int) cpu_index, &filter->affinity ) ) {
     232    if ( _Processor_mask_Is_set( &filter->Affinity, cpu_index ) ) {
    237233      lowest_scheduled = &node->Base.Base.Base;
    238234      break;
     
    610606  States_Control                        current_state;
    611607  Processor_mask                        my_affinity;
    612   cpu_set_t                             cpuset;
    613608
    614609  context = _Scheduler_Get_context( scheduler );
     
    619614  }
    620615
    621   _Processor_mask_To_cpu_set_t( &my_affinity, sizeof( cpuset ), &cpuset );
    622616  node = _Scheduler_priority_affinity_SMP_Node_downcast( node_base );
    623617
     
    626620   * doing anything.
    627621   */
    628   if ( CPU_EQUAL( &cpuset, &node->affinity ) )
     622  if ( _Processor_mask_Is_equal( &node->Affinity, affinity ) )
    629623    return true;
    630624
     
    635629  }
    636630
    637   CPU_COPY( &cpuset, &node->affinity );
     631  _Processor_mask_Assign( &node->Affinity, affinity );
    638632
    639633  if ( _States_Is_ready( current_state ) ) {
Note: See TracChangeset for help on using the changeset viewer.