summaryrefslogtreecommitdiffstats
path: root/bsps/shared/dev/clock/clockimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-01 07:11:12 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-27 08:58:16 +0200
commit7ee59313932398aa2781503d25154c56301b9b73 (patch)
treeefaeaf7fa038f3de1b58676deb16d52744c0b373 /bsps/shared/dev/clock/clockimpl.h
parentRemove unused CPU_MODES_INTERRUPT_LEVEL (diff)
downloadrtems-7ee59313932398aa2781503d25154c56301b9b73.tar.bz2
Remove Clock_driver_support_shutdown_hardware()
The aim of this clock driver hook was to stop clock tick interrupts at some late point in the exit() procedure. The use of atexit() pulls in malloc() which pulls in errno. It is incompatible with the intention of the CONFIGURE_DISABLE_NEWLIB_REENTRANCY configuration option. The exit() function must be called from thread context, so accompanied clock tick interrupts should cause no harm. On the contrary, someone may assume a normal operating system operation, e.g. working timeouts. Remove the Clock_driver_support_shutdown_hardware() clock driver hook. Close #3436.
Diffstat (limited to 'bsps/shared/dev/clock/clockimpl.h')
-rw-r--r--bsps/shared/dev/clock/clockimpl.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/bsps/shared/dev/clock/clockimpl.h b/bsps/shared/dev/clock/clockimpl.h
index 6eaa6c94e5..f64d6fb3a1 100644
--- a/bsps/shared/dev/clock/clockimpl.h
+++ b/bsps/shared/dev/clock/clockimpl.h
@@ -110,7 +110,7 @@ static void Clock_driver_timecounter_tick( void )
volatile uint32_t Clock_driver_ticks;
#ifdef Clock_driver_support_shutdown_hardware
-void Clock_exit( void );
+#error "Clock_driver_support_shutdown_hardware() is no longer supported"
#endif
/**
@@ -190,21 +190,6 @@ rtems_isr Clock_isr(
#endif
}
-#ifdef Clock_driver_support_shutdown_hardware
-/**
- * @brief Clock_exit
- *
- * This routine allows the clock driver to exit by masking the interrupt and
- * disabling the clock's counter.
- */
-void Clock_exit( void )
-{
- Clock_driver_support_shutdown_hardware();
-
- /* do not restore old vector */
-}
-#endif
-
/**
* @brief Clock_initialize
*
@@ -245,10 +230,6 @@ rtems_device_driver Clock_initialize(
*/
Clock_driver_support_initialize_hardware();
-#ifdef Clock_driver_support_shutdown_hardware
- atexit( Clock_exit );
-#endif
-
/*
* If we are counting ISRs per tick, then initialize the counter.
*/