修复CPUP编译失败问题

This commit is contained in:
zhushengle 2021-01-20 11:07:55 +08:00 committed by Gitee
parent 5ee1803849
commit e12055cfcc
2 changed files with 7 additions and 4 deletions

View File

@ -32,7 +32,9 @@
#include "los_cpup.h"
#include "securec.h"
#include "los_memory.h"
#include "los_timer.h"
#include "los_debug.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
@ -60,13 +62,11 @@ LITE_OS_SEC_BSS OsCpupCB *g_cpup = NULL;
LITE_OS_SEC_BSS UINT64 g_lastRecordTime;
LITE_OS_SEC_BSS UINT16 g_hisPos; /* <current Sampling point of historyTime */
extern VOID LOS_GetCpuCycle(UINT32 *cntHi, UINT32 *cntLo);
LITE_OS_SEC_TEXT_MINOR STATIC INLINE UINT64 OsGetCurrentCyclesCount(VOID)
{
UINT32 high = 0;
UINT32 low = 0;
LOS_GetCpuCycle(&high, &low);
HalGetCpuCycle(&high, &low);
return (((UINT64)high << 32) + low); // 32 means bits of word
}

View File

@ -50,6 +50,9 @@
#include "los_swtmr.h"
#endif
#if (LOSCFG_BASE_CORE_CPUP == 1)
#include "los_cpup.h"
#endif
#ifdef __cplusplus
#if __cplusplus