!18 【轻量级 PR】:修复CPUP编译失败问题

Merge pull request !18 from zhushengle/N/A
This commit is contained in:
openharmony_ci 2021-01-20 14:13:30 +08:00 committed by Gitee
commit 13355bb6a7
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
@ -132,7 +135,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_KernelInit(VOID)
}
#if (LOSCFG_BASE_CORE_TSK_MONITOR == 1)
OsTaskMonInit();
OsTaskMonInit();
#endif
#if (LOSCFG_BASE_CORE_CPUP == 1)