mirror of
https://github.com/GorgonMeducer/perf_counter.git
synced 2025-02-07 19:34:18 +08:00
Update perf_counter.c
This commit is contained in:
parent
2d7f024492
commit
d36aced13a
@ -102,6 +102,11 @@ void perfc_port_clear_system_timer_counter(void);
|
|||||||
void perfc_port_insert_to_system_timer_insert_ovf_handler(void)
|
void perfc_port_insert_to_system_timer_insert_ovf_handler(void)
|
||||||
{
|
{
|
||||||
int64_t lLoad = perfc_port_get_system_timer_top() + 1;
|
int64_t lLoad = perfc_port_get_system_timer_top() + 1;
|
||||||
|
|
||||||
|
/* prevent high priority exceptions from preempting the system timer OVF
|
||||||
|
* exception handling
|
||||||
|
*/
|
||||||
|
__IRQ_SAFE {
|
||||||
s_lSystemClockCounts += lLoad;
|
s_lSystemClockCounts += lLoad;
|
||||||
|
|
||||||
// update system ms counter
|
// update system ms counter
|
||||||
@ -124,7 +129,7 @@ void perfc_port_insert_to_system_timer_insert_ovf_handler(void)
|
|||||||
s_wUSResidule = (uint32_t)((int64_t)lTemp - (int64_t)lUS * s_wUSUnit);
|
s_wUSResidule = (uint32_t)((int64_t)lTemp - (int64_t)lUS * s_wUSUnit);
|
||||||
|
|
||||||
} while(0);
|
} while(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t perfc_get_systimer_frequency(void)
|
uint32_t perfc_get_systimer_frequency(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user