From e182c62027a01ebc8ce00699fddb559f9e7c05d3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 3 Jan 2001 16:44:17 +0000 Subject: 2001-01-03 Joel Sherrill * clockdrv_shell.c: Added fast idle mode which is enabled by defining CLOCK_DRIVER_USE_FAST_IDLE. * console-polled.c: Added console_initialize_hardware() hook. --- c/src/lib/libbsp/shared/clockdrv_shell.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'c/src/lib/libbsp/shared/clockdrv_shell.c') diff --git a/c/src/lib/libbsp/shared/clockdrv_shell.c b/c/src/lib/libbsp/shared/clockdrv_shell.c index b9dc1ce3e4..af1de48987 100644 --- a/c/src/lib/libbsp/shared/clockdrv_shell.c +++ b/c/src/lib/libbsp/shared/clockdrv_shell.c @@ -51,8 +51,20 @@ rtems_isr Clock_isr( rtems_vector_number vector ) { +#ifdef CLOCK_DRIVER_USE_FAST_IDLE + do { + Clock_driver_ticks += 1; + 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(); @@ -64,13 +76,14 @@ rtems_isr Clock_isr( Clock_driver_ticks += 1; /* - * Real Time Clock counter/timer is set to automatically reload. */ #ifndef CLOCK_DRIVER_ISRS_ARE_ONE_MILLISECOND rtems_clock_tick(); #else #error "Clock driver shell: Does not currently support counting mseconds." +#endif + #endif } -- cgit v1.2.3