Changeset 7ee59313 in rtems for bsps/arm/beagle


Ignore:
Timestamp:
Jun 1, 2018, 5:11:12 AM (21 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
196ce18
Parents:
718a84af
git-author:
Sebastian Huber <sebastian.huber@…> (06/01/18 05:11:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/27/18 06:58:16)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/arm/beagle/clock/clock.c

    r718a84af r7ee59313  
    291291}
    292292
    293 static void beagle_clock_cleanup(void)
    294 {
    295   rtems_status_code sc = RTEMS_SUCCESSFUL;
    296 
    297   /* Disable timer */
    298   mmio_clear(timer->base + timer->regs->TCLR, OMAP3_TCLR_ST);
    299 
    300   /* Remove interrupt handler */
    301   sc = rtems_interrupt_handler_remove(
    302     timer->irq_nr,
    303     clock_isr,
    304     NULL
    305   );
    306   if (sc != RTEMS_SUCCESSFUL) {
    307     rtems_fatal_error_occurred(0xdeadbeef);
    308   }
    309   clock_isr = NULL;
    310 
    311   /* stop frclock */
    312   mmio_clear(fr_timer->base + fr_timer->regs->TCLR, OMAP3_TCLR_ST);
    313 }
    314 
    315293#define Clock_driver_support_at_tick() beagle_clock_at_tick()
    316294#define Clock_driver_support_initialize_hardware() beagle_clock_initialize()
     
    318296  beagle_clock_handler_install(isr)
    319297
    320 #define Clock_driver_support_shutdown_hardware() beagle_clock_cleanup()
    321 
    322298/* Include shared source clock driver code */
    323299#include "../../shared/dev/clock/clockimpl.h"
Note: See TracChangeset for help on using the changeset viewer.