#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(); }