fix: 修正部分编码风格问题

Close #I4K8M7

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: If34d5c632cbb06f639434d8c35fb226a0253f4a7
Signed-off-by: zhushengle <zhushengle@huawei.com>
This commit is contained in:
zhushengle 2021-11-29 11:45:44 +08:00
parent 2ad9dc0eac
commit 91903a3716
4 changed files with 15 additions and 12 deletions

View File

@ -164,7 +164,7 @@ typedef struct {
* All modes except normal mode are invoked. * All modes except normal mode are invoked.
* Unlocked task scheduling. * Unlocked task scheduling.
*/ */
VOID (*late)(UINT32 mode); VOID (*late)(UINT32 mode);
/* The system enters the Normal sleep mode. /* The system enters the Normal sleep mode.
* In normal mode, the value cannot be NULL. * In normal mode, the value cannot be NULL.
*/ */
@ -172,7 +172,7 @@ typedef struct {
/* The system recovers from normal sleep. /* The system recovers from normal sleep.
* The value can be NULL. * The value can be NULL.
*/ */
VOID (*normalResume)(VOID); VOID (*normalResume)(VOID);
/* The system enters the light sleep mode. /* The system enters the light sleep mode.
* In light sleep mode, the value cannot be NULL. * In light sleep mode, the value cannot be NULL.
*/ */
@ -180,7 +180,7 @@ typedef struct {
/* The system recovers from light sleep. /* The system recovers from light sleep.
* The value can be NULL. * The value can be NULL.
*/ */
VOID (*lightResume)(VOID); VOID (*lightResume)(VOID);
/* The system enters the deep sleep mode. /* The system enters the deep sleep mode.
* In deep sleep mode, the value cannot be NULL. * In deep sleep mode, the value cannot be NULL.
*/ */
@ -188,7 +188,7 @@ typedef struct {
/* The system recovers from deep sleep. /* The system recovers from deep sleep.
* The value can be NULL. * The value can be NULL.
*/ */
VOID (*deepResume)(VOID); VOID (*deepResume)(VOID);
/* The system enters the shutdown mode. /* The system enters the shutdown mode.
* In shutdown mode, the value cannot be NULL. * In shutdown mode, the value cannot be NULL.
*/ */
@ -196,7 +196,7 @@ typedef struct {
/* The system recovers from shutdown. /* The system recovers from shutdown.
* In shutdown mode, the value cannot be NULL. * In shutdown mode, the value cannot be NULL.
*/ */
VOID (*shutdownResume)(VOID); VOID (*shutdownResume)(VOID);
} LosPmSysctrl; } LosPmSysctrl;
/** /**
@ -236,7 +236,10 @@ UINT32 OsPmInit(VOID);
#if (LOSCFG_KERNEL_PM == 1) #if (LOSCFG_KERNEL_PM == 1)
BOOL OsIsPmMode(VOID); BOOL OsIsPmMode(VOID);
#else #else
#define OsIsPmMode() (0) STATIC INLINE BOOL OsIsPmMode(VOID)
{
return FALSE;
}
#endif #endif
/** /**
@ -399,7 +402,7 @@ UINT32 LOS_PmLockRelease(const CHAR *name);
* *
* @attention None. * @attention None.
* *
* @param NA. * @param None.
* *
* @retval Number of awakening sources of the device. * @retval Number of awakening sources of the device.
* @par Dependency: * @par Dependency:

View File

@ -1299,7 +1299,7 @@ extern UINT32 LOS_TaskDetach(UINT32 taskID);
* *
* The delayed operation of this task is frozen. * The delayed operation of this task is frozen.
*/ */
#define OS_TASK_FALG_FREEZE 0x4000 #define OS_TASK_FLAG_FREEZE 0x4000
/** /**
* @ingroup los_task * @ingroup los_task

View File

@ -128,7 +128,7 @@ extern UINT64 LOS_SysCycleGet(VOID);
((cycle) % OS_SYS_CLOCK) * OS_SYS_NS_PER_SECOND / (freq)) ((cycle) % OS_SYS_CLOCK) * OS_SYS_NS_PER_SECOND / (freq))
#define OS_SYS_NS_TO_CYCLE(time, freq) (((time) / OS_SYS_NS_PER_SECOND) * (freq) + \ #define OS_SYS_NS_TO_CYCLE(time, freq) (((time) / OS_SYS_NS_PER_SECOND) * (freq) + \
(time % OS_SYS_NS_PER_SECOND) * (freq) / OS_SYS_NS_PER_SECOND) ((time) % OS_SYS_NS_PER_SECOND) * (freq) / OS_SYS_NS_PER_SECOND)
/** /**
* @ingroup los_tick * @ingroup los_tick

View File

@ -415,7 +415,7 @@ STATIC VOID OsSchedFreezeTask(LosTaskCB *taskCB)
UINT64 responseTime = GET_SORTLIST_VALUE(&taskCB->sortList); UINT64 responseTime = GET_SORTLIST_VALUE(&taskCB->sortList);
OsDeleteSortLink(&taskCB->sortList, OS_SORT_LINK_TASK); OsDeleteSortLink(&taskCB->sortList, OS_SORT_LINK_TASK);
SET_SORTLIST_VALUE(&taskCB->sortList, responseTime); SET_SORTLIST_VALUE(&taskCB->sortList, responseTime);
taskCB->taskStatus |= OS_TASK_FALG_FREEZE; taskCB->taskStatus |= OS_TASK_FLAG_FREEZE;
return; return;
} }
@ -424,7 +424,7 @@ STATIC VOID OsSchedUnfreezeTask(LosTaskCB *taskCB)
UINT64 currTime, responseTime; UINT64 currTime, responseTime;
UINT32 remainTick; UINT32 remainTick;
taskCB->taskStatus &= ~OS_TASK_FALG_FREEZE; taskCB->taskStatus &= ~OS_TASK_FLAG_FREEZE;
currTime = OsGetCurrSchedTimeCycle(); currTime = OsGetCurrSchedTimeCycle();
responseTime = GET_SORTLIST_VALUE(&taskCB->sortList); responseTime = GET_SORTLIST_VALUE(&taskCB->sortList);
if (responseTime > currTime) { if (responseTime > currTime) {
@ -457,7 +457,7 @@ VOID OsSchedSuspend(LosTaskCB *taskCB)
BOOL OsSchedResume(LosTaskCB *taskCB) BOOL OsSchedResume(LosTaskCB *taskCB)
{ {
if (taskCB->taskStatus & OS_TASK_FALG_FREEZE) { if (taskCB->taskStatus & OS_TASK_FLAG_FREEZE) {
OsSchedUnfreezeTask(taskCB); OsSchedUnfreezeTask(taskCB);
} }