From 7ee59313932398aa2781503d25154c56301b9b73 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 1 Jun 2018 07:11:12 +0200 Subject: 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. --- bsps/arm/rtl22xx/clock/clockdrv.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'bsps/arm/rtl22xx/clock/clockdrv.c') diff --git a/bsps/arm/rtl22xx/clock/clockdrv.c b/bsps/arm/rtl22xx/clock/clockdrv.c index 84ab9c063b..0e8fa274a7 100644 --- a/bsps/arm/rtl22xx/clock/clockdrv.c +++ b/bsps/arm/rtl22xx/clock/clockdrv.c @@ -126,19 +126,6 @@ rtems_irq_connect_data clock_isr_data = { ); \ } while (0) -/** - * Do whatever you need to shut the clock down and remove the - * interrupt handler. Since this normally only gets called on - * RTEMS shutdown, you may not need to do anything other than - * remove the ISR. - */ -#define Clock_driver_support_shutdown_hardware() \ - do { \ - /* Disable timer */ \ - T0TCR&=~0x02; \ - BSP_remove_rtems_irq_handler(&clock_isr_data); \ - } while (0) - /** * Enables clock interrupt. * -- cgit v1.2.3