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.
This commit is contained in:
Sebastian Huber
2018-06-01 07:11:12 +02:00
parent 718a84afa3
commit 7ee5931393
40 changed files with 8 additions and 448 deletions

View File

@@ -174,17 +174,6 @@ static rtems_device_driver tlib_clock_install_isr(rtems_isr *isr)
return RTEMS_SUCCESSFUL;
}
static void tlib_clock_shutdown_hardware(void)
{
if (priv.tlib_tick) {
tlib_stop(priv.tlib_tick);
priv.tlib_tick = NULL;
}
if (priv.ops->shutdown_hardware) {
priv.ops->shutdown_hardware();
}
}
/** Simple counter **/
static uint32_t simple_tlib_tc_get(rtems_timecounter_simple *tc)
{
@@ -432,9 +421,6 @@ static const struct ops ops_irqamp = {
} \
} while (0)
#define Clock_driver_support_shutdown_hardware() \
tlib_clock_shutdown_hardware()
#define Clock_driver_timecounter_tick() \
tlib_clock_timecounter_tick()