Changeset 825cb1f in rtems


Ignore:
Timestamp:
Mar 4, 2014, 12:02:18 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
3ca84d0c
Parents:
b323e1fb
git-author:
Sebastian Huber <sebastian.huber@…> (03/04/14 12:02:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/06/14 08:43:59)
Message:

score: Delete _Thread_Dispatch_set_disable_level()

This function was only used in some tests and can be replaced with other
functions.

Files:
5 edited

Legend:

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

    rb323e1fb r825cb1f  
    122122
    123123  /**
    124    *  @brief Sets thread dispatch level to the value passed in.
    125    *
    126    * This routine sets thread dispatch level to the
    127    * value passed in.
    128    */
    129   uint32_t _Thread_Dispatch_set_disable_level(uint32_t value);
    130 
    131   /**
    132124   *  @brief Increments the thread dispatch level.
    133125   *
     
    143135  uint32_t _Thread_Dispatch_decrement_disable_level(void);
    144136#else /* RTEMS_SMP */
    145   /**
    146    * @brief Set thread dispatch disable level.
    147    *
    148    * This routine sets thread dispatch level to the
    149    * value passed in.
    150    */
    151   RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
    152   {
    153     _Thread_Dispatch_disable_level = value;
    154     return value;
    155   }
    156 
    157137  /**
    158138   * @brief Increase thread dispatch disable level.
  • cpukit/score/src/threaddispatchdisablelevel.c

    rb323e1fb r825cb1f  
    119119}
    120120
    121 
    122 /*
    123  * Note this method is taking a heavy handed approach to
    124  * setting the dispatch level. This may be optimized at a
    125  * later timee, but it must be in such a way that the nesting
    126  * level is decremented by the same number as the dispatch level.
    127  * This approach is safest until we are sure the nested spinlock
    128  * is successfully working with smp isr source code. 
    129  */
    130 
    131 uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
    132 {
    133   ISR_Level isr_level;
    134   uint32_t disable_level;
    135 
    136   _ISR_Disable_without_giant( isr_level );
    137   disable_level = _Thread_Dispatch_disable_level;
    138   _ISR_Enable_without_giant( isr_level );
    139 
    140   /*
    141    * If we need the dispatch level to go higher
    142    * call increment method the desired number of times.
    143    */
    144 
    145   while ( value > disable_level ) {
    146     disable_level = _Thread_Dispatch_increment_disable_level();
    147   }
    148 
    149   /*
    150    * If we need the dispatch level to go lower
    151    * call increment method the desired number of times.
    152    */
    153 
    154   while ( value < disable_level ) {
    155     disable_level = _Thread_Dispatch_decrement_disable_level();
    156   }
    157 
    158   return value;
    159 }
    160 
    161121void _Giant_Acquire( void )
    162122{
  • testsuites/rhealstone/rhilatency/ilatency.c

    rb323e1fb r825cb1f  
    9494  Install_tm27_vector( Isr_handler ) ;
    9595  Interrupt_nest = 0;
    96   _Thread_Dispatch_set_disable_level( 0 );
    9796
    9897  /* Benchmark code */
  • testsuites/tmtests/tm26/task1.c

    rb323e1fb r825cb1f  
    585585  set_thread_dispatch_necessary( false );
    586586
    587   _Thread_Dispatch_set_disable_level( 0 );
     587  for (index = 0; index < 2 * OPERATION_COUNT; ++index) {
     588    _Thread_Unnest_dispatch();
     589  }
    588590
    589591  /*
  • testsuites/tmtests/tm27/task1.c

    rb323e1fb r825cb1f  
    113113  Interrupt_nest = 0;
    114114
    115   _Thread_Dispatch_set_disable_level( 0 );
    116 
    117115  Interrupt_occurred = 0;
    118116
     
    146144   */
    147145
    148   _Thread_Dispatch_set_disable_level( 1 );
     146  _Thread_Disable_dispatch();
    149147
    150148  Interrupt_nest = 1;
     
    160158  Interrupt_return_time = benchmark_timer_read();
    161159
    162   _Thread_Dispatch_set_disable_level( 0 );
     160  _Thread_Unnest_dispatch();
    163161
    164162  put_time(
     
    181179   *  Does a preempt .. not nested
    182180   */
    183 
    184   _Thread_Dispatch_set_disable_level( 0 );
    185181
    186182#if defined(RTEMS_SMP)
     
    253249   *  Switch back to the other task to exit the test.
    254250   */
    255 
    256   _Thread_Dispatch_set_disable_level( 0 );
    257251
    258252#if defined(RTEMS_SMP)
Note: See TracChangeset for help on using the changeset viewer.