Enable access to kernel tick information in ISR

The osKernelGetTickCount() is the only function to get kernel tick information,
however it's not allowed to access in ISR.

It's already enabled in API v2.1.1.
pull/5078/head
Viller Hsiao 2017-09-12 17:54:35 +08:00
parent de6d2918b8
commit 6c5af87c73
1 changed files with 2 additions and 4 deletions

View File

@ -607,8 +607,7 @@ void osKernelResume (uint32_t sleep_ticks) {
/// Get the RTOS kernel tick count.
uint64_t osKernelGetTickCount (void) {
if (IS_IRQ_MODE() || IS_IRQ_MASKED()) {
EvrRtxKernelGetTickCount(0U);
return 0U;
return svcRtxKernelGetTickCount();
} else {
return __svcKernelGetTickCount();
}
@ -617,8 +616,7 @@ uint64_t osKernelGetTickCount (void) {
/// Get the RTOS kernel tick frequency.
uint32_t osKernelGetTickFreq (void) {
if (IS_IRQ_MODE() || IS_IRQ_MASKED()) {
EvrRtxKernelGetTickFreq(0U);
return 0U;
return svcRtxKernelGetTickFreq();
} else {
return __svcKernelGetTickFreq();
}