diff --git a/components/cpup/los_cpup.c b/components/cpup/los_cpup.c index f9d186c8..9c0c31ba 100644 --- a/components/cpup/los_cpup.c +++ b/components/cpup/los_cpup.c @@ -215,7 +215,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_SysCpuUsage(VOID) UINT64 cpuCycleAll = 0; UINT32 cpupRet = 0; UINT16 loopNum; - UINTPTR intSave; + UINT32 intSave; if (g_cpupInitFlg == 0) { return LOS_ERRNO_CPUP_NO_INIT; @@ -254,7 +254,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_HistorySysCpuUsage(UINT16 mode) UINT16 loopNum; UINT16 curPos; UINT16 prePos = 0; - UINTPTR intSave; + UINT32 intSave; if (g_cpupInitFlg == 0) { return LOS_ERRNO_CPUP_NO_INIT; @@ -301,7 +301,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskCpuUsage(UINT32 taskID) { UINT64 cpuCycleAll = 0; UINT16 loopNum; - UINTPTR intSave; + UINT32 intSave; UINT32 cpupRet = 0; if (g_cpupInitFlg == 0) { @@ -350,7 +350,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_HistoryTaskCpuUsage(UINT32 taskID, UINT16 mode UINT64 cpuCycleCurTsk = 0; UINT16 loopNum, curPos; UINT16 prePos = 0; - UINTPTR intSave; + UINT32 intSave; UINT32 cpupRet = 0; if (g_cpupInitFlg == 0) { @@ -403,7 +403,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_AllTaskCpuUsage(CPUP_INFO_S *cpupInfo, UINT16 UINT16 loopNum; UINT16 curPos; UINT16 prePos = 0; - UINTPTR intSave; + UINT32 intSave; UINT64 cpuCycleAll = 0; UINT64 cpuCycleCurTsk = 0; diff --git a/components/exchook/los_exchook.c b/components/exchook/los_exchook.c index 067d6c99..c5171b57 100644 --- a/components/exchook/los_exchook.c +++ b/components/exchook/los_exchook.c @@ -54,7 +54,7 @@ STATIC VOID DoExcHookInRegOrder(EXC_TYPE excType, struct Node *node) STATIC VOID DoExcHook(EXC_TYPE excType) { - UINTPTR intSave; + UINT32 intSave; if (excType >= EXC_TYPE_END) { return; } @@ -88,7 +88,7 @@ STATIC struct Node *GetFreeNode(VOID) UINT32 LOS_RegExcHook(EXC_TYPE excType, ExcHookFn excHookFn) { - UINTPTR intSave; + UINT32 intSave; struct Node *node = NULL; if (excType >= EXC_TYPE_END || excHookFn == NULL) { return LOS_ERRNO_SYS_PTR_NULL; @@ -110,7 +110,7 @@ UINT32 LOS_RegExcHook(EXC_TYPE excType, ExcHookFn excHookFn) UINT32 LOS_UnRegExcHook(EXC_TYPE excType, ExcHookFn excHookFn) { - UINTPTR intSave; + UINT32 intSave; struct Node *node = NULL; struct Node *preNode = NULL; if (excType >= EXC_TYPE_END || excHookFn == NULL) { diff --git a/kal/cmsis/cmsis_liteos2.c b/kal/cmsis/cmsis_liteos2.c index 9aa795b6..2f3d7346 100644 --- a/kal/cmsis/cmsis_liteos2.c +++ b/kal/cmsis/cmsis_liteos2.c @@ -396,18 +396,18 @@ uint32_t osTaskStackWaterMarkGet(UINT32 taskID) { UINT32 uwCount = 0; UINT32 *ptopOfStack; - UINTPTR uvIntSave; + UINT32 intSave; LosTaskCB *pstTaskCB = NULL; if (taskID > LOSCFG_BASE_CORE_TSK_LIMIT) { return 0; } - uvIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); pstTaskCB = OS_TCB_FROM_TID(taskID); if (OS_TASK_STATUS_UNUSED & (pstTaskCB->taskStatus)) { - LOS_IntRestore(uvIntSave); + LOS_IntRestore(intSave); return 0; } @@ -421,7 +421,7 @@ uint32_t osTaskStackWaterMarkGet(UINT32 taskID) uwCount *= sizeof(UINT32); - LOS_IntRestore(uvIntSave); + LOS_IntRestore(intSave); return uwCount; } @@ -739,7 +739,7 @@ osStatus_t osTimerStart(osTimerId_t timer_id, uint32_t ticks) return osErrorParameter; } - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); pstSwtmr = (SWTMR_CTRL_S *)timer_id; pstSwtmr->uwInterval = ticks; uwRet = LOS_SwtmrStart(pstSwtmr->usTimerID); @@ -869,7 +869,7 @@ uint32_t osEventFlagsSet(osEventFlagsId_t ef_id, uint32_t flags) uint32_t osEventFlagsClear(osEventFlagsId_t ef_id, uint32_t flags) { PEVENT_CB_S pstEventCB = (PEVENT_CB_S)ef_id; - UINTPTR uwIntSave; + UINT32 intSave; uint32_t rflags; UINT32 uwRet; @@ -877,11 +877,11 @@ uint32_t osEventFlagsClear(osEventFlagsId_t ef_id, uint32_t flags) return (uint32_t)osFlagsErrorParameter; } - uwIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); rflags = pstEventCB->uwEventID; uwRet = LOS_EventClear(pstEventCB, ~flags); - LOS_IntRestore(uwIntSave); + LOS_IntRestore(intSave); if (uwRet != LOS_OK) { return (uint32_t)osFlagsErrorParameter; } else { @@ -893,16 +893,16 @@ uint32_t osEventFlagsClear(osEventFlagsId_t ef_id, uint32_t flags) uint32_t osEventFlagsGet(osEventFlagsId_t ef_id) { PEVENT_CB_S pstEventCB = (PEVENT_CB_S)ef_id; - UINTPTR uwIntSave; + UINT32 intSave; uint32_t rflags; if (pstEventCB == NULL) { return 0; } - uwIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); rflags = pstEventCB->uwEventID; - LOS_IntRestore(uwIntSave); + LOS_IntRestore(intSave); return rflags; } @@ -954,16 +954,16 @@ uint32_t osEventFlagsWait(osEventFlagsId_t ef_id, uint32_t flags, uint32_t optio osStatus_t osEventFlagsDelete(osEventFlagsId_t ef_id) { PEVENT_CB_S pstEventCB = (PEVENT_CB_S)ef_id; - UINTPTR uwIntSave; + UINT32 intSave; osStatus_t uwRet; - uwIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); if (LOS_EventDestroy(pstEventCB) == LOS_OK) { uwRet = osOK; } else { uwRet = osErrorParameter; } - LOS_IntRestore(uwIntSave); + LOS_IntRestore(intSave); if (LOS_MemFree(m_aucSysMem0, (void *)pstEventCB) == LOS_OK) { uwRet = osOK; @@ -1040,7 +1040,7 @@ osStatus_t osMutexRelease(osMutexId_t mutex_id) osThreadId_t osMutexGetOwner(osMutexId_t mutex_id) { - UINT32 uwIntSave; + UINT32 intSave; LosTaskCB *pstTaskCB; if (OS_INT_ACTIVE) { @@ -1051,9 +1051,9 @@ osThreadId_t osMutexGetOwner(osMutexId_t mutex_id) return NULL; } - uwIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); pstTaskCB = ((LosMuxCB *)mutex_id)->owner; - LOS_IntRestore(uwIntSave); + LOS_IntRestore(intSave); return (osThreadId_t)pstTaskCB; } @@ -1158,7 +1158,7 @@ osStatus_t osSemaphoreRelease(osSemaphoreId_t semaphore_id) uint32_t osSemaphoreGetCount(osSemaphoreId_t semaphore_id) { - UINT32 uwIntSave; + UINT32 intSave; UINT32 uwCount; if (OS_INT_ACTIVE) { @@ -1169,9 +1169,9 @@ uint32_t osSemaphoreGetCount(osSemaphoreId_t semaphore_id) return 0; } - uwIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); uwCount = ((LosSemCB *)semaphore_id)->semCount; - LOS_IntRestore(uwIntSave); + LOS_IntRestore(intSave); return uwCount; } @@ -1308,15 +1308,15 @@ uint32_t osMessageQueueGetMsgSize(osMessageQueueId_t mq_id) uint32_t osMessageQueueGetCount(osMessageQueueId_t mq_id) { uint32_t count; - UINTPTR uwIntSave; + UINT32 intSave; LosQueueCB *pstQueue = (LosQueueCB *)mq_id; if (pstQueue == NULL) { count = 0U; } else { - uwIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); count = (uint32_t)(pstQueue->readWriteableCnt[OS_QUEUE_READ]); - LOS_IntRestore(uwIntSave); + LOS_IntRestore(intSave); } return count; } @@ -1325,15 +1325,15 @@ uint32_t osMessageQueueGetCount(osMessageQueueId_t mq_id) uint32_t osMessageQueueGetSpace(osMessageQueueId_t mq_id) { uint32_t space; - UINTPTR uwIntSave; + UINT32 intSave; LosQueueCB *pstQueue = (LosQueueCB *)mq_id; if (pstQueue == NULL) { space = 0U; } else { - uwIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); space = (uint32_t)pstQueue->readWriteableCnt[OS_QUEUE_WRITE]; - LOS_IntRestore(uwIntSave); + LOS_IntRestore(intSave); } return space; } @@ -1452,7 +1452,7 @@ void *osMemoryPoolAlloc(osMemoryPoolId_t mp_id, uint32_t timeout) { MemPoolCB *mp = (MemPoolCB *)mp_id; LOS_MEMBOX_NODE *node = NULL; - UINTPTR intSave; + UINT32 intSave; UNUSED(timeout); @@ -1479,7 +1479,7 @@ osStatus_t osMemoryPoolFree(osMemoryPoolId_t mp_id, void *block) MemPoolCB *mp = (MemPoolCB *)mp_id; LOS_MEMBOX_NODE *node = NULL; LOS_MEMBOX_NODE *nodeTmp = NULL; - UINTPTR intSave; + UINT32 intSave; if ((mp_id == NULL) || (block == NULL)) { return osErrorParameter; @@ -1510,7 +1510,7 @@ osStatus_t osMemoryPoolFree(osMemoryPoolId_t mp_id, void *block) osStatus_t osMemoryPoolDelete(osMemoryPoolId_t mp_id) { MemPoolCB *mp = (MemPoolCB *)mp_id; - UINTPTR intSave; + UINT32 intSave; if (OS_INT_ACTIVE) { return osErrorISR; @@ -1545,7 +1545,7 @@ osStatus_t osMemoryPoolDelete(osMemoryPoolId_t mp_id) uint32_t osMemoryPoolGetCapacity(osMemoryPoolId_t mp_id) { MemPoolCB *mp = (MemPoolCB *)mp_id; - UINTPTR intSave; + UINT32 intSave; uint32_t num; if (mp_id == NULL) { @@ -1566,7 +1566,7 @@ uint32_t osMemoryPoolGetCapacity(osMemoryPoolId_t mp_id) uint32_t osMemoryPoolGetBlockSize(osMemoryPoolId_t mp_id) { MemPoolCB *mp = (MemPoolCB *)mp_id; - UINTPTR intSave; + UINT32 intSave; uint32_t size; if (mp_id == NULL) { @@ -1587,7 +1587,7 @@ uint32_t osMemoryPoolGetBlockSize(osMemoryPoolId_t mp_id) uint32_t osMemoryPoolGetCount(osMemoryPoolId_t mp_id) { MemPoolCB *mp = (MemPoolCB *)mp_id; - UINTPTR intSave; + UINT32 intSave; uint32_t count; if (mp_id == NULL) { @@ -1608,7 +1608,7 @@ uint32_t osMemoryPoolGetCount(osMemoryPoolId_t mp_id) uint32_t osMemoryPoolGetSpace(osMemoryPoolId_t mp_id) { MemPoolCB *mp = (MemPoolCB *)mp_id; - UINTPTR intSave; + UINT32 intSave; uint32_t space; if (mp_id == NULL) { @@ -1631,7 +1631,7 @@ const char *osMemoryPoolGetName(osMemoryPoolId_t mp_id) { MemPoolCB *mp = (MemPoolCB *)mp_id; const char *p = NULL; - UINTPTR intSave; + UINT32 intSave; if (mp_id == NULL) { return NULL; diff --git a/kal/posix/src/time.c b/kal/posix/src/time.c index d897fad6..838be5a1 100644 --- a/kal/posix/src/time.c +++ b/kal/posix/src/time.c @@ -145,7 +145,7 @@ int timer_settime(timer_t timerID, int flags, const struct itimerspec *restrict value, struct itimerspec *restrict oldValue) { - UINTPTR intSave; + UINT32 intSave; UINT32 swtmrID = (UINT32)(UINTPTR)timerID; SWTMR_CTRL_S *swtmr = NULL; UINT32 interval, expiry, ret; @@ -254,7 +254,7 @@ STATIC VOID OsGetHwTime(struct timespec *hwTime) STATIC VOID OsGetRealTime(struct timespec *realTime) { - UINTPTR intSave; + UINT32 intSave; struct timespec hwTime = {0}; OsGetHwTime(&hwTime); intSave = LOS_IntLock(); @@ -266,7 +266,7 @@ STATIC VOID OsGetRealTime(struct timespec *realTime) STATIC VOID OsSetRealTime(const struct timespec *realTime) { - UINTPTR intSave; + UINT32 intSave; struct timespec hwTime = {0}; OsGetHwTime(&hwTime); intSave = LOS_IntLock(); diff --git a/kernel/arch/arm/cortex-m3/keil/los_interrupt.c b/kernel/arch/arm/cortex-m3/keil/los_interrupt.c index b873680f..34b15fe1 100644 --- a/kernel/arch/arm/cortex-m3/keil/los_interrupt.c +++ b/kernel/arch/arm/cortex-m3/keil/los_interrupt.c @@ -215,7 +215,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum, HWI_PROC_FUNC handler, HWI_ARG_T arg) { - UINTPTR intSave; + UINT32 intSave; if (handler == NULL) { return OS_ERRNO_HWI_PROC_FUNC_NULL; diff --git a/kernel/arch/arm/cortex-m3/keil/los_timer.c b/kernel/arch/arm/cortex-m3/keil/los_timer.c index 0300c15a..fcdffde3 100644 --- a/kernel/arch/arm/cortex-m3/keil/los_timer.c +++ b/kernel/arch/arm/cortex-m3/keil/los_timer.c @@ -86,7 +86,7 @@ WEAK VOID HalSysTickReload(UINT64 nextResponseTime) WEAK UINT64 HalGetTickCycle(UINT32 *period) { UINT32 hwCycle; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); *period = SysTick->LOAD; hwCycle = *period - SysTick->VAL; LOS_IntRestore(intSave); diff --git a/kernel/arch/arm/cortex-m33/gcc/los_interrupt.c b/kernel/arch/arm/cortex-m33/gcc/los_interrupt.c index 298a30d0..1d2b1d2f 100644 --- a/kernel/arch/arm/cortex-m33/gcc/los_interrupt.c +++ b/kernel/arch/arm/cortex-m33/gcc/los_interrupt.c @@ -205,7 +205,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum, HWI_PROC_FUNC handler, HWI_ARG_T arg) { - UINTPTR intSave; + UINT32 intSave; if (handler == NULL) { return OS_ERRNO_HWI_PROC_FUNC_NULL; diff --git a/kernel/arch/arm/cortex-m33/gcc/los_timer.c b/kernel/arch/arm/cortex-m33/gcc/los_timer.c index bebda6f8..e4a0160e 100644 --- a/kernel/arch/arm/cortex-m33/gcc/los_timer.c +++ b/kernel/arch/arm/cortex-m33/gcc/los_timer.c @@ -85,7 +85,7 @@ WEAK VOID HalSysTickReload(UINT64 nextResponseTime) WEAK UINT64 HalGetTickCycle(UINT32 *period) { UINT32 hwCycle; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); *period = SysTick->LOAD; hwCycle = *period - SysTick->VAL; LOS_IntRestore(intSave); diff --git a/kernel/arch/arm/cortex-m4/gcc/los_interrupt.c b/kernel/arch/arm/cortex-m4/gcc/los_interrupt.c index 74e4a5da..5fcd9359 100644 --- a/kernel/arch/arm/cortex-m4/gcc/los_interrupt.c +++ b/kernel/arch/arm/cortex-m4/gcc/los_interrupt.c @@ -215,7 +215,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum, HWI_PROC_FUNC handler, HWI_ARG_T arg) { - UINTPTR intSave; + UINT32 intSave; if (handler == NULL) { return OS_ERRNO_HWI_PROC_FUNC_NULL; diff --git a/kernel/arch/arm/cortex-m4/gcc/los_mpu.c b/kernel/arch/arm/cortex-m4/gcc/los_mpu.c index 884bd893..0351a259 100644 --- a/kernel/arch/arm/cortex-m4/gcc/los_mpu.c +++ b/kernel/arch/arm/cortex-m4/gcc/los_mpu.c @@ -50,7 +50,7 @@ typedef enum { VOID HalMpuEnable(UINT32 defaultRegionEnable) { - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); MPU->CTRL = (MPU_CTRL_ENABLE_Msk | ((defaultRegionEnable << MPU_CTRL_PRIVDEFENA_Pos) & MPU_CTRL_PRIVDEFENA_Msk)); SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; __DSB(); @@ -59,7 +59,7 @@ VOID HalMpuEnable(UINT32 defaultRegionEnable) } VOID HalMpuDisable(VOID) { - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); MPU->CTRL = 0; __DSB(); __ISB(); @@ -152,7 +152,7 @@ UINT32 HalMpuSetRegion(UINT32 regionId, MPU_CFG_PARA *para) UINT32 RBAR; UINT32 RNR; UINT32 encodeSize; - UINTPTR intSave; + UINT32 intSave; UINT64 size; if ((regionId >= MPU_MAX_REGION_NUM) || (para == NULL)) { @@ -192,7 +192,7 @@ UINT32 HalMpuSetRegion(UINT32 regionId, MPU_CFG_PARA *para) UINT32 HalMpuDisableRegion(UINT32 regionId) { volatile UINT32 type; - UINTPTR intSave; + UINT32 intSave; if (regionId >= MPU_MAX_REGION_NUM) { return LOS_NOK; @@ -219,7 +219,7 @@ UINT32 HalMpuDisableRegion(UINT32 regionId) INT32 HalMpuUnusedRegionGet(VOID) { INT32 id; - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); for (id = 0; id < MPU_MAX_REGION_NUM; id++) { if (!g_regionNumBeUsed[id]) { break; diff --git a/kernel/arch/arm/cortex-m4/gcc/los_timer.c b/kernel/arch/arm/cortex-m4/gcc/los_timer.c index b1044335..e201c8b4 100644 --- a/kernel/arch/arm/cortex-m4/gcc/los_timer.c +++ b/kernel/arch/arm/cortex-m4/gcc/los_timer.c @@ -86,7 +86,7 @@ WEAK VOID HalSysTickReload(UINT64 nextResponseTime) WEAK UINT64 HalGetTickCycle(UINT32 *period) { UINT32 hwCycle; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); *period = SysTick->LOAD; hwCycle = *period - SysTick->VAL; LOS_IntRestore(intSave); diff --git a/kernel/arch/arm/cortex-m4/iar/los_interrupt.c b/kernel/arch/arm/cortex-m4/iar/los_interrupt.c index c989885e..d521638f 100644 --- a/kernel/arch/arm/cortex-m4/iar/los_interrupt.c +++ b/kernel/arch/arm/cortex-m4/iar/los_interrupt.c @@ -218,7 +218,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum, HWI_PROC_FUNC handler, HWI_ARG_T arg) { - UINTPTR intSave; + UINT32 intSave; if (handler == NULL) { return OS_ERRNO_HWI_PROC_FUNC_NULL; diff --git a/kernel/arch/arm/cortex-m4/iar/los_mpu.c b/kernel/arch/arm/cortex-m4/iar/los_mpu.c index 884bd893..0351a259 100644 --- a/kernel/arch/arm/cortex-m4/iar/los_mpu.c +++ b/kernel/arch/arm/cortex-m4/iar/los_mpu.c @@ -50,7 +50,7 @@ typedef enum { VOID HalMpuEnable(UINT32 defaultRegionEnable) { - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); MPU->CTRL = (MPU_CTRL_ENABLE_Msk | ((defaultRegionEnable << MPU_CTRL_PRIVDEFENA_Pos) & MPU_CTRL_PRIVDEFENA_Msk)); SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; __DSB(); @@ -59,7 +59,7 @@ VOID HalMpuEnable(UINT32 defaultRegionEnable) } VOID HalMpuDisable(VOID) { - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); MPU->CTRL = 0; __DSB(); __ISB(); @@ -152,7 +152,7 @@ UINT32 HalMpuSetRegion(UINT32 regionId, MPU_CFG_PARA *para) UINT32 RBAR; UINT32 RNR; UINT32 encodeSize; - UINTPTR intSave; + UINT32 intSave; UINT64 size; if ((regionId >= MPU_MAX_REGION_NUM) || (para == NULL)) { @@ -192,7 +192,7 @@ UINT32 HalMpuSetRegion(UINT32 regionId, MPU_CFG_PARA *para) UINT32 HalMpuDisableRegion(UINT32 regionId) { volatile UINT32 type; - UINTPTR intSave; + UINT32 intSave; if (regionId >= MPU_MAX_REGION_NUM) { return LOS_NOK; @@ -219,7 +219,7 @@ UINT32 HalMpuDisableRegion(UINT32 regionId) INT32 HalMpuUnusedRegionGet(VOID) { INT32 id; - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); for (id = 0; id < MPU_MAX_REGION_NUM; id++) { if (!g_regionNumBeUsed[id]) { break; diff --git a/kernel/arch/arm/cortex-m4/iar/los_timer.c b/kernel/arch/arm/cortex-m4/iar/los_timer.c index b1044335..e201c8b4 100644 --- a/kernel/arch/arm/cortex-m4/iar/los_timer.c +++ b/kernel/arch/arm/cortex-m4/iar/los_timer.c @@ -86,7 +86,7 @@ WEAK VOID HalSysTickReload(UINT64 nextResponseTime) WEAK UINT64 HalGetTickCycle(UINT32 *period) { UINT32 hwCycle; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); *period = SysTick->LOAD; hwCycle = *period - SysTick->VAL; LOS_IntRestore(intSave); diff --git a/kernel/arch/arm/cortex-m7/gcc/los_interrupt.c b/kernel/arch/arm/cortex-m7/gcc/los_interrupt.c index ead8a624..a9b05d40 100644 --- a/kernel/arch/arm/cortex-m7/gcc/los_interrupt.c +++ b/kernel/arch/arm/cortex-m7/gcc/los_interrupt.c @@ -205,7 +205,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum, HWI_PROC_FUNC handler, HWI_ARG_T arg) { - UINTPTR intSave; + UINT32 intSave; if (handler == NULL) { return OS_ERRNO_HWI_PROC_FUNC_NULL; diff --git a/kernel/arch/arm/cortex-m7/gcc/los_timer.c b/kernel/arch/arm/cortex-m7/gcc/los_timer.c index bebda6f8..e4a0160e 100644 --- a/kernel/arch/arm/cortex-m7/gcc/los_timer.c +++ b/kernel/arch/arm/cortex-m7/gcc/los_timer.c @@ -85,7 +85,7 @@ WEAK VOID HalSysTickReload(UINT64 nextResponseTime) WEAK UINT64 HalGetTickCycle(UINT32 *period) { UINT32 hwCycle; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); *period = SysTick->LOAD; hwCycle = *period - SysTick->VAL; LOS_IntRestore(intSave); diff --git a/kernel/arch/arm/cortex-m7/iar/los_interrupt.c b/kernel/arch/arm/cortex-m7/iar/los_interrupt.c index 05d7b723..e861a25d 100644 --- a/kernel/arch/arm/cortex-m7/iar/los_interrupt.c +++ b/kernel/arch/arm/cortex-m7/iar/los_interrupt.c @@ -214,7 +214,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 HalHwiCreate(HWI_HANDLE_T hwiNum, HWI_PROC_FUNC handler, HWI_ARG_T arg) { - UINTPTR intSave; + UINT32 intSave; if (handler == NULL) { return OS_ERRNO_HWI_PROC_FUNC_NULL; diff --git a/kernel/arch/arm/cortex-m7/iar/los_mpu.c b/kernel/arch/arm/cortex-m7/iar/los_mpu.c index 884bd893..0351a259 100644 --- a/kernel/arch/arm/cortex-m7/iar/los_mpu.c +++ b/kernel/arch/arm/cortex-m7/iar/los_mpu.c @@ -50,7 +50,7 @@ typedef enum { VOID HalMpuEnable(UINT32 defaultRegionEnable) { - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); MPU->CTRL = (MPU_CTRL_ENABLE_Msk | ((defaultRegionEnable << MPU_CTRL_PRIVDEFENA_Pos) & MPU_CTRL_PRIVDEFENA_Msk)); SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; __DSB(); @@ -59,7 +59,7 @@ VOID HalMpuEnable(UINT32 defaultRegionEnable) } VOID HalMpuDisable(VOID) { - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); MPU->CTRL = 0; __DSB(); __ISB(); @@ -152,7 +152,7 @@ UINT32 HalMpuSetRegion(UINT32 regionId, MPU_CFG_PARA *para) UINT32 RBAR; UINT32 RNR; UINT32 encodeSize; - UINTPTR intSave; + UINT32 intSave; UINT64 size; if ((regionId >= MPU_MAX_REGION_NUM) || (para == NULL)) { @@ -192,7 +192,7 @@ UINT32 HalMpuSetRegion(UINT32 regionId, MPU_CFG_PARA *para) UINT32 HalMpuDisableRegion(UINT32 regionId) { volatile UINT32 type; - UINTPTR intSave; + UINT32 intSave; if (regionId >= MPU_MAX_REGION_NUM) { return LOS_NOK; @@ -219,7 +219,7 @@ UINT32 HalMpuDisableRegion(UINT32 regionId) INT32 HalMpuUnusedRegionGet(VOID) { INT32 id; - UINTPTR intSave = HalIntLock(); + UINT32 intSave = HalIntLock(); for (id = 0; id < MPU_MAX_REGION_NUM; id++) { if (!g_regionNumBeUsed[id]) { break; diff --git a/kernel/arch/arm/cortex-m7/iar/los_timer.c b/kernel/arch/arm/cortex-m7/iar/los_timer.c index bebda6f8..e4a0160e 100644 --- a/kernel/arch/arm/cortex-m7/iar/los_timer.c +++ b/kernel/arch/arm/cortex-m7/iar/los_timer.c @@ -85,7 +85,7 @@ WEAK VOID HalSysTickReload(UINT64 nextResponseTime) WEAK UINT64 HalGetTickCycle(UINT32 *period) { UINT32 hwCycle; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); *period = SysTick->LOAD; hwCycle = *period - SysTick->VAL; LOS_IntRestore(intSave); diff --git a/kernel/arch/include/los_context.h b/kernel/arch/include/los_context.h index 576b85ef..8038e90f 100755 --- a/kernel/arch/include/los_context.h +++ b/kernel/arch/include/los_context.h @@ -107,13 +107,13 @@ extern VOID HalTaskSchedule(VOID); typedef VOID (*OS_TICK_HANDLER)(VOID); UINT32 HalStartSchedule(OS_TICK_HANDLER handler); -UINTPTR HalIntLock(VOID); +UINT32 HalIntLock(VOID); #define LOS_IntLock HalIntLock -VOID HalIntRestore(UINTPTR intSave); +VOID HalIntRestore(UINT32 intSave); #define LOS_IntRestore HalIntRestore -UINTPTR HalIntUnLock(VOID); +UINT32 HalIntUnLock(VOID); #define LOS_IntUnLock HalIntUnLock #ifdef __cplusplus diff --git a/kernel/arch/risc-v/nuclei/gcc/los_timer.c b/kernel/arch/risc-v/nuclei/gcc/los_timer.c index 04a7c085..2b3cac7e 100644 --- a/kernel/arch/risc-v/nuclei/gcc/los_timer.c +++ b/kernel/arch/risc-v/nuclei/gcc/los_timer.c @@ -92,7 +92,7 @@ WEAK VOID HalSysTickReload(UINT64 nextResponseTime) WEAK UINT64 HalGetTickCycle(UINT32 *period) { UINT64 ticks; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); ticks = SysTimer_GetLoadValue(); *period = (UINT32)ticks; LOS_IntRestore(intSave); diff --git a/kernel/arch/risc-v/riscv32/gcc/los_arch_context.h b/kernel/arch/risc-v/riscv32/gcc/los_arch_context.h index e1bd5fc2..5610ce5c 100644 --- a/kernel/arch/risc-v/riscv32/gcc/los_arch_context.h +++ b/kernel/arch/risc-v/riscv32/gcc/los_arch_context.h @@ -131,7 +131,7 @@ STATIC INLINE UINTPTR GetFp(VOID) extern VOID HalStartToRun(VOID); -extern VOID HalTaskContextSwitch(UINTPTR intSave); +extern VOID HalTaskContextSwitch(UINT32 intSave); /** * @ingroup los_arch_context diff --git a/kernel/src/los_event.c b/kernel/src/los_event.c index 733c6b65..26cae5d5 100644 --- a/kernel/src/los_event.c +++ b/kernel/src/los_event.c @@ -50,7 +50,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_EventInit(PEVENT_CB_S eventCB) LITE_OS_SEC_TEXT UINT32 LOS_EventPoll(UINT32 *eventID, UINT32 eventMask, UINT32 mode) { UINT32 ret = 0; - UINTPTR intSave; + UINT32 intSave; if (eventID == NULL) { return LOS_ERRNO_EVENT_PTR_NULL; @@ -97,7 +97,7 @@ LITE_OS_SEC_TEXT STATIC_INLINE UINT32 OsEventReadParamCheck(PEVENT_CB_S eventCB, LITE_OS_SEC_TEXT UINT32 LOS_EventRead(PEVENT_CB_S eventCB, UINT32 eventMask, UINT32 mode, UINT32 timeOut) { UINT32 ret; - UINTPTR intSave; + UINT32 intSave; LosTaskCB *runTsk = NULL; ret = OsEventReadParamCheck(eventCB, eventMask, mode); @@ -146,7 +146,7 @@ LITE_OS_SEC_TEXT UINT32 LOS_EventWrite(PEVENT_CB_S eventCB, UINT32 events) { LosTaskCB *resumedTask = NULL; LosTaskCB *nextTask = (LosTaskCB *)NULL; - UINTPTR intSave; + UINT32 intSave; UINT8 exitFlag = 0; if (eventCB == NULL) { return LOS_ERRNO_EVENT_PTR_NULL; @@ -188,7 +188,7 @@ LITE_OS_SEC_TEXT UINT32 LOS_EventWrite(PEVENT_CB_S eventCB, UINT32 events) LITE_OS_SEC_TEXT_INIT UINT32 LOS_EventDestroy(PEVENT_CB_S eventCB) { - UINTPTR intSave; + UINT32 intSave; if (eventCB == NULL) { return LOS_ERRNO_EVENT_PTR_NULL; } @@ -206,7 +206,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_EventDestroy(PEVENT_CB_S eventCB) } LITE_OS_SEC_TEXT_MINOR UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 eventMask) { - UINTPTR intSave; + UINT32 intSave; if (eventCB == NULL) { return LOS_ERRNO_EVENT_PTR_NULL; } diff --git a/kernel/src/los_queue.c b/kernel/src/los_queue.c index 0c9244ad..e0d873a3 100644 --- a/kernel/src/los_queue.c +++ b/kernel/src/los_queue.c @@ -97,7 +97,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_QueueCreate(CHAR *queueName, UINT16 maxMsgSize) { LosQueueCB *queueCB = NULL; - UINTPTR intSave; + UINT32 intSave; LOS_DL_LIST *unusedQueue = NULL; UINT8 *queue = NULL; UINT16 msgSize; @@ -282,7 +282,7 @@ UINT32 OsQueueOperate(UINT32 queueID, UINT32 operateType, VOID *bufferAddr, UINT UINT32 readWrite = OS_QUEUE_READ_WRITE_GET(operateType); UINT32 readWriteTmp = !readWrite; - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); queueCB = (LosQueueCB *)GET_QUEUE_HANDLE(queueID); ret = OsQueueOperateParamCheck(queueCB, operateType, bufferSize); @@ -448,7 +448,7 @@ LITE_OS_SEC_TEXT UINT32 LOS_QueueWriteHead(UINT32 queueID, LITE_OS_SEC_TEXT VOID *OsQueueMailAlloc(UINT32 queueID, VOID *mailPool, UINT32 timeOut) { VOID *mem = (VOID *)NULL; - UINTPTR intSave; + UINT32 intSave; LosQueueCB *queueCB = (LosQueueCB *)NULL; LosTaskCB *runTsk = (LosTaskCB *)NULL; @@ -513,7 +513,7 @@ END: LITE_OS_SEC_TEXT UINT32 OsQueueMailFree(UINT32 queueID, VOID *mailPool, VOID *mailMem) { VOID *mem = (VOID *)NULL; - UINTPTR intSave; + UINT32 intSave; LosQueueCB *queueCB = (LosQueueCB *)NULL; LosTaskCB *resumedTask = (LosTaskCB *)NULL; @@ -566,7 +566,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_QueueDelete(UINT32 queueID) { LosQueueCB *queueCB = NULL; UINT8 *queue = NULL; - UINTPTR intSave; + UINT32 intSave; UINT32 ret; if (queueID >= LOSCFG_BASE_IPC_QUEUE_LIMIT) { @@ -619,7 +619,7 @@ QUEUE_END: LITE_OS_SEC_TEXT_MINOR UINT32 LOS_QueueInfoGet(UINT32 queueID, QUEUE_INFO_S *queueInfo) { - UINTPTR intSave; + UINT32 intSave; UINT32 ret = LOS_OK; LosQueueCB *queueCB = NULL; LosTaskCB *tskCB = NULL; diff --git a/kernel/src/los_swtmr.c b/kernel/src/los_swtmr.c index b6a6c174..1a189187 100644 --- a/kernel/src/los_swtmr.c +++ b/kernel/src/los_swtmr.c @@ -314,7 +314,7 @@ Return : Count of the Timer list *****************************************************************************/ LITE_OS_SEC_TEXT UINT32 OsSwtmrGetNextTimeout(VOID) { - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); UINT32 ticks = OsSortLinkGetNextExpireTime(g_swtmrSortLinkList); LOS_IntRestore(intSave); return ticks; @@ -423,7 +423,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_SwtmrCreate(UINT32 interval, #endif { SWTMR_CTRL_S *swtmr = NULL; - UINTPTR intSave; + UINT32 intSave; if (interval == 0) { return LOS_ERRNO_SWTMR_INTERVAL_NOT_SUITED; @@ -488,7 +488,7 @@ Return : LOS_OK on success or error code on failure *****************************************************************************/ LITE_OS_SEC_TEXT UINT32 LOS_SwtmrStart(UINT32 swtmrId) { - UINTPTR intSave; + UINT32 intSave; UINT32 ret = LOS_OK; if (swtmrId >= OS_SWTMR_MAX_TIMERID) { @@ -542,7 +542,7 @@ Return : LOS_OK on success or error code on failure LITE_OS_SEC_TEXT UINT32 LOS_SwtmrStop(UINT32 swtmrId) { SWTMR_CTRL_S *swtmr = NULL; - UINTPTR intSave; + UINT32 intSave; UINT16 swtmrCbId; UINT32 ret = LOS_OK; @@ -579,7 +579,7 @@ LITE_OS_SEC_TEXT UINT32 LOS_SwtmrStop(UINT32 swtmrId) LITE_OS_SEC_TEXT UINT32 LOS_SwtmrTimeGet(UINT32 swtmrId, UINT32 *tick) { SWTMR_CTRL_S *swtmr = NULL; - UINTPTR intSave; + UINT32 intSave; UINT32 ret = LOS_OK; UINT16 swtmrCbId; @@ -627,7 +627,7 @@ Return : LOS_OK on success or error code on failure LITE_OS_SEC_TEXT UINT32 LOS_SwtmrDelete(UINT32 swtmrId) { SWTMR_CTRL_S *swtmr = NULL; - UINTPTR intSave; + UINT32 intSave; UINT32 ret = LOS_OK; UINT16 swtmrCbId; diff --git a/kernel/src/los_task.c b/kernel/src/los_task.c index 31cc495d..897c3192 100644 --- a/kernel/src/los_task.c +++ b/kernel/src/los_task.c @@ -126,7 +126,7 @@ STATIC_INLINE UINT32 OsCheckTaskIDValid(UINT32 taskID) STATIC VOID OsRecyleFinishedTask(VOID) { LosTaskCB *taskCB = NULL; - UINTPTR intSave; + UINT32 intSave; UINTPTR stackPtr; intSave = LOS_IntLock(); @@ -424,7 +424,7 @@ LITE_OS_SEC_TEXT UINT32 LOS_CurTaskIDGet(VOID) *****************************************************************************/ LITE_OS_SEC_TEXT UINT32 LOS_NextTaskIDGet(VOID) { - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); UINT32 taskID = OsGetTopTask()->taskID; LOS_IntRestore(intSave); @@ -529,7 +529,7 @@ LITE_OS_SEC_TEXT STATIC VOID OsTaskStackProtect(VOID) #if (LOSCFG_BASE_CORE_TSK_MONITOR == 1) LITE_OS_SEC_TEXT VOID OsTaskSwitchCheck(VOID) { - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); #if (LOSCFG_EXC_HRADWARE_STACK_PROTECTION == 0) UINT32 endOfStack = g_losTask.newTask->topOfStack + g_losTask.newTask->stackSize; @@ -675,7 +675,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsNewTaskInit(LosTaskCB *taskCB, TSK_INIT_PARAM_S * *****************************************************************************/ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskCreateOnly(UINT32 *taskID, TSK_INIT_PARAM_S *taskInitParam) { - UINTPTR intSave; + UINT32 intSave; VOID *topOfStack = NULL; LosTaskCB *taskCB = NULL; UINT32 retVal; @@ -741,7 +741,7 @@ LOS_ERREND: LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskCreate(UINT32 *taskID, TSK_INIT_PARAM_S *taskInitParam) { UINT32 retVal; - UINTPTR intSave; + UINT32 intSave; LosTaskCB *taskCB = NULL; retVal = LOS_TaskCreateOnly(taskID, taskInitParam); @@ -775,7 +775,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskCreate(UINT32 *taskID, TSK_INIT_PARAM_S *ta *****************************************************************************/ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskResume(UINT32 taskID) { - UINTPTR intSave; + UINT32 intSave; LosTaskCB *taskCB = NULL; UINT16 tempStatus; UINT32 retErr = OS_ERROR; @@ -823,7 +823,7 @@ LOS_ERREND: *****************************************************************************/ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskSuspend(UINT32 taskID) { - UINTPTR intSave; + UINT32 intSave; LosTaskCB *taskCB = NULL; UINT16 tempStatus; UINT32 retErr; @@ -889,7 +889,7 @@ LITE_OS_SEC_TEXT_INIT STATIC_INLINE VOID OsRunningTaskDelete(UINT32 taskID, LosT *****************************************************************************/ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskDelete(UINT32 taskID) { - UINTPTR intSave; + UINT32 intSave; LosTaskCB *taskCB = OS_TCB_FROM_TID(taskID); UINTPTR stackPtr; @@ -951,7 +951,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskDelete(UINT32 taskID) *****************************************************************************/ LITE_OS_SEC_TEXT UINT32 LOS_TaskDelay(UINT32 tick) { - UINTPTR intSave; + UINT32 intSave; if (OS_INT_ACTIVE) { return LOS_ERRNO_TSK_DELAY_IN_INT; @@ -977,7 +977,7 @@ LITE_OS_SEC_TEXT UINT32 LOS_TaskDelay(UINT32 tick) LITE_OS_SEC_TEXT_MINOR UINT16 LOS_TaskPriGet(UINT32 taskID) { - UINTPTR intSave; + UINT32 intSave; LosTaskCB *taskCB = NULL; UINT16 priority; @@ -1002,7 +1002,7 @@ LITE_OS_SEC_TEXT_MINOR UINT16 LOS_TaskPriGet(UINT32 taskID) LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskPriSet(UINT32 taskID, UINT16 taskPrio) { BOOL isReady = FALSE; - UINTPTR intSave; + UINT32 intSave; LosTaskCB *taskCB = NULL; UINT16 tempStatus; @@ -1054,7 +1054,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_CurTaskPriSet(UINT16 taskPrio) *****************************************************************************/ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskYield(VOID) { - UINTPTR intSave; + UINT32 intSave; intSave = LOS_IntLock(); OsSchedYield(); @@ -1072,7 +1072,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskYield(VOID) *****************************************************************************/ LITE_OS_SEC_TEXT_MINOR VOID LOS_TaskLock(VOID) { - UINTPTR intSave; + UINT32 intSave; intSave = LOS_IntLock(); g_losTaskLock++; @@ -1088,7 +1088,7 @@ LITE_OS_SEC_TEXT_MINOR VOID LOS_TaskLock(VOID) *****************************************************************************/ LITE_OS_SEC_TEXT_MINOR VOID LOS_TaskUnlock(VOID) { - UINTPTR intSave; + UINT32 intSave; intSave = LOS_IntLock(); if (g_losTaskLock > 0) { @@ -1183,7 +1183,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskStatusGet(UINT32 taskID, UINT32 *taskStatu #if (LOSCFG_BASE_CORE_EXC_TSK_SWITCH == 1) LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskSwitchInfoGet(UINT32 index, UINT32 *taskSwitchInfo) { - UINTPTR intSave; + UINT32 intSave; UINT32 curIndex; curIndex = index; diff --git a/testsuits/sample/kernel/hwi/it_los_hwi_007.c b/testsuits/sample/kernel/hwi/it_los_hwi_007.c index 2b882ae7..e4c8cc5a 100644 --- a/testsuits/sample/kernel/hwi/it_los_hwi_007.c +++ b/testsuits/sample/kernel/hwi/it_los_hwi_007.c @@ -45,19 +45,19 @@ static UINT32 Testcase(VOID) HWI_PRIOR_T hwiPrio = 3; HWI_MODE_T mode = 0; HWI_ARG_T arg = 0; - UINTPTR uvIntSave; + UINT32 intSave; g_testCount = 0; ret = LOS_HwiCreate(HWI_NUM_TEST, hwiPrio, mode, (HWI_PROC_FUNC)HwiF01, arg); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); - uvIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); TestHwiTrigger(HWI_NUM_TEST); ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT); - LOS_IntRestore(uvIntSave); + LOS_IntRestore(intSave); LOS_TaskDelay(5); // 5, set delay time. ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT); diff --git a/testsuits/sample/kernel/hwi/it_los_hwi_010.c b/testsuits/sample/kernel/hwi/it_los_hwi_010.c index ed281bfb..f5cf6309 100644 --- a/testsuits/sample/kernel/hwi/it_los_hwi_010.c +++ b/testsuits/sample/kernel/hwi/it_los_hwi_010.c @@ -45,25 +45,25 @@ static UINT32 Testcase(VOID) HWI_PRIOR_T hwiPrio = 1; HWI_MODE_T mode = 0; HWI_ARG_T arg = 0; - UINTPTR uvIntSave1; - UINTPTR uvIntSave2; + UINT32 intSave1; + UINT32 intSave2; g_testCount = 0; ret = LOS_HwiCreate(HWI_NUM_TEST, hwiPrio, mode, (HWI_PROC_FUNC)HwiF01, arg); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); - uvIntSave1 = LOS_IntLock(); - uvIntSave2 = LOS_IntLock(); + intSave1 = LOS_IntLock(); + intSave2 = LOS_IntLock(); TestHwiTrigger(HWI_NUM_TEST); ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT); - LOS_IntRestore(uvIntSave2); + LOS_IntRestore(intSave2); ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT); - LOS_IntRestore(uvIntSave1); + LOS_IntRestore(intSave1); ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT); diff --git a/testsuits/sample/kernel/hwi/it_los_hwi_013.c b/testsuits/sample/kernel/hwi/it_los_hwi_013.c index f0e9d406..5cebafc7 100644 --- a/testsuits/sample/kernel/hwi/it_los_hwi_013.c +++ b/testsuits/sample/kernel/hwi/it_los_hwi_013.c @@ -67,7 +67,7 @@ static UINT32 Testcase(VOID) #endif HWI_MODE_T mode = 0; HWI_ARG_T arg = 0; - UINTPTR uvIntSave; + UINT32 intSave; g_testCount = 0; @@ -86,13 +86,13 @@ static UINT32 Testcase(VOID) ret = LOS_HwiCreate(HWI_NUM_TEST3, hwiPrio, mode, (HWI_PROC_FUNC)HwiF03, arg); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT2); - uvIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); TestHwiTrigger(HWI_NUM_TEST3); TestHwiTrigger(HWI_NUM_TEST2); TestHwiTrigger(HWI_NUM_TEST1); - LOS_IntRestore(uvIntSave); + LOS_IntRestore(intSave); ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT3); // Compare wiht the expected value 3. diff --git a/testsuits/sample/kernel/hwi/it_los_hwi_014.c b/testsuits/sample/kernel/hwi/it_los_hwi_014.c index a0d8cbbf..81015320 100644 --- a/testsuits/sample/kernel/hwi/it_los_hwi_014.c +++ b/testsuits/sample/kernel/hwi/it_los_hwi_014.c @@ -63,7 +63,7 @@ static UINT32 Testcase(VOID) HWI_PRIOR_T hwiPrio = 1; HWI_MODE_T mode = 0; HWI_ARG_T arg = 0; - UINTPTR uvIntSave; + UINT32 intSave; g_testCount = 0; @@ -76,13 +76,13 @@ static UINT32 Testcase(VOID) ret = LOS_HwiCreate(HWI_NUM_TEST1, hwiPrio, mode, (HWI_PROC_FUNC)HwiF03, arg); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT2); - uvIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); TestHwiTrigger(HWI_NUM_TEST1); TestHwiTrigger(HWI_NUM_TEST3); TestHwiTrigger(HWI_NUM_TEST); - LOS_IntRestore(uvIntSave); + LOS_IntRestore(intSave); ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT3); // Compare wiht the expected value 3. diff --git a/testsuits/sample/kernel/hwi/it_los_hwi_028.c b/testsuits/sample/kernel/hwi/it_los_hwi_028.c index 2640923a..80652e4b 100644 --- a/testsuits/sample/kernel/hwi/it_los_hwi_028.c +++ b/testsuits/sample/kernel/hwi/it_los_hwi_028.c @@ -58,9 +58,9 @@ static UINT32 Testcase(VOID) HWI_PRIOR_T hwiPrio = 7; HWI_MODE_T mode = 0; HWI_ARG_T arg = 0; - UINTPTR uvIntSave1; - UINTPTR uvIntSave2; - UINTPTR uvIntSave3; + UINT32 intSave1; + UINT32 intSave2; + UINT32 intSave3; for (loop = 0; loop < HWI_LOOP_NUM; loop++) { g_testCount = 0; @@ -73,22 +73,22 @@ static UINT32 Testcase(VOID) ret = LOS_HwiCreate(HWI_NUM_TEST1, hwiPrio, mode, (HWI_PROC_FUNC)HwiF03, arg); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT2); - uvIntSave1 = LOS_IntLock(); - uvIntSave2 = LOS_IntLock(); - uvIntSave3 = LOS_IntLock(); + intSave1 = LOS_IntLock(); + intSave2 = LOS_IntLock(); + intSave3 = LOS_IntLock(); - LOS_IntRestore(uvIntSave3); + LOS_IntRestore(intSave3); ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT3); - uvIntSave3 = LOS_IntLock(); + intSave3 = LOS_IntLock(); - LOS_IntRestore(uvIntSave3); + LOS_IntRestore(intSave3); ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT3); - LOS_IntRestore(uvIntSave2); + LOS_IntRestore(intSave2); ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT3); - LOS_IntRestore(uvIntSave1); + LOS_IntRestore(intSave1); ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT3); TestHwiTrigger(HWI_NUM_TEST); diff --git a/testsuits/sample/kernel/hwi/it_los_hwi_030.c b/testsuits/sample/kernel/hwi/it_los_hwi_030.c index 0a145f04..8322636f 100644 --- a/testsuits/sample/kernel/hwi/it_los_hwi_030.c +++ b/testsuits/sample/kernel/hwi/it_los_hwi_030.c @@ -49,14 +49,14 @@ static UINT32 Testcase(VOID) HWI_PRIOR_T hwiPrio = 2; HWI_MODE_T mode = 0; HWI_ARG_T arg = 0; - UINTPTR uvIntSave; + UINT32 intSave; for (loop = 0; loop < HWI_LOOP_NUM; loop++) { g_testCount = 0; ret = LOS_HwiCreate(HWI_NUM_TEST, hwiPrio, mode, (HWI_PROC_FUNC)HwiF01, arg); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); - uvIntSave = LOS_IntLock(); + intSave = LOS_IntLock(); TestHwiTrigger(HWI_NUM_TEST); TestHwiTrigger(HWI_NUM_TEST); @@ -66,7 +66,7 @@ static UINT32 Testcase(VOID) ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT); - LOS_IntRestore(uvIntSave); + LOS_IntRestore(intSave); ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT); TestHwiDelete(HWI_NUM_TEST); diff --git a/testsuits/sample/kernel/task/It_los_task_087.c b/testsuits/sample/kernel/task/It_los_task_087.c index ad1a5e7f..aa3382d8 100644 --- a/testsuits/sample/kernel/task/It_los_task_087.c +++ b/testsuits/sample/kernel/task/It_los_task_087.c @@ -44,7 +44,7 @@ static UINT32 OsShellCmdTaskCntGet(VOID) { UINT32 loop; UINT32 taskCnt = 0; - UINTPTR intSave; + UINT32 intSave; LosTaskCB *taskCB = (LosTaskCB *)NULL; intSave = LOS_IntLock(); diff --git a/testsuits/src/osTest.c b/testsuits/src/osTest.c index dc2aa496..1aa3c9ee 100644 --- a/testsuits/src/osTest.c +++ b/testsuits/src/osTest.c @@ -88,7 +88,7 @@ UINT32 SwtmrCountGetTest(VOID) { UINT32 loop; UINT32 swTmrCnt = 0; - UINTPTR intSave; + UINT32 intSave; SWTMR_CTRL_S *swTmrCB = (SWTMR_CTRL_S *)NULL; intSave = LOS_IntLock(); diff --git a/utils/los_debug.c b/utils/los_debug.c index ec4e9611..fbd78865 100644 --- a/utils/los_debug.c +++ b/utils/los_debug.c @@ -67,7 +67,7 @@ VOID OsBackTraceHookCall(UINTPTR *LR, UINT32 LRSize, UINT32 jumpCount, UINTPTR S VOID OsExcHookRegister(ExcHookFn excHookFn) { - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); if (!g_excHook) { g_excHook = excHookFn; } @@ -76,7 +76,7 @@ VOID OsExcHookRegister(ExcHookFn excHookFn) VOID OsDoExcHook(EXC_TYPE excType) { - UINTPTR intSave = LOS_IntLock(); + UINT32 intSave = LOS_IntLock(); if (g_excHook) { g_excHook(excType); }