Changeset 9c238e1 in rtems


Ignore:
Timestamp:
Oct 21, 2016, 12:33:01 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
0e754fac
Parents:
97f7dac
git-author:
Sebastian Huber <sebastian.huber@…> (10/21/16 12:33:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/02/16 09:05:44)
Message:

score: Simplify update priority scheduler op

Remove unused return status.

Files:
17 edited

Legend:

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

    r97f7dac r9c238e1  
    8585
    8686  /** @see _Scheduler_Update_priority() */
    87   Scheduler_Void_or_thread ( *update_priority )(
     87  void ( *update_priority )(
    8888    const Scheduler_Control *,
    8989    Thread_Control *,
  • cpukit/score/include/rtems/score/scheduleredf.h

    r97f7dac r9c238e1  
    151151);
    152152
    153 Scheduler_Void_or_thread _Scheduler_EDF_Update_priority(
     153void _Scheduler_EDF_Update_priority(
    154154  const Scheduler_Control *scheduler,
    155155  Thread_Control          *the_thread,
  • cpukit/score/include/rtems/score/schedulerpriority.h

    r97f7dac r9c238e1  
    135135);
    136136
    137 Scheduler_Void_or_thread _Scheduler_priority_Update_priority(
     137void _Scheduler_priority_Update_priority(
    138138  const Scheduler_Control *scheduler,
    139139  Thread_Control          *the_thread,
  • cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h

    r97f7dac r9c238e1  
    120120);
    121121
    122 /**
    123  * @brief Update priority for the priority affinity SMP scheduler.
    124  *
    125  * @param[in] scheduler The scheduler of the thread.
    126  * @param[in] the_thread The associated thread.
    127  */
    128 Thread_Control *_Scheduler_priority_affinity_SMP_Update_priority(
     122void _Scheduler_priority_affinity_SMP_Update_priority(
    129123  const Scheduler_Control *scheduler,
    130124  Thread_Control          *the_thread,
  • cpukit/score/include/rtems/score/schedulerprioritysmp.h

    r97f7dac r9c238e1  
    121121);
    122122
    123 Thread_Control *_Scheduler_priority_SMP_Update_priority(
     123void _Scheduler_priority_SMP_Update_priority(
    124124  const Scheduler_Control *scheduler,
    125125  Thread_Control          *the_thread,
  • cpukit/score/include/rtems/score/schedulersimple.h

    r97f7dac r9c238e1  
    111111);
    112112
    113 Scheduler_Void_or_thread _Scheduler_simple_Update_priority(
     113void _Scheduler_simple_Update_priority(
    114114  const Scheduler_Control *scheduler,
    115115  Thread_Control          *the_thread,
  • cpukit/score/include/rtems/score/schedulersimplesmp.h

    r97f7dac r9c238e1  
    104104);
    105105
    106 Thread_Control *_Scheduler_simple_SMP_Update_priority(
     106void _Scheduler_simple_SMP_Update_priority(
    107107  const Scheduler_Control *scheduler,
    108108  Thread_Control          *the_thread,
  • cpukit/score/include/rtems/score/schedulersmpimpl.h

    r97f7dac r9c238e1  
    10121012}
    10131013
    1014 static inline Thread_Control *_Scheduler_SMP_Update_priority(
     1014static inline void _Scheduler_SMP_Update_priority(
    10151015  Scheduler_Context               *context,
    10161016  Thread_Control                  *thread,
     
    10251025)
    10261026{
    1027   Thread_Control          *needs_help;
    10281027  Priority_Control         new_priority;
    10291028  bool                     prepend_it;
     
    10371036    }
    10381037
    1039     return NULL;
     1038    return;
    10401039  }
    10411040
     
    10481047
    10491048    if ( prepend_it ) {
    1050       needs_help = ( *enqueue_scheduled_lifo )( context, node );
     1049      ( *enqueue_scheduled_lifo )( context, node );
    10511050    } else {
    1052       needs_help = ( *enqueue_scheduled_fifo )( context, node );
     1051      ( *enqueue_scheduled_fifo )( context, node );
    10531052    }
    10541053  } else if ( node_state == SCHEDULER_SMP_NODE_READY ) {
     
    10581057
    10591058    if ( prepend_it ) {
    1060       needs_help = ( *enqueue_lifo )( context, node, NULL );
     1059      ( *enqueue_lifo )( context, node, NULL );
    10611060    } else {
    1062       needs_help = ( *enqueue_fifo )( context, node, NULL );
     1061      ( *enqueue_fifo )( context, node, NULL );
    10631062    }
    10641063  } else {
     
    10681067      ( *ask_for_help )( context, thread, node );
    10691068    }
    1070 
    1071     needs_help = NULL;
    1072   }
    1073 
    1074   return needs_help;
     1069  }
    10751070}
    10761071
  • cpukit/score/include/rtems/score/schedulerstrongapa.h

    r97f7dac r9c238e1  
    121121);
    122122
    123 Thread_Control *_Scheduler_strong_APA_Update_priority(
     123void _Scheduler_strong_APA_Update_priority(
    124124  const Scheduler_Control *scheduler,
    125125  Thread_Control          *the_thread,
  • cpukit/score/src/scheduleredfchangepriority.c

    r97f7dac r9c238e1  
    3737}
    3838
    39 Scheduler_Void_or_thread _Scheduler_EDF_Update_priority(
     39void _Scheduler_EDF_Update_priority(
    4040  const Scheduler_Control *scheduler,
    4141  Thread_Control          *the_thread,
     
    5050  if ( !_Thread_Is_ready( the_thread ) ) {
    5151    /* Nothing to do */
    52     SCHEDULER_RETURN_VOID_OR_NULL;
     52    return;
    5353  }
    5454
     
    5858  if ( priority == the_node->priority ) {
    5959    /* Nothing to do */
    60     SCHEDULER_RETURN_VOID_OR_NULL;
     60    return;
    6161  }
    6262
     
    7373
    7474  _Scheduler_EDF_Schedule_body( scheduler, the_thread, false );
    75 
    76   SCHEDULER_RETURN_VOID_OR_NULL;
    7775}
  • cpukit/score/src/schedulerpriorityaffinitysmp.c

    r97f7dac r9c238e1  
    519519}
    520520
    521 /*
    522  * This is the public scheduler specific Change Priority operation.
    523  */
    524 Thread_Control *_Scheduler_priority_affinity_SMP_Update_priority(
     521void _Scheduler_priority_affinity_SMP_Update_priority(
    525522  const Scheduler_Control *scheduler,
    526523  Thread_Control          *thread,
     
    529526{
    530527  Scheduler_Context *context = _Scheduler_Get_context( scheduler );
    531   Thread_Control    *displaced;
    532 
    533   displaced = _Scheduler_SMP_Update_priority(
     528
     529  _Scheduler_SMP_Update_priority(
    534530    context,
    535531    thread,
     
    548544   */
    549545  _Scheduler_priority_affinity_SMP_Check_for_migrations( context );
    550 
    551   return displaced;
    552546}
    553547
  • cpukit/score/src/schedulerprioritychangepriority.c

    r97f7dac r9c238e1  
    2222#include <rtems/score/schedulerpriorityimpl.h>
    2323
    24 Scheduler_Void_or_thread _Scheduler_priority_Update_priority(
     24void _Scheduler_priority_Update_priority(
    2525  const Scheduler_Control *scheduler,
    2626  Thread_Control          *the_thread,
     
    3535  if ( !_Thread_Is_ready( the_thread ) ) {
    3636    /* Nothing to do */
    37     SCHEDULER_RETURN_VOID_OR_NULL;
     37    return;
    3838  }
    3939
     
    4444  if ( priority == the_node->Ready_queue.current_priority ) {
    4545    /* Nothing to do */
    46     SCHEDULER_RETURN_VOID_OR_NULL;
     46    return;
    4747  }
    4848
     
    7777
    7878  _Scheduler_priority_Schedule_body( scheduler, the_thread, false );
    79 
    80   SCHEDULER_RETURN_VOID_OR_NULL;
    8179}
  • cpukit/score/src/schedulerprioritysmp.c

    r97f7dac r9c238e1  
    249249}
    250250
    251 Thread_Control *_Scheduler_priority_SMP_Update_priority(
     251void _Scheduler_priority_SMP_Update_priority(
    252252  const Scheduler_Control *scheduler,
    253253  Thread_Control          *thread,
     
    257257  Scheduler_Context *context = _Scheduler_Get_context( scheduler );
    258258
    259   return _Scheduler_SMP_Update_priority(
     259  _Scheduler_SMP_Update_priority(
    260260    context,
    261261    thread,
  • cpukit/score/src/schedulersimplechangepriority.c

    r97f7dac r9c238e1  
    2222#include <rtems/score/schedulersimpleimpl.h>
    2323
    24 Scheduler_Void_or_thread _Scheduler_simple_Update_priority(
     24void _Scheduler_simple_Update_priority(
    2525  const Scheduler_Control *scheduler,
    2626  Thread_Control          *the_thread,
     
    3333  if ( !_Thread_Is_ready( the_thread ) ) {
    3434    /* Nothing to do */
    35     SCHEDULER_RETURN_VOID_OR_NULL;
     35    return;
    3636  }
    3737
     
    4848
    4949  _Scheduler_simple_Schedule_body( scheduler, the_thread, false );
    50 
    51   SCHEDULER_RETURN_VOID_OR_NULL;
    5250}
  • cpukit/score/src/schedulersimplesmp.c

    r97f7dac r9c238e1  
    316316}
    317317
    318 Thread_Control *_Scheduler_simple_SMP_Update_priority(
     318void _Scheduler_simple_SMP_Update_priority(
    319319  const Scheduler_Control *scheduler,
    320320  Thread_Control          *thread,
     
    324324  Scheduler_Context *context = _Scheduler_Get_context( scheduler );
    325325
    326   return _Scheduler_SMP_Update_priority(
     326  _Scheduler_SMP_Update_priority(
    327327    context,
    328328    thread,
  • cpukit/score/src/schedulerstrongapa.c

    r97f7dac r9c238e1  
    375375}
    376376
    377 Thread_Control *_Scheduler_strong_APA_Update_priority(
    378   const Scheduler_Control *scheduler,
    379   Thread_Control          *the_thread,
    380   Scheduler_Node          *node
    381 )
    382 {
    383   Scheduler_Context *context = _Scheduler_Get_context( scheduler );
    384 
    385   return _Scheduler_SMP_Update_priority(
     377void _Scheduler_strong_APA_Update_priority(
     378  const Scheduler_Control *scheduler,
     379  Thread_Control          *the_thread,
     380  Scheduler_Node          *node
     381)
     382{
     383  Scheduler_Context *context = _Scheduler_Get_context( scheduler );
     384
     385  _Scheduler_SMP_Update_priority(
    386386    context,
    387387    the_thread,
  • testsuites/smptests/smpscheduler03/init.c

    r97f7dac r9c238e1  
    200200}
    201201
    202 static Thread_Control *update_priority_op(
     202static void update_priority_op(
    203203  Thread_Control *thread,
    204204  Scheduler_SMP_Node *scheduler_node,
     
    210210  ISR_lock_Context state_lock_context;
    211211  ISR_lock_Context scheduler_lock_context;
    212   Thread_Control *needs_help;
    213212  Thread_queue_Context queue_context;
    214213
     
    219218  _Scheduler_Acquire_critical( scheduler, &scheduler_lock_context );
    220219
    221   needs_help = (*scheduler->Operations.update_priority)(
     220  (*scheduler->Operations.update_priority)(
    222221    scheduler,
    223222    thread,
     
    227226  _Scheduler_Release_critical( scheduler, &scheduler_lock_context );
    228227  _Thread_State_release( thread, &state_lock_context );
    229 
    230   return needs_help;
    231228}
    232229
     
    241238)
    242239{
    243   Thread_Control *needs_help;
    244240  Per_CPU_Control *cpu_self;
    245241
     
    259255  rtems_test_assert(executing_node->state == start_state);
    260256
    261   needs_help = update_priority_op(executing, executing_node, prio, prepend_it);
     257  update_priority_op(executing, executing_node, prio, prepend_it);
    262258  rtems_test_assert(executing_node->state == new_state);
    263259
     
    265261    switch (start_state) {
    266262      case SCHEDULER_SMP_NODE_SCHEDULED:
    267         rtems_test_assert(needs_help == executing);
     263        rtems_test_assert(cpu_self->heir == other);
    268264        break;
    269265      case SCHEDULER_SMP_NODE_READY:
    270         rtems_test_assert(needs_help == other);
     266        rtems_test_assert(cpu_self->heir == executing);
    271267        break;
    272268      default:
     
    274270        break;
    275271    }
    276   } else {
    277     rtems_test_assert(needs_help == NULL);
    278272  }
    279273
Note: See TracChangeset for help on using the changeset viewer.