diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-28 18:24:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-28 18:24:10 +0000 |
commit | f1e8903dc074a64e4299632dbed23c14b6f1704f (patch) | |
tree | 249bcef6358860984b125d216da0c127c5ee7198 /c | |
parent | 2009-08-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-f1e8903dc074a64e4299632dbed23c14b6f1704f.tar.bz2 |
2009-08-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* bootcard.c, bsplibc.c, clockdrv_shell.h, console-polled.c: Fix
formatting.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/shared/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/bootcard.c | 3 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/bsplibc.c | 1 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/clockdrv_shell.h | 104 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/console-polled.c | 20 |
5 files changed, 55 insertions, 78 deletions
diff --git a/c/src/lib/libbsp/shared/ChangeLog b/c/src/lib/libbsp/shared/ChangeLog index df419dbf70..4cecea7cab 100644 --- a/c/src/lib/libbsp/shared/ChangeLog +++ b/c/src/lib/libbsp/shared/ChangeLog @@ -1,3 +1,8 @@ +2009-08-28 Joel Sherrill <joel.sherrill@OARcorp.com> + + * bootcard.c, bsplibc.c, clockdrv_shell.h, console-polled.c: Fix + formatting. + 2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com> * src/irq-legacy.c: Spacing, tabs, and proper format for license diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c index 912f73b094..eb0d127008 100644 --- a/c/src/lib/libbsp/shared/bootcard.c +++ b/c/src/lib/libbsp/shared/bootcard.c @@ -88,7 +88,8 @@ static rtems_status_code bootcard_bsp_libc_helper( * For the default heap size use the free space from the end of the * work space up to the end of the work area as heap. */ - heap_size_default = work_area_size - rtems_configuration_get_work_space_size(); + heap_size_default = work_area_size - + rtems_configuration_get_work_space_size(); /* Keep it as a multiple of 16 bytes */ heap_size_default &= ~((intptr_t) 0xf); diff --git a/c/src/lib/libbsp/shared/bsplibc.c b/c/src/lib/libbsp/shared/bsplibc.c index d2030efbc4..ce0090077d 100644 --- a/c/src/lib/libbsp/shared/bsplibc.c +++ b/c/src/lib/libbsp/shared/bsplibc.c @@ -30,6 +30,5 @@ void bsp_libc_init( /* * Set up for the libc handling. */ - libc_init(); } diff --git a/c/src/lib/libbsp/shared/clockdrv_shell.h b/c/src/lib/libbsp/shared/clockdrv_shell.h index 645d07b29d..9912d56f16 100644 --- a/c/src/lib/libbsp/shared/clockdrv_shell.h +++ b/c/src/lib/libbsp/shared/clockdrv_shell.h @@ -19,44 +19,33 @@ #error "clockdrv_shell.c: fast idle and N ISRs per tick is not supported" #endif - /* * This method is rarely used so default it. */ #ifndef Clock_driver_support_find_timer -#define Clock_driver_support_find_timer() + #define Clock_driver_support_find_timer() #endif /* * ISRs until next clock tick */ - #ifdef CLOCK_DRIVER_ISRS_PER_TICK -volatile uint32_t Clock_driver_isrs; + volatile uint32_t Clock_driver_isrs; #endif /* * Clock ticks since initialization */ - volatile uint32_t Clock_driver_ticks; /* * ISR formerly installed. */ - rtems_isr_entry Old_ticker; void Clock_exit( void ); /* - * Major and minor number. - */ - -rtems_device_major_number rtems_clock_major = UINT32_MAX; -rtems_device_minor_number rtems_clock_minor; - -/* * Clock_isr * * This is the clock tick interrupt handler. @@ -67,9 +56,7 @@ rtems_device_minor_number rtems_clock_minor; * Output parameters: NONE * * Return values: NONE - * */ - rtems_isr Clock_isr( rtems_vector_number vector ) @@ -77,48 +64,41 @@ rtems_isr Clock_isr( /* * Accurate count of ISRs */ - Clock_driver_ticks += 1; -#ifdef CLOCK_DRIVER_USE_FAST_IDLE - do { - rtems_clock_tick(); - } while ( _Thread_Executing == _Thread_Idle && - _Thread_Heir == _Thread_Executing); - - Clock_driver_support_at_tick(); - return; - -#else - - /* - * Do the hardware specific per-tick action. - * - * The counter/timer may or may not be set to automatically reload. - */ - - Clock_driver_support_at_tick(); - -#ifdef CLOCK_DRIVER_ISRS_PER_TICK - /* - * The driver is multiple ISRs per clock tick. - */ - - if ( !Clock_driver_isrs ) { - - rtems_clock_tick(); - - Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK; - } - Clock_driver_isrs--; -#else - - /* - * The driver is one ISR per clock tick. - */ - rtems_clock_tick(); -#endif -#endif + #ifdef CLOCK_DRIVER_USE_FAST_IDLE + do { + rtems_clock_tick(); + } while ( _Thread_Executing == _Thread_Idle && + _Thread_Heir == _Thread_Executing); + + Clock_driver_support_at_tick(); + return; + #else + /* + * Do the hardware specific per-tick action. + * + * The counter/timer may or may not be set to automatically reload. + */ + Clock_driver_support_at_tick(); + + #ifdef CLOCK_DRIVER_ISRS_PER_TICK + /* + * The driver is multiple ISRs per clock tick. + */ + if ( !Clock_driver_isrs ) { + rtems_clock_tick(); + + Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK; + } + Clock_driver_isrs--; + #else + /* + * The driver is one ISR per clock tick. + */ + rtems_clock_tick(); + #endif + #endif } /* @@ -211,19 +191,11 @@ rtems_device_driver Clock_initialize( Install_clock( Clock_isr ); /* - * make major/minor avail to others such as shared memory driver - */ - - rtems_clock_major = major; - rtems_clock_minor = minor; - - /* * If we are counting ISRs per tick, then initialize the counter. */ - -#ifdef CLOCK_DRIVER_ISRS_PER_TICK - Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK; -#endif + #ifdef CLOCK_DRIVER_ISRS_PER_TICK + Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK; + #endif return RTEMS_SUCCESSFUL; } diff --git a/c/src/lib/libbsp/shared/console-polled.c b/c/src/lib/libbsp/shared/console-polled.c index abe95cea53..0fe9c520e7 100644 --- a/c/src/lib/libbsp/shared/console-polled.c +++ b/c/src/lib/libbsp/shared/console-polled.c @@ -35,11 +35,10 @@ void console_initialize_hardware(void); * Console Termios Support Entry Points * */ - int console_write_support ( - int minor, + int minor, const char *bufarg, - int len + int len ) { int nwrite = 0; @@ -65,18 +64,19 @@ rtems_device_driver console_initialize( { rtems_status_code status; + /* + * Ensure Termios is initialized + */ rtems_termios_initialize(); /* * Make sure the hardware is initialized. */ - console_initialize_hardware(); /* * Register Device Names */ - status = rtems_io_register_name( "/dev/console", major, 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); @@ -106,7 +106,7 @@ rtems_device_driver console_open( if ( minor > 1 ) return RTEMS_INVALID_NUMBER; - sc = rtems_termios_open (major, minor, arg, &pollCallbacks ); + sc = rtems_termios_open( major, minor, arg, &pollCallbacks ); return RTEMS_SUCCESSFUL; } @@ -117,7 +117,7 @@ rtems_device_driver console_close( void * arg ) { - return rtems_termios_close (arg); + return rtems_termios_close( arg ); } rtems_device_driver console_read( @@ -126,7 +126,7 @@ rtems_device_driver console_read( void * arg ) { - return rtems_termios_read (arg); + return rtems_termios_read( arg ); } rtems_device_driver console_write( @@ -135,7 +135,7 @@ rtems_device_driver console_write( void * arg ) { - return rtems_termios_write (arg); + return rtems_termios_write( arg ); } rtems_device_driver console_control( @@ -144,5 +144,5 @@ rtems_device_driver console_control( void * arg ) { - return rtems_termios_ioctl (arg); + return rtems_termios_ioctl( arg ); } |