fix: 编码规范修改

1.拼写错误
2.未使用的参数使用void
3.删除lint相关注释
4.函数返回值处理

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I155d786172d62f47d940b32b0a1b36406d3c047f
This commit is contained in:
zhushengle
2022-03-21 11:58:38 +08:00
parent ba727e2678
commit d161a0b03d
98 changed files with 443 additions and 289 deletions

View File

@@ -176,7 +176,7 @@ STATIC ProcessGroup *OsFindProcessGroup(UINT32 gid)
}
}
PRINT_INFO("%s is find group : %u failed!\n", __FUNCTION__, gid);
PRINT_INFO("%s failed! group id = %u\n", __FUNCTION__, gid);
return NULL;
}
@@ -2002,6 +2002,8 @@ LITE_OS_SEC_TEXT VOID LOS_Exit(INT32 status)
{
UINT32 intSave;
(void)status;
/* The exit of a kernel - state process must be kernel - state and all threads must actively exit */
LosProcessCB *processCB = OsCurrProcessGet();
SCHEDULER_LOCK(intSave);

View File

@@ -278,7 +278,7 @@ LITE_OS_SEC_TEXT UINT32 OsSwtmrGetNextTimeout(VOID)
/*
* Description: Stop of Software Timer interface
* Input : swtmr --- the software timer contrl handler
* Input : swtmr --- the software timer control handler
*/
LITE_OS_SEC_TEXT STATIC VOID OsSwtmrStop(SWTMR_CTRL_S *swtmr)
{
@@ -292,7 +292,7 @@ LITE_OS_SEC_TEXT STATIC VOID OsSwtmrStop(SWTMR_CTRL_S *swtmr)
/*
* Description: Get next software timer expiretime
* Input : swtmr --- the software timer contrl handler
* Input : swtmr --- the software timer control handler
*/
LITE_OS_SEC_TEXT STATIC UINT32 OsSwtmrTimeGet(const SWTMR_CTRL_S *swtmr)
{

View File

@@ -277,7 +277,7 @@ STATIC INLINE UINT32 OsTaskSyncWait(const LosTaskCB *taskCB)
/*
* gc soft timer works every OS_MP_GC_PERIOD period, to prevent this timer
* triggered right at the timeout has reached, we set the timeout as double
* of the gc peroid.
* of the gc period.
*/
if (LOS_SemPend(taskCB->syncSignal, OS_MP_GC_PERIOD * 2) != LOS_OK) {
ret = LOS_ERRNO_TSK_MP_SYNC_FAILED;

View File

@@ -138,28 +138,28 @@ STATIC INLINE BOOL OsSchedIsLock(VOID)
return (OsSchedRunQue()->taskLockCnt != 0);
}
/* Check if preemptable with counter flag */
/* Check if preemptible with counter flag */
STATIC INLINE BOOL OsPreemptable(VOID)
{
SchedRunQue *rq = OsSchedRunQue();
/*
* Unlike OsPreemptableInSched, the int may be not disabled when OsPreemptable
* is called, needs mannually disable interrupt, to prevent current task from
* being migrated to another core, and get the wrong preeptable status.
* is called, needs manually disable interrupt, to prevent current task from
* being migrated to another core, and get the wrong preemptable status.
*/
UINT32 intSave = LOS_IntLock();
BOOL preemptable = (rq->taskLockCnt == 0);
if (!preemptable) {
BOOL preemptible = (rq->taskLockCnt == 0);
if (!preemptible) {
/* Set schedule flag if preemption is disabled */
rq->schedFlag |= INT_PEND_RESCH;
}
LOS_IntRestore(intSave);
return preemptable;
return preemptible;
}
STATIC INLINE BOOL OsPreemptableInSched(VOID)
{
BOOL preemptable = FALSE;
BOOL preemptible = FALSE;
SchedRunQue *rq = OsSchedRunQue();
#ifdef LOSCFG_KERNEL_SMP
@@ -167,17 +167,17 @@ STATIC INLINE BOOL OsPreemptableInSched(VOID)
* For smp systems, schedule must hold the task spinlock, and this counter
* will increase by 1 in that case.
*/
preemptable = (rq->taskLockCnt == 1);
preemptible = (rq->taskLockCnt == 1);
#else
preemptable = (rq->taskLockCnt == 0);
preemptible = (rq->taskLockCnt == 0);
#endif
if (!preemptable) {
if (!preemptible) {
/* Set schedule flag if preemption is disabled */
rq->schedFlag |= INT_PEND_RESCH;
}
return preemptable;
return preemptible;
}
STATIC INLINE UINT32 OsSchedGetRunQueIdle(VOID)

View File

@@ -48,7 +48,7 @@ typedef struct {
} StackInfo;
#define OS_INVALID_WATERLINE 0xFFFFFFFF
#define OS_STACK_MAGIC_CHECK(topstack) (*(UINTPTR *)(topstack) == OS_STACK_MAGIC_WORD) /* 1:magic valid 0:unvalid */
#define OS_STACK_MAGIC_CHECK(topstack) (*(UINTPTR *)(topstack) == OS_STACK_MAGIC_WORD) /* 1:magic valid 0:invalid */
extern VOID OsExcStackInfo(VOID);
extern VOID OsExcStackInfoReg(const StackInfo *stackInfo, UINT32 stackNum);
@@ -81,4 +81,4 @@ extern UINT32 OsStackWaterLineGet(const UINTPTR *stackBottom, const UINTPTR *sta
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* _LOS_STACK_INFO_PRI_H */
#endif /* _LOS_STACK_INFO_PRI_H */

View File

@@ -43,9 +43,9 @@ extern "C" {
/**
* @ingroup los_task
* Define task siginal types.
* Define task signal types.
*
* Task siginal types.
* Task signal types.
*/
#define SIGNAL_NONE 0U
#define SIGNAL_KILL (1U << 0)

View File

@@ -82,7 +82,7 @@ VOID OsQueueDbgUpdate(UINT32 queueID, TSK_ENTRY_FUNC entry)
STATIC INLINE VOID OsQueueInfoOutPut(const LosQueueCB *node)
{
PRINTK("Queue ID <0x%x> may leak, queue len is 0x%x, "
"readable cnt:0x%x, writeable cnt:0x%x, ",
"readable cnt:0x%x, writable cnt:0x%x, ",
node->queueID,
node->queueLen,
node->readWriteableCnt[OS_QUEUE_READ],

View File

@@ -93,7 +93,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_MemboxInit(VOID *pool, UINT32 poolSize, UINT32
}
MEMBOX_LOCK(intSave);
boxInfo->uwBlkSize = LOS_MEMBOX_ALLIGNED(blkSize + OS_MEMBOX_NODE_HEAD_SIZE);
boxInfo->uwBlkSize = LOS_MEMBOX_ALIGNED(blkSize + OS_MEMBOX_NODE_HEAD_SIZE);
boxInfo->uwBlkNum = (poolSize - sizeof(LOS_MEMBOX_INFO)) / boxInfo->uwBlkSize;
boxInfo->uwBlkCnt = 0;
if (boxInfo->uwBlkNum == 0) {

View File

@@ -169,7 +169,7 @@ struct OsMemPoolHead {
/* The memory pool support expand. */
#define OS_MEM_POOL_EXPAND_ENABLE 0x01
/* The memory pool ssupport no lock. */
/* The memory pool support no lock. */
#define OS_MEM_POOL_LOCK_ENABLE 0x02
#define OS_MEM_NODE_MAGIC 0xABCDDCBA
@@ -486,7 +486,7 @@ STATIC INLINE VOID OsLmsAllocAlignMark(VOID *ptr, VOID *alignedPtr, UINT32 size)
g_lms->simpleMark((UINTPTR)ptr + sizeof(UINT32), (UINTPTR)alignedPtr, LMS_SHADOW_REDZONE_U8);
}
/* mark remining as redzone */
/* mark remaining as redzone */
g_lms->simpleMark(LMS_ADDR_ALIGN((UINTPTR)alignedPtr + size), (UINTPTR)OS_MEM_NEXT_NODE(allocNode),
LMS_SHADOW_REDZONE_U8);
}
@@ -1804,7 +1804,7 @@ STATIC VOID OsMemIntegrityCheckError(struct OsMemPoolHead *pool,
tmpNode, preNode, taskCB->taskName);
#else
MEM_UNLOCK(pool, intSave);
LOS_Panic("Memory interity check error, cur node: %#x, pre node: %#x\n", tmpNode, preNode);
LOS_Panic("Memory integrity check error, cur node: %#x, pre node: %#x\n", tmpNode, preNode);
#endif
}

View File

@@ -193,7 +193,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdUname(INT32 argc, const CHAR *argv[])
if (argc == 1) {
if (strcmp(argv[0], "-a") == 0) {
PRINTK("%s %d.%d.%d.%d %s %s\n", KERNEL_NAME, KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE,\
PRINTK("%s %d.%d.%d.%d %s %s\n", KERNEL_NAME, KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE, \
__DATE__, __TIME__);
return 0;
} else if (strcmp(argv[0], "-s") == 0) {

View File

@@ -87,7 +87,7 @@ STATIC INLINE CHAR *OsLockDepErrorStringGet(enum LockDepErrType type)
errorString = "lockdep overflow";
break;
default:
errorString = "unknow error code";
errorString = "unknown error code";
break;
}
@@ -142,7 +142,7 @@ STATIC VOID OsLockDepDumpLock(const LosTaskCB *task, const SPIN_LOCK_S *lock,
OsPrintLockDepInfo("task name : %s\n", temp->taskName);
OsPrintLockDepInfo("task id : %u\n", temp->taskID);
OsPrintLockDepInfo("cpu num : %u\n", temp->currCpu);
OsPrintLockDepInfo("start dumping lockdep infomation\n");
OsPrintLockDepInfo("start dumping lockdep information\n");
for (i = 0; i < lockDep->lockDepth; i++) {
if (lockDep->heldLocks[i].lockPtr == lock) {
OsPrintLockDepInfo("[%d] %s <-- addr:0x%x\n", i, LOCKDEP_GET_NAME(lockDep, i),
@@ -165,7 +165,7 @@ STATIC VOID OsLockDepDumpLock(const LosTaskCB *task, const SPIN_LOCK_S *lock,
}
}
STATIC BOOL OsLockDepCheckDependancy(const LosTaskCB *current, LosTaskCB *lockOwner)
STATIC BOOL OsLockDepCheckDependency(const LosTaskCB *current, LosTaskCB *lockOwner)
{
BOOL checkResult = TRUE;
SPIN_LOCK_S *lockTemp = NULL;
@@ -217,7 +217,7 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock)
goto OUT;
}
if (OsLockDepCheckDependancy(current, lockOwner) != TRUE) {
if (OsLockDepCheckDependency(current, lockOwner) != TRUE) {
checkResult = LOCKDEP_ERR_DEAD_LOCK;
goto OUT;
}
@@ -313,7 +313,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock)
/* record lock holding time */
heldlocks[depth].holdTime = OsLockDepGetCycles() - heldlocks[depth].holdTime;
/* if unlock a older lock, needs move heldLock records */
/* if unlock an older lock, needs move heldLock records */
while (depth < lockDep->lockDepth - 1) {
lockDep->heldLocks[depth] = lockDep->heldLocks[depth + 1];
depth++;

View File

@@ -322,16 +322,16 @@ CHAR *OsArchFlagsToStr(const UINT32 archFlags)
(VOID)memset_s(archMmuFlagsStr, flagSize, 0, flagSize);
switch (cacheFlags) {
case 0UL:
strcat_s(archMmuFlagsStr, flagSize, " CH\0");
(VOID)strcat_s(archMmuFlagsStr, flagSize, " CH\0");
break;
case 1UL:
strcat_s(archMmuFlagsStr, flagSize, " UC\0");
(VOID)strcat_s(archMmuFlagsStr, flagSize, " UC\0");
break;
case 2UL:
strcat_s(archMmuFlagsStr, flagSize, " UD\0");
(VOID)strcat_s(archMmuFlagsStr, flagSize, " UD\0");
break;
case 3UL:
strcat_s(archMmuFlagsStr, flagSize, " WC\0");
(VOID)strcat_s(archMmuFlagsStr, flagSize, " WC\0");
break;
default:
break;

View File

@@ -462,7 +462,7 @@ LosVmMapRegion *OsCreateRegion(VADDR_T vaddr, size_t len, UINT32 regionFlags, un
return region;
}
memset_s(region, sizeof(LosVmMapRegion), 0, sizeof(LosVmMapRegion));
(void)memset_s(region, sizeof(LosVmMapRegion), 0, sizeof(LosVmMapRegion));
region->range.base = vaddr;
region->range.size = len;
region->pgOff = offset;

View File

@@ -387,7 +387,7 @@ STATUS_T OsMremapCheck(VADDR_T addr, size_t oldLen, VADDR_T newAddr, size_t newL
}
}
/* avoid new region overlaping with the old one */
/* avoid new region overlapping with the old one */
if (flags & MREMAP_FIXED) {
if (((region->range.base + region->range.size) > newAddr) &&
(region->range.base < (newAddr + newLen))) {

View File

@@ -88,7 +88,7 @@ INT32 GetFilepOps(const struct file *filep, struct file **privFilep, const struc
goto ERROUT;
}
/* to find console device's filep(now it is *privFilep) throught i_private */
/* to find console device's filep(now it is *privFilep) through i_private */
struct drv_data *drv = (struct drv_data *)filep->f_vnode->data;
*privFilep = (struct file *)drv->priv;
if (((*privFilep)->f_vnode == NULL) || ((*privFilep)->f_vnode->data == NULL)) {
@@ -1073,7 +1073,7 @@ STATIC INT32 OsConsoleDevInit(CONSOLE_CB *consoleCB, const CHAR *deviceName)
filep->f_path = NULL;
filep->f_priv = NULL;
/*
* Use filep to connect console and uart, we can find uart driver function throught filep.
* Use filep to connect console and uart, we can find uart driver function through filep.
* now we can operate /dev/console to operate /dev/ttyS0 through filep.
*/
devOps = (struct file_operations_vfs *)((struct drv_data*)vnode->data)->ops;
@@ -1325,7 +1325,9 @@ INT32 system_console_init(const CHAR *deviceName)
LOS_SpinLockSave(&g_consoleSpin, &intSave);
(VOID)OsConsoleDelete(consoleCB);
g_console[consoleID - 1] = NULL;
g_taskConsoleIDArray[OsCurrTaskGet()->taskID] = 0;
if (OsCurrTaskGet() != NULL) {
g_taskConsoleIDArray[OsCurrTaskGet()->taskID] = 0;
}
LOS_SpinUnlockRestore(&g_consoleSpin, intSave);
return VFS_ERROR;
}

View File

@@ -182,11 +182,11 @@ LITE_OS_SEC_TEXT_INIT VOID OsSystemInfo(VOID)
#ifdef LOSCFG_KERNEL_SMP
LOSCFG_KERNEL_SMP_CORE_NUM,
#endif
HalIrqVersion(), __DATE__, __TIME__,\
HalIrqVersion(), __DATE__, __TIME__, \
KERNEL_NAME, KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE, buildType);
}
LITE_OS_SEC_TEXT_INIT INT32 OsMain(VOID)
LITE_OS_SEC_TEXT_INIT UINT32 OsMain(VOID)
{
UINT32 ret;
#ifdef LOS_INIT_STATISTICS

View File

@@ -453,7 +453,7 @@ typedef VOID (*log_read_write_fn)(UINT32 startAddr, UINT32 space, UINT32 rwFlag,
VOID LOS_ExcInfoRegHook(UINT32 startAddr, UINT32 space, CHAR *buf, log_read_write_fn hook);
#endif
extern INT32 OsMain(VOID);
extern UINT32 OsMain(VOID);
typedef VOID (*SystemRebootFunc)(VOID);
VOID OsSetRebootHook(SystemRebootFunc func);

View File

@@ -162,7 +162,7 @@ struct ModuleInitInfo {
*/
#define OS_INIT_LEVEL_REG(_type, _num, _list) \
INIT_LABEL_REG_##_num(EXTERN_LABEL, _type) \
STATIC struct ModuleInitInfo* _list [] = { \
STATIC struct ModuleInitInfo *_list[] = { \
INIT_LABEL_REG_##_num(GET_LABEL, _type) \
}

View File

@@ -198,7 +198,7 @@ __attribute__((noinline)) VOID UartPrintf(const CHAR *fmt, ...)
va_end(ap);
}
__attribute__ ((noinline)) VOID dprintf(const CHAR *fmt, ...)
__attribute__((noinline)) VOID dprintf(const CHAR *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
@@ -229,7 +229,7 @@ VOID DmesgPrintf(const CHAR *fmt, va_list ap)
#endif
#ifdef LOSCFG_PLATFORM_UART_WITHOUT_VFS
__attribute__ ((noinline)) INT32 printf(const CHAR *fmt, ...)
__attribute__((noinline)) INT32 printf(const CHAR *fmt, ...)
{
va_list ap;
va_start(ap, fmt);

View File

@@ -34,11 +34,9 @@
LITE_OS_SEC_TEXT_INIT INT32 main(VOID)
{
UINT32 uwRet;
uwRet = OsMain();
if (uwRet != LOS_OK) {
return LOS_NOK;
UINT32 ret = OsMain();
if (ret != LOS_OK) {
return (INT32)LOS_NOK;
}
CPU_MAP_SET(0, OsHwIDGet());

View File

@@ -284,8 +284,8 @@ LITE_OS_SEC_TEXT_MINOR STATIC VOID OsCpupGetPos(UINT16 mode, UINT16 *curPosPoint
curPos = CPUP_PRE_POS(tmpPos);
/*
* The current postion has nothing to do with the CPUP modes,
* however, the previous postion differs.
* The current position has nothing to do with the CPUP modes,
* however, the previous position differs.
*/
switch (mode) {
case CPUP_LAST_ONE_SECONDS:

View File

@@ -45,7 +45,6 @@
#ifdef LOSCFG_DRIVERS_TZDRIVER
#include "fs/file.h"
#endif
#include "fs/file.h"
#include "unistd.h"
#ifdef __cplusplus

View File

@@ -103,7 +103,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsLiteIpcInit(VOID)
#if (USE_TASKID_AS_HANDLE == 1)
g_cmsTask.status = HANDLE_NOT_USED;
#else
memset_s(g_serviceHandleMap, sizeof(g_serviceHandleMap), 0, sizeof(g_serviceHandleMap));
(void)memset_s(g_serviceHandleMap, sizeof(g_serviceHandleMap), 0, sizeof(g_serviceHandleMap));
#endif
ret = LOS_MuxInit(&g_serviceHandleMapMux, NULL);
if (ret != LOS_OK) {
@@ -565,7 +565,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 SendDeathMsg(UINT32 processID, UINT32 serviceHand
}
content.flag = SEND;
content.outMsg = &msg;
memset_s(content.outMsg, sizeof(IpcMsg), 0, sizeof(IpcMsg));
(void)memset_s(content.outMsg, sizeof(IpcMsg), 0, sizeof(IpcMsg));
content.outMsg->type = MT_DEATH_NOTIFY;
content.outMsg->target.handle = ipcTaskID;
content.outMsg->target.token = serviceHandle;
@@ -1161,7 +1161,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcRead(IpcContent *content)
if (ret == LOS_OK) {
break;
}
if (ret == -ENOENT) { /* It means that we've recieved a failed reply */
if (ret == -ENOENT) { /* It means that we've received a failed reply */
return ret;
}
}
@@ -1208,7 +1208,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcMsgHandle(IpcContent *con)
}
content->outMsg = msg;
if ((content->outMsg->type < 0) || (content->outMsg->type >= MT_DEATH_NOTIFY)) {
PRINT_ERR("LiteIpc unknow msg type:%d\n", content->outMsg->type);
PRINT_ERR("LiteIpc unknown msg type:%d\n", content->outMsg->type);
ret = -EINVAL;
goto BUFFER_FREE;
}

View File

@@ -150,8 +150,8 @@ typedef struct {
VOID *data;
UINT32 spObjNum;
VOID *offsets;
UINT32 processID; /**< filled by kernel, processId of sender/reciever */
UINT32 taskID; /**< filled by kernel, taskId of sender/reciever */
UINT32 processID; /**< filled by kernel, processId of sender/receiver */
UINT32 taskID; /**< filled by kernel, taskId of sender/receiver */
#ifdef LOSCFG_SECURITY_CAPABILITY
UINT32 userID;
UINT32 gid;

0
kernel/extended/lms/Kconfig Executable file → Normal file
View File

0
kernel/extended/lms/Makefile Executable file → Normal file
View File

4
kernel/extended/lms/lms_libc.c Executable file → Normal file
View File

@@ -56,7 +56,7 @@ void *memcpy(void *dest, const void *src, size_t len)
}
#undef strcat
char *strcat (char *s, const char *append)
char *strcat(char *s, const char *append)
{
if ((s == NULL) || (append == NULL)) {
return NULL;
@@ -119,4 +119,4 @@ char *strncpy(char *dest, const char *src, size_t n)
__asan_storeN_noabort((UINTPTR)dest, n);
__asan_loadN_noabort((UINTPTR)src, size + 1);
return __strncpy(dest, src, n);
}
}

0
kernel/extended/lms/los_lms.c Executable file → Normal file
View File

0
kernel/extended/lms/los_lms_pri.h Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lms.c Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lms.h Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lms_pri.h Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lmslibc.c Executable file → Normal file
View File

View File

@@ -104,7 +104,7 @@ typedef struct {
#define PMU_INT(_num) PMU_LABEL_INT_##_num
#define OS_PMU_INTS(_num, _list) \
STATIC UINT32 _list [_num] = { \
STATIC UINT32 _list[_num] = { \
PMU_INT(_num) \
}

View File

@@ -181,7 +181,7 @@ STATIC VOID LOS_TraceTaskResume(const LosTaskCB *taskCB)
STATIC VOID LOS_TraceTaskSuspend(const LosTaskCB *taskCB)
{
LOS_TRACE(TASK_SUSPEND, taskCB->taskID, taskCB->taskStatus,OsCurrTaskGet()->taskID);
LOS_TRACE(TASK_SUSPEND, taskCB->taskID, taskCB->taskStatus, OsCurrTaskGet()->taskID);
}
STATIC VOID LOS_TraceIsrEnter(UINT32 hwiNum)

View File

@@ -94,7 +94,7 @@ typedef struct {
/**
* @ingroup los_trace
* struct to store the event infomation
* struct to store the event information
*/
typedef struct {
UINT32 cmd; /* trace start or stop cmd */

View File

@@ -57,6 +57,9 @@ UINT32 SerialPipelineInit(VOID)
UINT32 SerialDataReceive(UINT8 *data, UINT32 size, UINT32 timeout)
{
(VOID)data;
(VOID)size;
(VOID)timeout;
return LOS_OK;
}

View File

@@ -187,7 +187,7 @@ STATIC VOID OsTraceInfoEventData(VOID)
UINT32 taskLockCnt = frame->core.taskLockCnt;
#ifdef LOSCFG_KERNEL_SMP
/*
* For smp systems, TRACE_LOCK will requst taskLock, and this counter
* For smp systems, TRACE_LOCK will request taskLock, and this counter
* will increase by 1 in that case.
*/
taskLockCnt -= 1;

View File

@@ -1,3 +1,34 @@
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)

View File

@@ -90,10 +90,10 @@ extern VOID *LOS_SoLoad(CHAR *elfFileName);
/**
* @ingroup dynload
* @brief Load a object file.
* @brief Load an object file.
*
* @par Description:
* This API is used to load a object file under a particular module file path.
* This API is used to load an object file under a particular module file path.
* @attention
* <ul>
* <li>The parameter passed to this API should be a legal path of an object file.</li>

0
kernel/include/los_lms.h Executable file → Normal file
View File

View File

@@ -74,14 +74,14 @@ typedef LOS_MEMBOX_INFO OS_MEMBOX_S;
* @ingroup los_membox
* Memory pool alignment
*/
#define LOS_MEMBOX_ALLIGNED(memAddr) (((UINTPTR)(memAddr) + sizeof(UINTPTR) - 1) & (~(sizeof(UINTPTR) - 1)))
#define LOS_MEMBOX_ALIGNED(memAddr) (((UINTPTR)(memAddr) + sizeof(UINTPTR) - 1) & (~(sizeof(UINTPTR) - 1)))
/**
* @ingroup los_membox
* Memory pool size
*/
#define LOS_MEMBOX_SIZE(blkSize, blkNum) \
(sizeof(LOS_MEMBOX_INFO) + (LOS_MEMBOX_ALLIGNED((blkSize) + OS_MEMBOX_NODE_HEAD_SIZE) * (blkNum)))
(sizeof(LOS_MEMBOX_INFO) + (LOS_MEMBOX_ALIGNED((blkSize) + OS_MEMBOX_NODE_HEAD_SIZE) * (blkNum)))
/**
* @ingroup los_membox

View File

@@ -59,7 +59,7 @@ extern "C" {
/**
* @ingroup los_memory
* The recored layers of function call.
* The recorded layers of function call.
*/
#define LOS_RECORD_LR_CNT 3
#endif
@@ -101,11 +101,11 @@ extern UINT32 LOS_MemDeInit(VOID *pool);
/**
* @ingroup los_memory
* @brief Print infomation about all pools.
* @brief Print information about all pools.
*
* @par Description:
* <ul>
* <li>This API is used to print infomation about all pools.</li>
* <li>This API is used to print information about all pools.</li>
* </ul>
*
* @retval #UINT32 The pool number.
@@ -351,11 +351,11 @@ extern UINT32 LOS_MemTotalUsedGet(VOID *pool);
/**
* @ingroup los_memory
* @brief Get the infomation of memory pool.
* @brief Get the information of memory pool.
*
* @par Description:
* <ul>
* <li>This API is used to get the infomation of memory pool.</li>
* <li>This API is used to get the information of memory pool.</li>
* </ul>
* @attention
* <ul>
@@ -366,7 +366,7 @@ extern UINT32 LOS_MemTotalUsedGet(VOID *pool);
* @param poolStatus [IN] A pointer for storage the pool status
*
* @retval #LOS_NOK The incoming parameter pool is NULL or invalid.
* @retval #LOS_OK Success to get memory infomation.
* @retval #LOS_OK Success to get memory information.
* @par Dependency:
* <ul><li>los_memory.h: the header file that contains the API declaration.</li></ul>
* @see None.

View File

@@ -80,7 +80,7 @@ typedef VOID (*pf_OUTPUT)(const CHAR *fmt, ...);
* <li>None</li>
* </ul>
*
* @param fmt [IN] Type char* controls the ouput as in C printf.
* @param fmt [IN] Type char* controls the output as in C printf.
*
* @retval None
* @par Dependency:

View File

@@ -184,7 +184,7 @@ extern UINT32 LOS_RwlockTryRdLock(LosRwlock *rwlock);
* the task scheduling.</li>
* is disabled.</li>
* <li>Do not wait on a rwlock during an interrupt.</li>
* <li>The funtion fails when other tasks have the read or write lock.</li>
* <li>The function fails when other tasks have the read or write lock.</li>
* <li>A recursive rwlock can be locked more than once by the same thread.</li>
* <li>Do not call this API in software timer callback. </li>
* </ul>
@@ -218,7 +218,7 @@ extern UINT32 LOS_RwlockWrLock(LosRwlock *rwlock, UINT32 timeout);
* when the task scheduling.</li>
* is disabled.</li>
* <li>Do not wait on a rwlock during an interrupt.</li>
* <li>The funtion fails when other tasks have the read or write lock.</li>
* <li>The function fails when other tasks have the read or write lock.</li>
* <li>A recursive rwlock can be locked more than once by the same thread.</li>
* <li>Do not call this API in software timer callback. </li>
* </ul>

View File

@@ -221,7 +221,7 @@ extern "C" {
/**
* @ingroup los_task
* Task error code: The task yeild occurs when the task is locked.
* Task error code: The task yield occurs when the task is locked.
* Value: 0x0200020f
*
* Solution: Check the task.
@@ -411,7 +411,7 @@ extern "C" {
/**
* @ingroup los_task
* Task error code: Task yeild in int is not permited, which will result in unexpected result.
* Task error code: Task yield in int is not permited, which will result in unexpected result.
*
* Value: 0x02000224
*

View File

@@ -235,7 +235,7 @@ typedef struct {
/**
* @ingroup los_trace
* struct to store the event infomation
* struct to store the event information
*/
typedef struct {
UINT32 eventType; /**< event type */
@@ -331,9 +331,9 @@ extern TRACE_EVENT_HOOK g_traceEventHook;
* <li>The first param is treat as key, keep at least this param if you want trace this event.</li>
* <li>All parameters were treated as UINTPTR.</li>
* </ul>
* eg. Trace a event as:
* eg. Trace an event as:
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio) taskId, taskStatus, oldPrio, newPrio
* eg. Not Trace a event as:
* eg. Not Trace an event as:
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio)
* eg. Trace only you need parmas as:
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio) taskId
@@ -377,8 +377,8 @@ extern TRACE_EVENT_HOOK g_traceEventHook;
#define QUEUE_CREATE_PARAMS(queueId, queueSz, itemSz, queueAddr, memType) \
queueId, queueSz, itemSz, queueAddr, memType
#define QUEUE_DELETE_PARAMS(queueId, state, readable) queueId, state, readable
#define QUEUE_RW_PARAMS(queueId, queueSize, bufSize, operateType, readable, writeable, timeout) \
queueId, queueSize, bufSize, operateType, readable, writeable, timeout
#define QUEUE_RW_PARAMS(queueId, queueSize, bufSize, operateType, readable, writable, timeout) \
queueId, queueSize, bufSize, operateType, readable, writable, timeout
#define SEM_CREATE_PARAMS(semId, type, count) semId, type, count
#define SEM_DELETE_PARAMS(semId, delRetCode) semId, delRetCode