summaryrefslogtreecommitdiffstats
path: root/bsps/i386
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/i386
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/i386')
-rw-r--r--bsps/i386/pc386/clock/ckinit.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/bsps/i386/pc386/clock/ckinit.c b/bsps/i386/pc386/clock/ckinit.c
index fce267bda7..afd5d01f1e 100644
--- a/bsps/i386/pc386/clock/ckinit.c
+++ b/bsps/i386/pc386/clock/ckinit.c
@@ -38,7 +38,6 @@ uint32_t pc386_clock_click_count;
/* forward declaration */
void Clock_isr(void *param);
-static void clockOff(void);
static void Clock_isr_handler(void *param);
/*
@@ -173,17 +172,6 @@ static void clockOn(void)
calibrate_tsc();
}
-static void clockOff(void)
-{
- rtems_interrupt_lock_context lock_context;
- rtems_interrupt_lock_acquire(&rtems_i386_i8254_access_lock, &lock_context);
- /* reset timer mode to standard (BIOS) value */
- outport_byte(TIMER_MODE, TIMER_SEL0 | TIMER_16BIT | TIMER_RATEGEN);
- outport_byte(TIMER_CNTR0, 0);
- outport_byte(TIMER_CNTR0, 0);
- rtems_interrupt_lock_release(&rtems_i386_i8254_access_lock, &lock_context);
-} /* Clock_exit */
-
bool Clock_isr_enabled = false;
static void Clock_isr_handler(void *param)
{
@@ -247,16 +235,4 @@ void Clock_driver_support_initialize_hardware(void)
Clock_isr_enabled = true;
}
-#define Clock_driver_support_shutdown_hardware() \
- do { \
- rtems_status_code status; \
- clockOff(); \
- status = rtems_interrupt_handler_remove( \
- BSP_PERIODIC_TIMER, \
- Clock_isr_handler, \
- NULL \
- ); \
- assert(status == RTEMS_SUCCESSFUL); \
- } while (0)
-
#include "../../../shared/dev/clock/clockimpl.h"