Changeset 7ee59313 in rtems for bsps/mips/rbtx4938


Ignore:
Timestamp:
06/01/18 05:11:12 (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, 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/mips/rbtx4938/clock/clockdrv.c

    r718a84af r7ee59313  
    101101
    102102
    103 
    104 #define Clock_driver_support_shutdown_hardware() \
    105   do { \
    106         uint32_t temp; \
    107     temp = TX4938_REG_READ( TX4938_REG_BASE, TX4938_TIMER0_BASE + TX4938_TIMER_ITMR ); /* Disable interval timer interrupt */ \
    108     temp &= ~TIMER_INT_ENABLE_MASK; \
    109     TX4938_REG_WRITE( TX4938_REG_BASE, TX4938_TIMER0_BASE + TX4938_TIMER_ITMR, temp ); \
    110     temp = TX4938_REG_READ( TX4938_REG_BASE, TX4938_TIMER0_BASE + TX4938_TIMER_PGMR ); /* Disable pulse generator interrupt */ \
    111     temp &= ~(TPIAE | TPIBE); \
    112     TX4938_REG_WRITE( TX4938_REG_BASE, TX4938_TIMER0_BASE + TX4938_TIMER_PGMR, temp ); \
    113     TX4938_REG_WRITE( TX4938_REG_BASE, TX4938_TIMER0_BASE + TX4938_TIMER_TCR, 0x0 ); /* Disable timer */ \
    114   } while(0)
    115 
    116 
    117103#define CLOCK_DRIVER_USE_DUMMY_TIMECOUNTER
    118104
Note: See TracChangeset for help on using the changeset viewer.