Changeset d3d5319 in rtems


Ignore:
Timestamp:
Jan 9, 2001, 5:10:56 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8b15163f
Parents:
026f4aa
Message:

2001-01-09 Joel Sherrill <joel@…>

  • clockdrv_shell.c (CLOCK_DRIVER_ISRS_PER_TICK): Add support for multiple ISRs per clock tick. Testing per hacking on mips/jmr3904 clock driver.
Location:
c/src/lib/libbsp/shared
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    r026f4aa rd3d5319  
     12001-01-09      Joel Sherrill <joel@OARcorp.com>
     2
     3        * clockdrv_shell.c (CLOCK_DRIVER_ISRS_PER_TICK): Add support for
     4        multiple ISRs per clock tick.  Testing per hacking on mips/jmr3904
     5        clock driver.
     6
    172001-01-03      Joel Sherrill <joel@OARcorp.com>
    28
  • c/src/lib/libbsp/shared/clockdrv_shell.c

    r026f4aa rd3d5319  
    1717#include <rtems/libio.h>
    1818
     19#if defined(CLOCK_DRIVER_USE_FAST_IDLE) && defined(CLOCK_DRIVER_ISRS_PER_TICK)
     20#error "clockdrv_shell.c: fast idle and N ISRs per tick is not supported"
     21#endif
     22
     23/*
     24 *  ISRs until next clock tick
     25 */
     26
     27#ifdef CLOCK_DRIVER_ISRS_PER_TICK
     28volatile rtems_unsigned32 Clock_driver_isrs;
     29#endif
     30
    1931/*
    2032 *  Clock ticks since initialization
     
    2335volatile rtems_unsigned32 Clock_driver_ticks;
    2436
     37/*
     38 *  ISR formerly installed.
     39 */
     40
    2541rtems_isr_entry  Old_ticker;
    2642
     
    2844 
    2945/*
    30  * These are set by clock driver during its init
     46 *  Major and minor number.
    3147 */
    3248 
     
    5268)
    5369{
     70  /*
     71   *  Accurate count of ISRs
     72   */
     73
     74  Clock_driver_ticks += 1;
     75
    5476#ifdef CLOCK_DRIVER_USE_FAST_IDLE
    5577  do {
    56     Clock_driver_ticks += 1;
    5778    rtems_clock_tick();
    5879  } while ( _Thread_Executing == _Thread_Idle &&
     
    6182  Clock_driver_support_at_tick();
    6283  return;
     84
    6385#else
     86
    6487  /*
    6588   *  Do the hardware specific per-tick action.
     
    7093  Clock_driver_support_at_tick();
    7194
    72   /*
    73    *  The driver has seen another tick.
    74    */
    75 
    76   Clock_driver_ticks += 1;
    77 
    78   /*
    79    */
    80 
    81 #ifndef CLOCK_DRIVER_ISRS_ARE_ONE_MILLISECOND
     95#ifdef CLOCK_DRIVER_ISRS_PER_TICK
     96  /*
     97   *  The driver is multiple ISRs per clock tick.
     98   */
     99
     100  if ( !Clock_driver_isrs ) {
     101
     102    rtems_clock_tick();
     103
     104    Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
     105  }
     106  Clock_driver_isrs--;
     107#else
     108
     109  /*
     110   *  The driver is one ISR per clock tick.
     111   */
    82112  rtems_clock_tick();
    83 #else
    84 #error "Clock driver shell: Does not currently support counting mseconds."
    85 #endif
    86 
     113#endif
    87114#endif
    88115}
     
    101128 *
    102129 */
    103 
    104 extern int CLOCK_SPEED;
    105130
    106131void Install_clock(
     
    177202  rtems_clock_minor = minor;
    178203 
     204  /*
     205   *  If we are counting ISRs per tick, then initialize the counter.
     206   */
     207
     208#ifdef CLOCK_DRIVER_ISRS_PER_TICK
     209  Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
     210#endif
     211
    179212  return RTEMS_SUCCESSFUL;
    180213}
Note: See TracChangeset for help on using the changeset viewer.