Changeset f1e8903 in rtems


Ignore:
Timestamp:
Aug 28, 2009, 6:24:10 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
b99a35a
Parents:
bcec955
Message:

2009-08-28 Joel Sherrill <joel.sherrill@…>

  • bootcard.c, bsplibc.c, clockdrv_shell.h, console-polled.c: Fix formatting.
Location:
c/src/lib/libbsp/shared
Files:
5 edited

Legend:

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

    rbcec955 rf1e8903  
     12009-08-28      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * bootcard.c, bsplibc.c, clockdrv_shell.h, console-polled.c: Fix
     4        formatting.
     5
    162009-08-12      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/shared/bootcard.c

    rbcec955 rf1e8903  
    8989     * work space up to the end of the work area as heap.
    9090     */
    91     heap_size_default = work_area_size - rtems_configuration_get_work_space_size();
     91    heap_size_default = work_area_size -
     92        rtems_configuration_get_work_space_size();
    9293
    9394    /* Keep it as a multiple of 16 bytes */
  • c/src/lib/libbsp/shared/bsplibc.c

    rbcec955 rf1e8903  
    3131     * Set up for the libc handling.
    3232     */
    33 
    3433    libc_init();
    3534}
  • c/src/lib/libbsp/shared/clockdrv_shell.h

    rbcec955 rf1e8903  
    2020#endif
    2121
    22 
    2322/*
    2423 * This method is rarely used so default it.
    2524 */
    2625#ifndef Clock_driver_support_find_timer
    27 #define Clock_driver_support_find_timer()
     26  #define Clock_driver_support_find_timer()
    2827#endif
    2928
     
    3130 *  ISRs until next clock tick
    3231 */
    33 
    3432#ifdef CLOCK_DRIVER_ISRS_PER_TICK
    35 volatile uint32_t         Clock_driver_isrs;
     33  volatile uint32_t  Clock_driver_isrs;
    3634#endif
    3735
     
    3937 *  Clock ticks since initialization
    4038 */
    41 
    4239volatile uint32_t         Clock_driver_ticks;
    4340
     
    4542 *  ISR formerly installed.
    4643 */
    47 
    4844rtems_isr_entry  Old_ticker;
    4945
    5046void Clock_exit( void );
    51 
    52 /*
    53  *  Major and minor number.
    54  */
    55 
    56 rtems_device_major_number rtems_clock_major = UINT32_MAX;
    57 rtems_device_minor_number rtems_clock_minor;
    5847
    5948/*
     
    6857 *
    6958 *  Return values:      NONE
    70  *
    71  */
    72 
     59 */
    7360rtems_isr Clock_isr(
    7461  rtems_vector_number vector
     
    7865   *  Accurate count of ISRs
    7966   */
    80 
    8167  Clock_driver_ticks += 1;
    8268
    83 #ifdef CLOCK_DRIVER_USE_FAST_IDLE
    84   do {
    85     rtems_clock_tick();
    86   } while ( _Thread_Executing == _Thread_Idle &&
    87           _Thread_Heir == _Thread_Executing);
    88 
    89   Clock_driver_support_at_tick();
    90   return;
    91 
    92 #else
    93 
    94   /*
    95    *  Do the hardware specific per-tick action.
    96    *
    97    *  The counter/timer may or may not be set to automatically reload.
    98    */
    99 
    100   Clock_driver_support_at_tick();
    101 
    102 #ifdef CLOCK_DRIVER_ISRS_PER_TICK
    103   /*
    104    *  The driver is multiple ISRs per clock tick.
    105    */
    106 
    107   if ( !Clock_driver_isrs ) {
    108 
    109     rtems_clock_tick();
    110 
    111     Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
    112   }
    113   Clock_driver_isrs--;
    114 #else
    115 
    116   /*
    117    *  The driver is one ISR per clock tick.
    118    */
    119   rtems_clock_tick();
    120 #endif
    121 #endif
     69  #ifdef CLOCK_DRIVER_USE_FAST_IDLE
     70    do {
     71      rtems_clock_tick();
     72    } while ( _Thread_Executing == _Thread_Idle &&
     73            _Thread_Heir == _Thread_Executing);
     74
     75    Clock_driver_support_at_tick();
     76    return;
     77  #else
     78    /*
     79     *  Do the hardware specific per-tick action.
     80     *
     81     *  The counter/timer may or may not be set to automatically reload.
     82     */
     83    Clock_driver_support_at_tick();
     84
     85    #ifdef CLOCK_DRIVER_ISRS_PER_TICK
     86      /*
     87       *  The driver is multiple ISRs per clock tick.
     88       */
     89      if ( !Clock_driver_isrs ) {
     90        rtems_clock_tick();
     91
     92        Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
     93      }
     94      Clock_driver_isrs--;
     95    #else
     96      /*
     97       *  The driver is one ISR per clock tick.
     98       */
     99      rtems_clock_tick();
     100    #endif
     101  #endif
    122102}
    123103
     
    212192
    213193  /*
    214    * make major/minor avail to others such as shared memory driver
    215    */
    216 
    217   rtems_clock_major = major;
    218   rtems_clock_minor = minor;
    219 
    220   /*
    221194   *  If we are counting ISRs per tick, then initialize the counter.
    222195   */
    223 
    224 #ifdef CLOCK_DRIVER_ISRS_PER_TICK
    225   Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
    226 #endif
     196  #ifdef CLOCK_DRIVER_ISRS_PER_TICK
     197    Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
     198  #endif
    227199
    228200  return RTEMS_SUCCESSFUL;
  • c/src/lib/libbsp/shared/console-polled.c

    rbcec955 rf1e8903  
    3636 *
    3737 */
    38 
    3938int console_write_support (
    40   int minor,
     39  int         minor,
    4140  const char *bufarg,
    42   int len
     41  int         len
    4342)
    4443{
     
    6665  rtems_status_code status;
    6766
     67  /*
     68   *  Ensure Termios is initialized
     69   */
    6870  rtems_termios_initialize();
    6971
     
    7173   *  Make sure the hardware is initialized.
    7274   */
    73 
    7475  console_initialize_hardware();
    7576
     
    7778   *  Register Device Names
    7879   */
    79 
    8080  status = rtems_io_register_name( "/dev/console", major, 0 );
    8181  if (status != RTEMS_SUCCESSFUL)
     
    107107    return RTEMS_INVALID_NUMBER;
    108108
    109   sc = rtems_termios_open (major, minor, arg, &pollCallbacks );
     109  sc = rtems_termios_open( major, minor, arg, &pollCallbacks );
    110110
    111111  return RTEMS_SUCCESSFUL;
     
    118118)
    119119{
    120   return rtems_termios_close (arg);
     120  return rtems_termios_close( arg );
    121121}
    122122
     
    127127)
    128128{
    129   return rtems_termios_read (arg);
     129  return rtems_termios_read( arg );
    130130}
    131131
     
    136136)
    137137{
    138   return rtems_termios_write (arg);
     138  return rtems_termios_write( arg );
    139139}
    140140
     
    145145)
    146146{
    147   return rtems_termios_ioctl (arg);
     147  return rtems_termios_ioctl( arg );
    148148}
Note: See TracChangeset for help on using the changeset viewer.