fix:内源代码检视拼写错误修改
【背景】3.1代码review问题修改 【修改方案】 根据检视意见对拼写错误进行修改 Signed-off-by: xuiny <xuxinyu6@huawei.com> Change-Id: I9fb982a8ba2052fa4d56e91eec33c96ab4035a90
This commit is contained in:
parent
87a7df48b8
commit
0f75bf01a6
2
Kconfig
2
Kconfig
|
@ -265,7 +265,7 @@ config MEM_LEAKCHECK
|
|||
default n
|
||||
depends on DEBUG_VERSION && MEM_DEBUG
|
||||
help
|
||||
Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the infomations of mem node.
|
||||
Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the informations of mem node.
|
||||
config BASE_MEM_NODE_INTEGRITY_CHECK
|
||||
bool "Enable integrity check or not"
|
||||
default n
|
||||
|
|
|
@ -377,7 +377,7 @@ static int OsTabMatchFile(char *cmdKey, unsigned int *len)
|
|||
* Description: Pass in the string and clear useless space ,which include:
|
||||
* 1) The overmatch space which is not be marked by Quote's area
|
||||
* Squeeze the overmatch space into one space
|
||||
* 2) Clear all space before first valid charatctor
|
||||
* 2) Clear all space before first valid character
|
||||
* Input: cmdKey : Pass in the buff string, which is ready to be operated
|
||||
* cmdOut : Pass out the buffer string ,which has already been operated
|
||||
* size : cmdKey length
|
||||
|
@ -406,17 +406,17 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size)
|
|||
|
||||
/* Backup the 'output' start address */
|
||||
outputBak = output;
|
||||
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */
|
||||
/* Scan each character in 'cmdKey',and squeeze the overmuch space and ignore invalid character */
|
||||
for (; *cmdKey != '\0'; cmdKey++) {
|
||||
/* Detected a Double Quotes, switch the matching status */
|
||||
if (*(cmdKey) == '\"') {
|
||||
SWITCH_QUOTES_STATUS(quotes);
|
||||
}
|
||||
/* Ignore the current charactor in following situation */
|
||||
/* Ignore the current character in following situation */
|
||||
/* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */
|
||||
/* 2) Current charactor is a space */
|
||||
/* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */
|
||||
/* 4) Invalid charactor, such as single quotes */
|
||||
/* 2) Current character is a space */
|
||||
/* 3) Next character is a space too, or the string is been seeked to the end already(\0) */
|
||||
/* 4) Invalid character, such as single quotes */
|
||||
if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size)
|
|||
/* Restore the 'output' start address */
|
||||
output = outputBak;
|
||||
len = strlen(output);
|
||||
/* Clear the space which is located at the first charactor in buffer */
|
||||
/* Clear the space which is located at the first character in buffer */
|
||||
if (*output == ' ') {
|
||||
output++;
|
||||
len--;
|
||||
|
|
|
@ -334,12 +334,12 @@ char *GetCmdName(const char *cmdline, unsigned int len)
|
|||
/* If reach a double quotes, switch the quotes matching status */
|
||||
if (*tmpStr == '\"') {
|
||||
SWITCH_QUOTES_STATUS(quotes);
|
||||
/* Ignore the double quote charactor itself */
|
||||
/* Ignore the double quote character itself */
|
||||
tmpStr++;
|
||||
continue;
|
||||
}
|
||||
/* If detected a space which the quotes matching status is false */
|
||||
/* which said has detected the first space for seperator, finish this scan operation */
|
||||
/* which said has detected the first space for separator, finish this scan operation */
|
||||
if ((*tmpStr == ' ') && (QUOTES_STATUS_CLOSE(quotes))) {
|
||||
break;
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ unsigned int PreHandleCmdline(const char *input, char **output, unsigned int *ou
|
|||
*output = shiftStr;
|
||||
*outputlen = shiftLen;
|
||||
|
||||
/* Check and parse "./", located at the first two charaters of the cmd */
|
||||
/* Check and parse "./", located at the first two characters of the cmd */
|
||||
if ((shiftLen > removeLen) && (shiftStr[0] == '.') && (shiftStr[1] == '/')) {
|
||||
execLen = strlen(execCmd);
|
||||
newLen = execLen + shiftLen - removeLen; /* i.e., newLen - execLen == shiftLen - removeLen */
|
||||
|
|
|
@ -114,7 +114,7 @@ typedef enum tagTFTPC_OpCode {
|
|||
TFTPC_OP_RRQ = 1, /* read request */
|
||||
TFTPC_OP_WRQ, /* write request */
|
||||
TFTPC_OP_DATA, /* data packet */
|
||||
TFTPC_OP_ACK, /* acknowledgement */
|
||||
TFTPC_OP_ACK, /* acknowledgment */
|
||||
TFTPC_OP_ERROR, /* error code */
|
||||
TFTPC_OP_OPT /* option code */
|
||||
} TFTPC_OPCODE_E;
|
||||
|
|
|
@ -50,11 +50,11 @@ static char *TftpError[] = {
|
|||
"Error while sending data to the peer\n",
|
||||
"Requested file is not found\n",
|
||||
"This is the error sent by the server when hostname cannot be resolved\n",
|
||||
"Input paramters passed to TFTP interfaces are invalid\n",
|
||||
"Input parameters passed to TFTP interfaces are invalid\n",
|
||||
"Error detected in TFTP packet or the error received from the TFTP server\n",
|
||||
"Error during packet synhronization while sending or unexpected packet is received\n",
|
||||
"File size limit crossed, Max block can be 0xFFFF, each block containing 512 bytes\n",
|
||||
"File name lenght greater than 256\n",
|
||||
"File name length greater than 256\n",
|
||||
"Hostname IP is not valid\n",
|
||||
"TFTP server returned file access error\n",
|
||||
"TFTP server returned error signifying that the DISK is full to write\n",
|
||||
|
@ -66,11 +66,11 @@ static char *TftpError[] = {
|
|||
"File create error\n",
|
||||
"File write error\n",
|
||||
"Max time expired while waiting for file to be recived\n",
|
||||
"Error when the received packet is less than 4bytes(error lenght) or greater than 512bytes\n",
|
||||
"Error when the received packet is less than 4bytes(error length) or greater than 512bytes\n",
|
||||
"Returned by TFTP server for protocol user error\n",
|
||||
"The destination file path length greater than 256\n",
|
||||
"Returned by TFTP server for undefined transfer ID\n",
|
||||
"IOCTL fucntion failed at TFTP client while setting the socket to non-block\n",
|
||||
"IOCTL function failed at TFTP client while setting the socket to non-block\n",
|
||||
};
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
|
|
|
@ -189,7 +189,7 @@ u32_t lwip_tftp_recv_from_server(s32_t iSockNum, u32_t *pulSize, TFTPC_PACKET_S
|
|||
if (iRet == -1) {
|
||||
return TFTPC_SELECT_ERROR;
|
||||
} else if (iRet == 0) {
|
||||
return TFTPC_TIMEOUT_ERROR; /* Select timeout occured */
|
||||
return TFTPC_TIMEOUT_ERROR; /* Select timeout occurred */
|
||||
}
|
||||
|
||||
if (!FD_ISSET(iSockNum, &stReadfds)) {
|
||||
|
@ -268,7 +268,7 @@ u32_t lwip_tftp_recv_from_server(s32_t iSockNum, u32_t *pulSize, TFTPC_PACKET_S
|
|||
*pulSize = (u32_t)iRet;
|
||||
|
||||
/* If received packet is first block of data(for get operation) or if
|
||||
received packet is acknowledgement for write request (put operation)
|
||||
received packet is acknowledgment for write request (put operation)
|
||||
store the received port number */
|
||||
if (((usOpcode == TFTPC_OP_DATA) &&
|
||||
(ntohs(pstRecvBuf->u.stTFTP_Data.usBlknum) == 1)) ||
|
||||
|
@ -687,7 +687,7 @@ u32_t lwip_tftp_get_file_by_filename(u32_t ulHostAddr,
|
|||
|
||||
ulErrCode = lwip_tftp_recv_from_server(iSockNum, &ulRecvSize, pstRecvBuf,
|
||||
&ulIgnorePkt, &stServerAddr, pstSendBuf);
|
||||
/* If select timeout occured */
|
||||
/* If select timeout occurred */
|
||||
if (ulErrCode == TFTPC_TIMEOUT_ERROR) {
|
||||
ulTotalTime++;
|
||||
if (ulTotalTime < TFTPC_MAX_SEND_REQ_ATTEMPTS) {
|
||||
|
@ -982,7 +982,7 @@ u32_t lwip_tftp_put_file_by_filename(u32_t ulHostAddr, u16_t usTftpServPort, u8_
|
|||
return TFTPC_MEMALLOC_ERROR;
|
||||
}
|
||||
|
||||
/* First time intialize the buffer */
|
||||
/* First time initialize the buffer */
|
||||
(void)memset_s((void *)pstSendBuf, sizeof(TFTPC_PACKET_S), 0, sizeof(TFTPC_PACKET_S));
|
||||
|
||||
/* The destination path can only be one of the following:
|
||||
|
@ -1221,7 +1221,7 @@ u32_t lwip_tftp_inner_put_file(s32_t iSockNum,
|
|||
return TFTPC_MEMALLOC_ERROR;
|
||||
}
|
||||
|
||||
/* First time intialize the buffer */
|
||||
/* First time initialize the buffer */
|
||||
(void)memset_s((void *)pstRecvBuf, sizeof(TFTPC_PACKET_S), 0, sizeof(TFTPC_PACKET_S));
|
||||
|
||||
/* Initialize from address to the server address at first */
|
||||
|
@ -1235,7 +1235,7 @@ u32_t lwip_tftp_inner_put_file(s32_t iSockNum,
|
|||
ulError = lwip_tftp_recv_from_server(iSockNum, &ulPktSize,
|
||||
pstRecvBuf, &ulIgnorePkt,
|
||||
pstServerAddr, pstSendBuf);
|
||||
/* If select timeout occured */
|
||||
/* If select timeout occurred */
|
||||
if (ulError == TFTPC_TIMEOUT_ERROR) {
|
||||
ulTotalTime++;
|
||||
if (ulTotalTime < TFTPC_MAX_SEND_REQ_ATTEMPTS) {
|
||||
|
@ -1526,7 +1526,7 @@ u32_t lwip_tftp_get_file_by_filename_to_rawmem(u32_t ulHostAddr,
|
|||
|
||||
ulErrCode = lwip_tftp_recv_from_server(iSockNum, &ulRecvSize, pstRecvBuf, &ulIgnorePkt,
|
||||
&stServerAddr, pstSendBuf);
|
||||
/* If select timeout occured */
|
||||
/* If select timeout occurred */
|
||||
if (ulErrCode == TFTPC_TIMEOUT_ERROR) {
|
||||
ulTotalTime++;
|
||||
if (ulTotalTime < TFTPC_MAX_SEND_REQ_ATTEMPTS) {
|
||||
|
|
|
@ -246,7 +246,7 @@ STATIC INLINE INT32 LOS_AtomicIncRet(Atomic *v)
|
|||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to implementating the atomic auto-decrement.
|
||||
* This API is used to implement the atomic auto-decrement.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>The pointer v must not be NULL.</li>
|
||||
|
@ -280,7 +280,7 @@ STATIC INLINE VOID LOS_AtomicDec(Atomic *v)
|
|||
* @brief Atomic auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to implementating the atomic auto-decrement and return the result of auto-decrement.
|
||||
* This API is used to implement the atomic auto-decrement and return the result of auto-decrement.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>The pointer v must not be NULL.</li>
|
||||
|
@ -531,7 +531,7 @@ STATIC INLINE INT64 LOS_Atomic64IncRet(Atomic64 *v)
|
|||
* @brief Atomic64 auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to implementating the atomic64 auto-decrement.
|
||||
* This API is used to implement the atomic64 auto-decrement.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>The pointer v must not be NULL.</li>
|
||||
|
@ -566,7 +566,7 @@ STATIC INLINE VOID LOS_Atomic64Dec(Atomic64 *v)
|
|||
* @brief Atomic64 auto-decrement.
|
||||
*
|
||||
* @par Description:
|
||||
* This API is used to implementating the atomic64 auto-decrement and return the result of auto-decrement.
|
||||
* This API is used to implement the atomic64 auto-decrement and return the result of auto-decrement.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>The pointer v must not be NULL.</li>
|
||||
|
|
|
@ -119,12 +119,12 @@ VOID HalIrqInit(VOID)
|
|||
{
|
||||
UINT32 i;
|
||||
|
||||
/* set externel interrupts to be level triggered, active low. */
|
||||
/* set external interrupts to be level triggered, active low. */
|
||||
for (i = 32; i < OS_HWI_MAX_NUM; i += 16) {
|
||||
GIC_REG_32(GICD_ICFGR(i / 16)) = 0;
|
||||
}
|
||||
|
||||
/* set externel interrupts to CPU 0 */
|
||||
/* set external interrupts to CPU 0 */
|
||||
for (i = 32; i < OS_HWI_MAX_NUM; i += 4) {
|
||||
GIC_REG_32(GICD_ITARGETSR(i / 4)) = 0x01010101;
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ VOID HalIrqInit(VOID)
|
|||
GicWaitForRwp(GICD_CTLR);
|
||||
ISB;
|
||||
|
||||
/* set externel interrupts to be level triggered, active low. */
|
||||
/* set external interrupts to be level triggered, active low. */
|
||||
for (i = 32; i < OS_HWI_MAX_NUM; i += 16) {
|
||||
GIC_REG_32(GICD_ICFGR(i / 16)) = 0;
|
||||
}
|
||||
|
|
|
@ -77,8 +77,8 @@ enum {
|
|||
#define GICD_PIDR2V3 (GICD_OFFSET + 0xffe8)
|
||||
|
||||
#ifdef LOSCFG_ARCH_GIC_V3
|
||||
#define GICD_IGRPMODR(n) (GICD_OFFSET + 0x0d00 + (n) * 4) /* Interrupt Group Mode Reisters */
|
||||
#define GICD_IROUTER(n) (GICD_OFFSET + 0x6000 + (n) * 8) /* Interrupt Rounter Reisters */
|
||||
#define GICD_IGRPMODR(n) (GICD_OFFSET + 0x0d00 + (n) * 4) /* Interrupt Group Mode Registers */
|
||||
#define GICD_IROUTER(n) (GICD_OFFSET + 0x6000 + (n) * 8) /* Interrupt Rounter Registers */
|
||||
#endif
|
||||
|
||||
#define GIC_REG_8(reg) (*(volatile UINT8 *)((UINTPTR)(GIC_BASE_ADDR + (reg))))
|
||||
|
|
|
@ -71,7 +71,7 @@ extern "C" {
|
|||
/* CONSTANTS */
|
||||
|
||||
#define MQ_USE_MAGIC 0x89abcdef
|
||||
/* not suppurt prio */
|
||||
/* not support prio */
|
||||
#define MQ_PRIO_MAX 1
|
||||
|
||||
typedef union send_receive_t {
|
||||
|
@ -297,7 +297,7 @@ extern int mq_send(mqd_t personal, const char *msg, size_t msgLen, unsigned int
|
|||
* <li><b>EAGAIN</b>: The message queue is empty.</li>
|
||||
* <li><b>EINVAL</b>: invalid parameter.</li>
|
||||
* <li><b>EMSGSIZE</b>: The message to be received is too long.</li>
|
||||
* <li><b>ETIMEDOUT</b>: The operaton times out.</li>
|
||||
* <li><b>ETIMEDOUT</b>: The operation times out.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @par Dependency:
|
||||
|
|
|
@ -647,7 +647,7 @@ int clock_getres(clockid_t clockID, struct timespec *tp)
|
|||
case CLOCK_MONOTONIC_RAW:
|
||||
case CLOCK_MONOTONIC:
|
||||
case CLOCK_REALTIME:
|
||||
/* the accessable rtc resolution */
|
||||
/* the accessible rtc resolution */
|
||||
tp->tv_nsec = OS_SYS_NS_PER_US; /* the precision of clock_gettime is 1us */
|
||||
tp->tv_sec = 0;
|
||||
break;
|
||||
|
|
|
@ -253,7 +253,7 @@ struct disk_divide_info {
|
|||
* </ul>
|
||||
*
|
||||
* @param diskName [IN] Type #const CHAR * disk driver name.
|
||||
* @param bops [IN] Type #const struct block_operations * block driver control sturcture.
|
||||
* @param bops [IN] Type #const struct block_operations * block driver control structure.
|
||||
* @param priv [IN] Type #VOID * private data of vnode.
|
||||
* @param diskID [IN] Type #INT32 disk id number, less than SYS_MAX_DISK.
|
||||
* @param info [IN] Type #VOID * disk driver partition information.
|
||||
|
@ -712,7 +712,7 @@ INT32 los_alloc_diskid_byname(const CHAR *diskName);
|
|||
* @brief get the INUSED disk id.
|
||||
*
|
||||
* @par Description:
|
||||
* Get the correponding INUSED disk id by diskName.
|
||||
* Get the corresponding INUSED disk id by diskName.
|
||||
*
|
||||
* @attention
|
||||
* <ul>
|
||||
|
|
|
@ -107,7 +107,7 @@ INT32 los_alloc_diskid_byname(const CHAR *diskName)
|
|||
size_t nameLen;
|
||||
|
||||
if (diskName == NULL) {
|
||||
PRINT_ERR("The paramter disk_name is NULL");
|
||||
PRINT_ERR("The parameter disk_name is NULL");
|
||||
return VFS_ERROR;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ INT32 los_get_diskid_byname(const CHAR *diskName)
|
|||
size_t diskNameLen;
|
||||
|
||||
if (diskName == NULL) {
|
||||
PRINT_ERR("The paramter diskName is NULL");
|
||||
PRINT_ERR("The parameter diskName is NULL");
|
||||
return VFS_ERROR;
|
||||
}
|
||||
|
||||
|
@ -756,7 +756,7 @@ INT32 DiskPartitionRegister(los_disk *disk)
|
|||
los_part *part = NULL;
|
||||
struct disk_divide_info parInfo;
|
||||
|
||||
/* Fill disk_divide_info structure to set partition's infomation. */
|
||||
/* Fill disk_divide_info structure to set partition's information. */
|
||||
(VOID)memset_s(parInfo.part, sizeof(parInfo.part), 0, sizeof(parInfo.part));
|
||||
partSize = sizeof(parInfo.part) / sizeof(parInfo.part[0]);
|
||||
|
||||
|
@ -788,7 +788,7 @@ INT32 DiskPartitionRegister(los_disk *disk)
|
|||
}
|
||||
|
||||
for (i = 0; i < partSize; i++) {
|
||||
/* Read the disk_divide_info structure to get partition's infomation. */
|
||||
/* Read the disk_divide_info structure to get partition's information. */
|
||||
if ((parInfo.part[i].type != 0) && (parInfo.part[i].type != EXTENDED_PAR) &&
|
||||
(parInfo.part[i].type != EXTENDED_8G)) {
|
||||
part = get_part(DiskAddPart(disk, parInfo.part[i].sector_start, parInfo.part[i].sector_count, TRUE));
|
||||
|
|
|
@ -289,7 +289,7 @@ static INT32 BlockDriverRegisterOperate(mtd_partition *newNode,
|
|||
if (ret) {
|
||||
free(newNode->blockdriver_name);
|
||||
newNode->blockdriver_name = NULL;
|
||||
PRINT_ERR("register blkdev partion error\n");
|
||||
PRINT_ERR("register blkdev partition error\n");
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
|
@ -322,7 +322,7 @@ static INT32 CharDriverRegisterOperate(mtd_partition *newNode,
|
|||
|
||||
ret = register_driver(newNode->chardriver_name, param->char_ops, RWE_RW_RW, newNode);
|
||||
if (ret) {
|
||||
PRINT_ERR("register chardev partion error\n");
|
||||
PRINT_ERR("register chardev partition error\n");
|
||||
free(newNode->chardriver_name);
|
||||
newNode->chardriver_name = NULL;
|
||||
return ret;
|
||||
|
@ -340,7 +340,7 @@ static INT32 BlockDriverUnregister(mtd_partition *node)
|
|||
if (node->blockdriver_name != NULL) {
|
||||
ret = unregister_blockdriver(node->blockdriver_name);
|
||||
if (ret == -EBUSY) {
|
||||
PRINT_ERR("unregister blkdev partion error:%d\n", ret);
|
||||
PRINT_ERR("unregister blkdev partition error:%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
free(node->blockdriver_name);
|
||||
|
@ -356,7 +356,7 @@ static INT32 CharDriverUnregister(mtd_partition *node)
|
|||
if (node->chardriver_name != NULL) {
|
||||
ret = unregister_driver(node->chardriver_name);
|
||||
if (ret == -EBUSY) {
|
||||
PRINT_ERR("unregister chardev partion error:%d\n", ret);
|
||||
PRINT_ERR("unregister chardev partition error:%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
free(node->chardriver_name);
|
||||
|
|
|
@ -319,7 +319,7 @@ FRESULT f_regvirfs(FATFS *fs)
|
|||
|
||||
/* Set the CHILD object field */
|
||||
for (i = 0; i < fs->vir_amount; i++) {
|
||||
pfs = ff_memalloc(sizeof(FATFS)); /* Allocate a memeory for current child FATFS object */
|
||||
pfs = ff_memalloc(sizeof(FATFS)); /* Allocate a memory for current child FATFS object */
|
||||
if (pfs == NULL) { /* If allocate failed, must call 'f_unregvirfs' to free the previous FATFS object memory */
|
||||
goto ERROUT;
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ static void FatfsSetChildClst(BYTE *work, FATFS *fs, WORD i)
|
|||
* - FR_OK : The external SD configure is complete, all info has been set to the
|
||||
* each CHILD FATFS
|
||||
* - FR_NOT_MATCHED : The virtual partition's configure does not matched as current setting
|
||||
* - FR_MODIFIED : The virtual partition's configure has been destoried partly or completely
|
||||
* - FR_MODIFIED : The virtual partition's configure has been destroyed partly or completely
|
||||
* - FR_NOVIRPART : The external SD has not been apllied as virtual partition yet
|
||||
*
|
||||
* Others Return Value:
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef unsigned short fmode_t;
|
|||
#define FMODE_64BITHASH ((fmode_t)0x400)
|
||||
/* 32bit hashes as llseek() offset (for directories) */
|
||||
#define FMODE_32BITHASH ((fmode_t)0x200)
|
||||
/* File is opened using open(.., 3, ..) and is writeable only for ioctls
|
||||
/* File is opened using open(.., 3, ..) and is writable only for ioctls
|
||||
* (specialy hack for floppy.c)
|
||||
*/
|
||||
#define FMODE_WRITE_IOCTL ((fmode_t)0x100)
|
||||
|
|
|
@ -87,7 +87,7 @@ static struct ProcDirEntry *ProcFindNode(struct ProcDirEntry *parent, const char
|
|||
}
|
||||
|
||||
/*
|
||||
* descrition: find the file's handle
|
||||
* description: find the file's handle
|
||||
* path: the file of fullpath
|
||||
* return: the file of handle
|
||||
* add by ll
|
||||
|
|
|
@ -637,7 +637,7 @@ void ls(const char *pathname)
|
|||
|
||||
if (statInfo.st_mode & S_IFDIR) { /* list all directory and file */
|
||||
ret = LsDir((pathname == NULL) ? path : pathname);
|
||||
} else { /* show the file infomation */
|
||||
} else { /* show the file information */
|
||||
ret = LsFile(path);
|
||||
}
|
||||
if (ret < 0) {
|
||||
|
|
|
@ -407,7 +407,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)
|
||||
{
|
||||
|
@ -421,7 +421,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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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))) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -288,8 +288,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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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 */
|
||||
|
@ -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
|
||||
|
|
|
@ -168,7 +168,7 @@ typedef struct ping6_stats {
|
|||
u32_t max_rtt;
|
||||
float avg_rtt;
|
||||
} ping6_stats_t;
|
||||
LWIP_STATIC void update_ping6_stats(ping6_stats_t *ping6_stats, u32_t rtt, u32_t nrecieved);
|
||||
LWIP_STATIC void update_ping6_stats(ping6_stats_t *ping6_stats, u32_t rtt, u32_t nreceived);
|
||||
LWIP_STATIC int parse_args_ping6(int argc, const char **argv, ping6_args_t *ping6_params);
|
||||
|
||||
u32_t osShellPing6(int argc, const char **argv);
|
||||
|
@ -2086,7 +2086,7 @@ u32_t osShellPing6(int argc, const char **argv)
|
|||
u16_t icmpv6_seq;
|
||||
u32_t nsent;
|
||||
u32_t nrecieve;
|
||||
u32_t last_recieved;
|
||||
u32_t last_received;
|
||||
struct timespec start, end, start_in_reply;
|
||||
struct timespec first, last;
|
||||
long rtt;
|
||||
|
@ -2170,7 +2170,7 @@ u32_t osShellPing6(int argc, const char **argv)
|
|||
ping6_stats.avg_rtt = 0;
|
||||
ping6_stats.max_rtt = 0;
|
||||
ping6_stats.min_rtt = 0;
|
||||
last_recieved = LWIP_PING6_STARTING_SEQ_NUM + LWIP_PING6_OUT_OF_ORDER_MAGNITUDE + 1;
|
||||
last_received = LWIP_PING6_STARTING_SEQ_NUM + LWIP_PING6_OUT_OF_ORDER_MAGNITUDE + 1;
|
||||
icmpv6_id = (u16_t)LWIP_RAND();
|
||||
icmpv6_seq = LWIP_PING6_STARTING_SEQ_NUM;
|
||||
/* Setting the start time of the entire ping task for statistics */
|
||||
|
@ -2181,7 +2181,7 @@ u32_t osShellPing6(int argc, const char **argv)
|
|||
for (nsent = 0; nsent < ping6_params.pingcount; nsent++) {
|
||||
/* capture the start tick to calculate rtt */
|
||||
(void)clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
||||
/* Initialize Memory To Prevent Unintialized Memory Read Write Issues */
|
||||
/* Initialize Memory To Prevent Uninitialized Memory Read Write Issues */
|
||||
if (memset_s(pbuf_req->payload, pbuf_req->len, (int)(start.tv_nsec), pbuf_req->len) != 0) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -2253,14 +2253,14 @@ u32_t osShellPing6(int argc, const char **argv)
|
|||
}
|
||||
/* Accept and process only those delayed EREP only if its sequence num is within out-of-order magnitude */
|
||||
if (nsent && iecho_resp->seqno != icmpv6_seq &&
|
||||
(iecho_resp->seqno<(u16_t)(last_recieved - LWIP_PING6_OUT_OF_ORDER_MAGNITUDE) ||
|
||||
(iecho_resp->seqno<(u16_t)(last_received - LWIP_PING6_OUT_OF_ORDER_MAGNITUDE) ||
|
||||
iecho_resp->seqno>(u16_t)(
|
||||
last_recieved + LWIP_PING6_OUT_OF_ORDER_MAGNITUDE))) {
|
||||
last_received + LWIP_PING6_OUT_OF_ORDER_MAGNITUDE))) {
|
||||
/* Otherwise drop it and wait for more packets */
|
||||
goto REDUCE_SELECT_TIME;
|
||||
}
|
||||
++nrecieve;
|
||||
last_recieved = iecho_resp->seqno;
|
||||
last_received = iecho_resp->seqno;
|
||||
/* Retrieving the start_tick from the packet which was embedded when the request was transmitted */
|
||||
(void)pbuf_header(pbuf_resp, (s16_t)(-(s16_t)(sizeof(struct icmp6_echo_hdr))));
|
||||
if (memcpy_s((void *)&start_in_reply, sizeof(start_in_reply),
|
||||
|
@ -2314,7 +2314,7 @@ REDUCE_SELECT_TIME:
|
|||
nsent, nrecieve, (float)(((float)(nsent - nrecieve)) * ((float)(100)) / ((float)(nsent))),
|
||||
((last.tv_sec - first.tv_sec) * 1000 + (last.tv_nsec - first.tv_nsec) / 1000000));
|
||||
if (nrecieve) {
|
||||
/* Display rtt stats only if atleast one packet is recieved */
|
||||
/* Display rtt stats only if atleast one packet is received */
|
||||
PRINTK("rtt min/avg/max = %u/%.2f/%u ms\n", ping6_stats.min_rtt, ping6_stats.avg_rtt, ping6_stats.max_rtt);
|
||||
}
|
||||
|
||||
|
@ -2550,7 +2550,7 @@ exit:
|
|||
* Function to update ping6_stats
|
||||
* stats is maintained in ping6_stats structure
|
||||
*/
|
||||
LWIP_STATIC void update_ping6_stats(ping6_stats_t *ping6_stats, u32_t rtt, u32_t nrecieved)
|
||||
LWIP_STATIC void update_ping6_stats(ping6_stats_t *ping6_stats, u32_t rtt, u32_t nreceived)
|
||||
{
|
||||
if (rtt > ping6_stats->max_rtt) {
|
||||
ping6_stats->max_rtt = rtt;
|
||||
|
@ -2562,7 +2562,7 @@ LWIP_STATIC void update_ping6_stats(ping6_stats_t *ping6_stats, u32_t rtt, u32_t
|
|||
}
|
||||
|
||||
ping6_stats->avg_rtt = (float)(ping6_stats->avg_rtt +
|
||||
(float)((float)((float)rtt - ping6_stats->avg_rtt) / (float)(nrecieved)));
|
||||
(float)((float)((float)rtt - ping6_stats->avg_rtt) / (float)(nreceived)));
|
||||
}
|
||||
|
||||
LWIP_STATIC const char *convert_icmpv6_err_to_string(u8_t err_type)
|
||||
|
|
|
@ -88,7 +88,7 @@ driverif_init_ifname(struct netif *netif)
|
|||
*
|
||||
* @note Returning ERR_MEM here if a DMA queue of your MAC is full can lead to
|
||||
* strange results. You might consider waiting for space in the DMA queue
|
||||
* to become availale since the stack doesn't retry to send a packet
|
||||
* to become available since the stack doesn't retry to send a packet
|
||||
* dropped because of memory failure (except for the TCP timers).
|
||||
*/
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ void sys_init(void)
|
|||
|
||||
u32_t sys_now(void)
|
||||
{
|
||||
/* Lwip docs mentioned like wraparound is not a problem in this funtion */
|
||||
/* Lwip docs mentioned like wraparound is not a problem in this function */
|
||||
return (u32_t)((LOS_TickCountGet() * OS_SYS_MS_PER_SECOND) / LOSCFG_BASE_CORE_TICK_PER_SECOND);
|
||||
}
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ STATIC INT32 TelnetdAcceptClient(INT32 clientFd, const struct sockaddr_in *inTel
|
|||
}
|
||||
|
||||
if (g_telnetClientFd >= 0) {
|
||||
/* alreay connected and support only one */
|
||||
/* already connected and support only one */
|
||||
goto ERROUT_UNLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ extern "C" {
|
|||
* @param level [IN] print level.
|
||||
* @param func [IN] means which func calls print func.
|
||||
* @param line [IN] means which line calls print func.
|
||||
* @param fmt [IN] other infomation by user define.
|
||||
* @param fmt [IN] other information by user define.
|
||||
* @param ap [IN] the para list.
|
||||
*
|
||||
* @retval None.
|
||||
|
@ -85,7 +85,7 @@ typedef VOID (*LK_FUNC)(INT32 level, const CHAR *func, INT32 line, const CHAR *f
|
|||
* @param level [IN] print level.
|
||||
* @param func [IN] means which func calls print func.
|
||||
* @param line [IN] means which line calls print func.
|
||||
* @param fmt [IN] other infomation by user define
|
||||
* @param fmt [IN] other information by user define
|
||||
*
|
||||
* @retval NONE
|
||||
* @par Dependency:
|
||||
|
|
|
@ -424,7 +424,7 @@ STATIC INT32 OsTabMatchFile(CHAR *cmdKey, UINT32 *len)
|
|||
* Description: Pass in the string and clear useless space, which include:
|
||||
* 1) The overmatch space which is not be marked by Quote's area
|
||||
* Squeeze the overmatch space into one space
|
||||
* 2) Clear all space before first valid charatctor
|
||||
* 2) Clear all space before first valid character
|
||||
* Input: cmdKey : Pass in the buff string, which is ready to be operated
|
||||
* cmdOut : Pass out the buffer string ,which has already been operated
|
||||
* size : cmdKey length
|
||||
|
@ -452,17 +452,17 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI
|
|||
}
|
||||
/* Backup the 'output' start address */
|
||||
outputBak = output;
|
||||
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */
|
||||
/* Scan each character in 'cmdKey',and squeeze the overmuch space and ignore invalid character */
|
||||
for (; *cmdKey != '\0'; cmdKey++) {
|
||||
/* Detected a Double Quotes, switch the matching status */
|
||||
if (*(cmdKey) == '\"') {
|
||||
SWITCH_QUOTES_STATUS(quotes);
|
||||
}
|
||||
/* Ignore the current charactor in following situation */
|
||||
/* Ignore the current character in following situation */
|
||||
/* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */
|
||||
/* 2) Current charactor is a space */
|
||||
/* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */
|
||||
/* 4) Invalid charactor, such as single quotes */
|
||||
/* 2) Current character is a space */
|
||||
/* 3) Next character is a space too, or the string is been seeked to the end already(\0) */
|
||||
/* 4) Invalid character, such as single quotes */
|
||||
if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI
|
|||
/* Restore the 'output' start address */
|
||||
output = outputBak;
|
||||
len = strlen(output);
|
||||
/* Clear the space which is located at the first charactor in buffer */
|
||||
/* Clear the space which is located at the first character in buffer */
|
||||
if (*outputBak == ' ') {
|
||||
output++;
|
||||
len--;
|
||||
|
|
|
@ -250,7 +250,7 @@ STATIC UINT32 ShellMsgNameGetAndExec(CmdParsed *cmdParsed, const CHAR *output, U
|
|||
continue;
|
||||
}
|
||||
/* If detected a space which the quotes matching status is false */
|
||||
/* which said has detected the first space for seperator, finish this scan operation */
|
||||
/* which said has detected the first space for separator, finish this scan operation */
|
||||
if ((*tmpStr == ' ') && (QUOTES_STATUS_CLOSE(quotes))) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ extern int SysFstatfs64(int fd, size_t sz, struct statfs *buf);
|
|||
|
||||
extern int SysStat(const char *path, struct kstat *buf);
|
||||
extern int SysLstat(const char *path, struct kstat *buffer);
|
||||
extern int SysFstat(int fildes, struct kstat *buf);
|
||||
extern int SysFstat(int fields, struct kstat *buf);
|
||||
extern int SysStatx(int fd, const char *restrict path, int flag, unsigned mask, struct statx *restrict stx);
|
||||
extern int SysFsync(int fd);
|
||||
extern ssize_t SysReadv(int fd, const struct iovec *iov, int iovcnt);
|
||||
|
|
|
@ -82,7 +82,7 @@ static UINT32 Testcase(void)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
||||
EXIT:
|
||||
|
|
|
@ -109,7 +109,7 @@ static UINT32 Testcase(void)
|
|||
LOS_TaskDelay(1);
|
||||
PRINTK("sent %u time\n", g_ipiTriggerTimes);
|
||||
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
|
||||
PRINTK(" cpu%d recieved %u times\n", i, g_ipiRecieveTimes[i]);
|
||||
PRINTK(" cpu%d received %u times\n", i, g_ipiRecieveTimes[i]);
|
||||
}
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM * (j + 1), g_testCount, EXIT);
|
||||
|
|
|
@ -62,7 +62,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
/* Wait TaskF01 to start */
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
ret = OS_TCB_FROM_TID(testid)->taskStatus;
|
||||
|
|
|
@ -74,7 +74,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
/* Wait TaskF1 to start */
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
||||
|
||||
/* lower down the priority of TaskF01 to trigger preeption */
|
||||
|
|
|
@ -63,7 +63,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
}
|
||||
|
||||
/* wait for task to yeild */
|
||||
/* wait for task to yield */
|
||||
TestBusyTaskDelay(LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT * 2); // 2, used to calculate delay time
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM, g_testCount, EXIT);
|
||||
|
|
|
@ -66,7 +66,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
@ -91,7 +91,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_SemPost(g_semID);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
/* Wait TaskF01 to start */
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, assert that g_testCount is equal to this.
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
/* Wait TaskF01 to start */
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
/* wait for other core's task being schduled */
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
ret = OS_TCB_FROM_TID(g_testTaskID01)->taskStatus;
|
||||
|
|
|
@ -83,7 +83,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
/* wait for other core's task being scheduled */
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
@ -98,7 +98,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
/* wait for other core's task executed */
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
TestBusyTaskDelay(4); // 4, set delay time
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
@ -89,7 +89,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_SemPost(g_semID);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
@ -116,7 +116,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_SemPost(g_semID);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 5); // 100, Set the timeout of runtime; 5, test runing count
|
||||
TestAssertBusyTaskDelay(100, 5); // 100, Set the timeout of runtime; 5, test running count
|
||||
|
||||
ICUNIT_ASSERT_EQUAL(g_testCount, 5, g_testCount); // 5, assert that g_testCount is equal to this.
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); // 2, assert that g_testCount is equal to this.
|
||||
|
|
|
@ -81,7 +81,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
/* Wait other core's TaskF01 to resume */
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
@ -111,7 +111,7 @@ static UINT32 Testcase(void)
|
|||
/* unlock other core's tasklock */
|
||||
g_flag = 1;
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
/* wait for other core's task to suspend */
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
@ -99,7 +99,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
/* wait for other core's task being running */
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
TestBusyTaskDelay(10); // 10, set delay time
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, assert that g_testCount is equal to this.
|
||||
|
|
|
@ -68,7 +68,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
// 2, set delay time.
|
||||
TestBusyTaskDelay(2);
|
||||
|
|
|
@ -93,7 +93,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskYield();
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, assert that g_testCount is equal to this.
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ static UINT32 Testcase(void)
|
|||
ret = OS_TCB_FROM_TID(g_testTaskID02)->taskStatus;
|
||||
ICUNIT_ASSERT_NOT_EQUAL((ret & OS_TASK_STATUS_READY), 0, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
ICUNIT_ASSERT_NOT_EQUAL(g_testCount, 0, g_testCount);
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
|||
LOS_TaskUnlock();
|
||||
|
||||
/* wait for TaskF01 is finished */
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(5); // 5, set delay time
|
||||
|
||||
|
@ -95,7 +95,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_SemPost(g_semID);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // 3, assert that g_testCount is equal to this.
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
TestBusyTaskDelay(2); // 2, set delay time
|
||||
|
||||
|
@ -93,7 +93,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskResume(g_testTaskID01);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // 3, assert that g_testCount is equal to this.
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ static UINT32 Testcase(void)
|
|||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
/* wait for task02 start */
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
for (j = 0; j < TRandom() % 200; j++) { // 200, Number of cycles.
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(void)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||
|
||||
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
g_testCount++;
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||
EXIT:
|
||||
LOS_TaskDelete(g_testTaskID01);
|
||||
|
|
|
@ -86,7 +86,7 @@ static UINT32 Testcase(VOID)
|
|||
LOS_EventWrite(&g_event, 0x1111);
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test runing count
|
||||
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT1); // 4, Here, assert that g_testCount is equal to 4.
|
||||
|
||||
EXIT1:
|
||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -71,7 +71,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
EXIT:
|
||||
LOS_HwiDelete(HWI_NUM_TEST, NULL);
|
||||
|
|
|
@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||
ret = LOS_EventDestroy(&g_event);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
|
|
@ -91,7 +91,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -99,7 +99,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -74,7 +74,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
ret = LOS_EventDestroy(&g_event);
|
||||
|
|
|
@ -86,7 +86,7 @@ static UINT32 Testcase(VOID)
|
|||
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
||||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
ret = LOS_EventDestroy(&g_event);
|
||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -93,7 +93,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -45,7 +45,7 @@ static VOID TaskF01(VOID)
|
|||
LOS_AtomicInc(&g_testCount);
|
||||
ret = LOS_EventRead(&g_event, 0x11, LOS_WAITMODE_AND, LOS_WAIT_FOREVER);
|
||||
/*
|
||||
* write event ---> read event ---> destory event [pass]
|
||||
* write event ---> read event ---> destroy event [pass]
|
||||
* write event ---> destroy event ---> read event [fail]
|
||||
*/
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
|
|
@ -111,7 +111,7 @@ static UINT32 Testcase(void)
|
|||
} else if ((g_ret1 == 0x00) && (g_ret2 == LOS_OK) && (g_ret3 == LOS_OK)) {
|
||||
/*
|
||||
* (g_ret1 == 0) && (g_ret2 == 0) && (uwRet3 == 0)
|
||||
* try read -->write event ---resume read---> destory event ---> read event [fail]
|
||||
* try read -->write event ---resume read---> destroy event ---> read event [fail]
|
||||
*/
|
||||
} else {
|
||||
ICUNIT_GOTO_EQUAL(1, 0, g_ret1, EXIT);
|
||||
|
|
|
@ -100,13 +100,13 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_EventWrite(&g_event, 0x11); // try to wake task f01
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
// 100, Set the timeout of runtime; 2, test runing count
|
||||
// 100, Set the timeout of runtime; 2, test running count
|
||||
TestAssertBusyTaskDelay(100, 2); // cause tasklock on other cpu ,so task f01 wake failed
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
g_runFlag = 0; // unlock the other cpu
|
||||
// 100, Set the timeout of runtime; 4, test runing count
|
||||
// 100, Set the timeout of runtime; 4, test running count
|
||||
TestAssertBusyTaskDelay(100, 4); // not schedule in current cpu cause tasklock
|
||||
EXIT:
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
LOS_TaskDelay(2); // test task's prio be seted 22
|
||||
LOS_TaskDelay(2); // test task's prio be set 22
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT);
|
||||
|
||||
LOS_TaskLock();
|
||||
|
|
|
@ -70,7 +70,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
ret = LOS_QueueDelete(g_testQueueID01);
|
||||
|
|
|
@ -94,7 +94,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT);
|
||||
|
||||
EXIT:
|
||||
|
|
|
@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||
|
||||
ret = LOS_QueueDelete(g_testQueueID01);
|
||||
|
|
|
@ -90,7 +90,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
TestHwiTrigger(HWI_NUM_TEST);
|
||||
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||
|
||||
ret = LOS_QueueDelete(g_testQueueID01);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue