Keeps the Moonlight startup objects local to the board. Updates the plain and SMP VP regression harnesses for the new ThreadX revision and replaces generated ISR hooks with direct callbacks.
17 lines
493 B
C
17 lines
493 B
C
#include "hwtimer.h"
|
|
|
|
void __real__tx_timer_interrupt(void);
|
|
|
|
void __wrap__tx_timer_interrupt(void)
|
|
{
|
|
static uint32_t sequence = 1;
|
|
|
|
/* Vary each interval by one ACLINT count so the periodic ISR samples
|
|
different points in the test thread's preemption-disable loop. */
|
|
sequence = sequence * 1664525u + 1013904223u;
|
|
uint64_t next = get_aclint_mtimecmp(aclint);
|
|
set_aclint_mtimecmp(aclint, (sequence >> 31) ? next + 1 : next - 1);
|
|
|
|
__real__tx_timer_interrupt();
|
|
}
|