提交 0f878feb 编写于 作者: K kenneth

chore: 修复社区反馈问题Percpu结构体注释错误

修复社区反馈问题Percpu结构体注释错误,排查下其他拼写错误。

close #I4GMLH
Signed-off-by: Nkenneth <zhushangyuan@huawei.com>
上级 f63ce993
...@@ -46,7 +46,7 @@ int Chdir(const char *tgtDir) ...@@ -46,7 +46,7 @@ int Chdir(const char *tgtDir)
ret = chdir(tgtDir); ret = chdir(tgtDir);
if (ret == 0) { if (ret == 0) {
ret = OsShellSetWorkingDirtectory(tgtDir, strlen(tgtDir) + 1); /* 1: the length of '\0' */ ret = OsShellSetWorkingDirectory(tgtDir, strlen(tgtDir) + 1); /* 1: the length of '\0' */
} }
return ret; return ret;
......
...@@ -53,7 +53,7 @@ typedef struct { ...@@ -53,7 +53,7 @@ typedef struct {
} CmdKeyLink; } CmdKeyLink;
#define NEED_NEW_LINE(timesPrint, lineCap) ((timesPrint) % (lineCap) == 0) #define NEED_NEW_LINE(timesPrint, lineCap) ((timesPrint) % (lineCap) == 0)
#define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIGNT)) #define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIGHT))
extern unsigned int OsCmdExec(CmdParsed *cmdParsed, char *cmdStr); extern unsigned int OsCmdExec(CmdParsed *cmdParsed, char *cmdStr);
extern unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size); extern unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size);
...@@ -62,7 +62,7 @@ extern void OsShellCmdPush(const char *string, CmdKeyLink *cmdKeyLink); ...@@ -62,7 +62,7 @@ extern void OsShellCmdPush(const char *string, CmdKeyLink *cmdKeyLink);
extern void OsShellHistoryShow(unsigned int value, ShellCB *shellCB); extern void OsShellHistoryShow(unsigned int value, ShellCB *shellCB);
extern unsigned int OsShellKeyInit(ShellCB *shellCB); extern unsigned int OsShellKeyInit(ShellCB *shellCB);
extern void OsShellKeyDeInit(CmdKeyLink *cmdKeyLink); extern void OsShellKeyDeInit(CmdKeyLink *cmdKeyLink);
extern int OsShellSetWorkingDirtectory(const char *dir, size_t len); extern int OsShellSetWorkingDirectory(const char *dir, size_t len);
#ifdef __cplusplus #ifdef __cplusplus
#if __cplusplus #if __cplusplus
......
...@@ -54,7 +54,7 @@ extern "C" { ...@@ -54,7 +54,7 @@ extern "C" {
#define CMD_HISTORY_LEN 10 #define CMD_HISTORY_LEN 10
#define CMD_MAX_PATH 256 #define CMD_MAX_PATH 256
#define DEFAULT_SCREEN_WIDTH 80 #define DEFAULT_SCREEN_WIDTH 80
#define DEFAULT_SCREEN_HEIGNT 24 #define DEFAULT_SCREEN_HEIGHT 24
#define SWITCH_QUOTES_STATUS(qu) do { \ #define SWITCH_QUOTES_STATUS(qu) do { \
if ((qu) == TRUE) { \ if ((qu) == TRUE) { \
......
...@@ -42,7 +42,7 @@ extern "C" { ...@@ -42,7 +42,7 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __cplusplus */ #endif /* __cplusplus */
extern char *OsShellGetWorkingDirtectory(void); extern char *OsShellGetWorkingDirectory(void);
extern unsigned int OsShellInit(void); extern unsigned int OsShellInit(void);
extern int OsShellDeinit(ShellCB *shellCB); extern int OsShellDeinit(ShellCB *shellCB);
extern ShellCB *OsGetShellCb(void); extern ShellCB *OsGetShellCb(void);
......
...@@ -91,12 +91,12 @@ static int OsStrSeparateTabStrGet(const char **tabStr, CmdParsed *parsed, unsign ...@@ -91,12 +91,12 @@ static int OsStrSeparateTabStrGet(const char **tabStr, CmdParsed *parsed, unsign
return SH_OK; return SH_OK;
} }
char *OsShellGetWorkingDirtectory() char *OsShellGetWorkingDirectory(void)
{ {
return OsGetShellCb()->shellWorkingDirectory; return OsGetShellCb()->shellWorkingDirectory;
} }
int OsShellSetWorkingDirtectory(const char *dir, size_t len) int OsShellSetWorkingDirectory(const char *dir, size_t len)
{ {
if (dir == NULL) { if (dir == NULL) {
return SH_NOK; return SH_NOK;
...@@ -115,7 +115,7 @@ static int OsStrSeparate(const char *tabStr, char *strPath, char *nameLooking, u ...@@ -115,7 +115,7 @@ static int OsStrSeparate(const char *tabStr, char *strPath, char *nameLooking, u
char *strEnd = NULL; char *strEnd = NULL;
char *cutPos = NULL; char *cutPos = NULL;
CmdParsed parsed = {0}; CmdParsed parsed = {0};
char *shellWorkingDirectory = OsShellGetWorkingDirtectory(); char *shellWorkingDirectory = OsShellGetWorkingDirectory();
int ret; int ret;
ret = OsStrSeparateTabStrGet(&tabStr, &parsed, tabStrLen); ret = OsStrSeparateTabStrGet(&tabStr, &parsed, tabStrLen);
...@@ -223,7 +223,7 @@ static int OsPrintMatchList(unsigned int count, const char *strPath, const char ...@@ -223,7 +223,7 @@ static int OsPrintMatchList(unsigned int count, const char *strPath, const char
return (int)SH_ERROR; return (int)SH_ERROR;
} }
if (count > (lineCap * DEFAULT_SCREEN_HEIGNT)) { if (count > (lineCap * DEFAULT_SCREEN_HEIGHT)) {
ret = OsSurePrintAll(count); ret = OsSurePrintAll(count);
if (ret != 1) { if (ret != 1) {
return ret; return ret;
...@@ -375,10 +375,10 @@ static int OsTabMatchFile(char *cmdKey, unsigned int *len) ...@@ -375,10 +375,10 @@ static int OsTabMatchFile(char *cmdKey, unsigned int *len)
} }
/* /*
* Description: Pass in the string and clear useless space ,which inlcude: * Description: Pass in the string and clear useless space ,which include:
* 1) The overmatch space which is not be marked by Quote's area * 1) The overmatch space which is not be marked by Quote's area
* Squeeze the overmatch space into one space * Squeeze the overmatch space into one space
* 2) Clear all space before first vaild charatctor * 2) Clear all space before first valid charatctor
* Input: cmdKey : Pass in the buff string, which is ready to be operated * Input: cmdKey : Pass in the buff string, which is ready to be operated
* cmdOut : Pass out the buffer string ,which has already been operated * cmdOut : Pass out the buffer string ,which has already been operated
* size : cmdKey length * size : cmdKey length
...@@ -407,7 +407,7 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size) ...@@ -407,7 +407,7 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size)
/* Backup the 'output' start address */ /* Backup the 'output' start address */
outputBak = output; outputBak = output;
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invaild charactor */ /* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */
for (; *cmdKey != '\0'; cmdKey++) { for (; *cmdKey != '\0'; cmdKey++) {
/* Detected a Double Quotes, switch the matching status */ /* Detected a Double Quotes, switch the matching status */
if (*(cmdKey) == '\"') { if (*(cmdKey) == '\"') {
...@@ -417,7 +417,7 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size) ...@@ -417,7 +417,7 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size)
/* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */ /* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */
/* 2) Current charactor is a space */ /* 2) Current charactor is a space */
/* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */ /* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */
/* 4) Invaild charactor, such as single quotes */ /* 4) Invalid charactor, such as single quotes */
if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) { if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) {
continue; continue;
} }
......
...@@ -133,7 +133,7 @@ int ShellNotify(ShellCB *shellCB) ...@@ -133,7 +133,7 @@ int ShellNotify(ShellCB *shellCB)
} }
enum { enum {
STAT_NOMAL_KEY, STAT_NORMAL_KEY,
STAT_ESC_KEY, STAT_ESC_KEY,
STAT_MULTI_KEY STAT_MULTI_KEY
}; };
...@@ -152,23 +152,23 @@ static int ShellCmdLineCheckUDRL(const char ch, ShellCB *shellCB) ...@@ -152,23 +152,23 @@ static int ShellCmdLineCheckUDRL(const char ch, ShellCB *shellCB)
} else if (ch == 0x41) { /* up */ } else if (ch == 0x41) { /* up */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
OsShellHistoryShow(CMD_KEY_UP, shellCB); OsShellHistoryShow(CMD_KEY_UP, shellCB);
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} else if (ch == 0x42) { /* down */ } else if (ch == 0x42) { /* down */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
OsShellHistoryShow(CMD_KEY_DOWN, shellCB); OsShellHistoryShow(CMD_KEY_DOWN, shellCB);
return ret; return ret;
} }
} else if (ch == 0x43) { /* right */ } else if (ch == 0x43) { /* right */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} else if (ch == 0x44) { /* left */ } else if (ch == 0x44) { /* left */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} }
...@@ -265,7 +265,7 @@ void ParseNormalChar(char ch, OutputFunc outputFunc, ShellCB *shellCB) ...@@ -265,7 +265,7 @@ void ParseNormalChar(char ch, OutputFunc outputFunc, ShellCB *shellCB)
outputFunc("%c", ch); outputFunc("%c", ch);
} }
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
} }
void ShellCmdLineParse(char c, OutputFunc outputFunc, ShellCB *shellCB) void ShellCmdLineParse(char c, OutputFunc outputFunc, ShellCB *shellCB)
...@@ -459,7 +459,7 @@ static void ParseAndExecCmdline(CmdParsed *cmdParsed, const char *cmdline, unsig ...@@ -459,7 +459,7 @@ static void ParseAndExecCmdline(CmdParsed *cmdParsed, const char *cmdline, unsig
DoCmdExec(cmdName, cmdlineOrigin, len, cmdParsed); DoCmdExec(cmdName, cmdlineOrigin, len, cmdParsed);
if (getcwd(shellWorkingDirectory, PATH_MAX) != NULL) { if (getcwd(shellWorkingDirectory, PATH_MAX) != NULL) {
(void)OsShellSetWorkingDirtectory(shellWorkingDirectory, (PATH_MAX + 1)); (void)OsShellSetWorkingDirectory(shellWorkingDirectory, (PATH_MAX + 1));
} }
OUT: OUT:
......
...@@ -244,7 +244,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3 ...@@ -244,7 +244,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3
STATIC VOID OsExcType(UINT32 excType, ExcContext *excBufAddr, UINT32 far, UINT32 fsr) STATIC VOID OsExcType(UINT32 excType, ExcContext *excBufAddr, UINT32 far, UINT32 fsr)
{ {
/* undefinited exception handling or software interrupt */ /* undefined exception handling or software interrupt */
if ((excType == OS_EXCEPT_UNDEF_INSTR) || (excType == OS_EXCEPT_SWI)) { if ((excType == OS_EXCEPT_UNDEF_INSTR) || (excType == OS_EXCEPT_SWI)) {
if ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */ if ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */
excBufAddr->PC = excBufAddr->PC - ARM_INSTR_LEN; excBufAddr->PC = excBufAddr->PC - ARM_INSTR_LEN;
...@@ -479,7 +479,7 @@ STATIC VOID OsDumpProcessUsedMemRegion(LosProcessCB *runProcess, LosVmSpace *run ...@@ -479,7 +479,7 @@ STATIC VOID OsDumpProcessUsedMemRegion(LosProcessCB *runProcess, LosVmSpace *run
RB_SCAN_SAFE_END(&space->regionRbTree, pstRbNodeTemp, pstRbNodeNext) RB_SCAN_SAFE_END(&space->regionRbTree, pstRbNodeTemp, pstRbNodeNext)
} }
STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs) STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFlags)
{ {
LosProcessCB *runProcess = NULL; LosProcessCB *runProcess = NULL;
LosVmSpace *runspace = NULL; LosVmSpace *runspace = NULL;
...@@ -500,7 +500,7 @@ STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs) ...@@ -500,7 +500,7 @@ STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs)
return; return;
} }
OsDumpProcessUsedMemRegion(runProcess, runspace, vmmFalgs); OsDumpProcessUsedMemRegion(runProcess, runspace, vmmFlags);
return; return;
} }
#endif #endif
...@@ -1048,7 +1048,7 @@ STATIC VOID OsCheckAllCpuStatus(VOID) ...@@ -1048,7 +1048,7 @@ STATIC VOID OsCheckAllCpuStatus(VOID)
LOCKDEP_CLEAR_LOCKS(); LOCKDEP_CLEAR_LOCKS();
LOS_SpinLock(&g_excSerializerSpin); LOS_SpinLock(&g_excSerializerSpin);
/* Only the current nuclear anomaly */ /* Only the current CPU anomaly */
if (g_currHandleExcCpuID == INVALID_CPUID) { if (g_currHandleExcCpuID == INVALID_CPUID) {
g_currHandleExcCpuID = currCpuID; g_currHandleExcCpuID = currCpuID;
g_currHandleExcPID = OsCurrProcessGet()->processID; g_currHandleExcPID = OsCurrProcessGet()->processID;
......
...@@ -172,7 +172,7 @@ VOID HalIrqHandler(VOID) ...@@ -172,7 +172,7 @@ VOID HalIrqHandler(VOID)
OsInterrupt(vector); OsInterrupt(vector);
/* use orignal iar to do the EOI */ /* use original iar to do the EOI */
GIC_REG_32(GICC_EOIR) = iar; GIC_REG_32(GICC_EOIR) = iar;
} }
......
...@@ -998,7 +998,7 @@ INT32 los_part_read(INT32 pt, VOID *buf, UINT64 sector, UINT32 count, BOOL useRe ...@@ -998,7 +998,7 @@ INT32 los_part_read(INT32 pt, VOID *buf, UINT64 sector, UINT32 count, BOOL useRe
} }
if (count > part->sector_count) { if (count > part->sector_count) {
PRINT_ERR("los_part_read failed, invaild count, count = %u\n", count); PRINT_ERR("los_part_read failed, invalid count, count = %u\n", count);
goto ERROR_HANDLE; goto ERROR_HANDLE;
} }
...@@ -1007,7 +1007,7 @@ INT32 los_part_read(INT32 pt, VOID *buf, UINT64 sector, UINT32 count, BOOL useRe ...@@ -1007,7 +1007,7 @@ INT32 los_part_read(INT32 pt, VOID *buf, UINT64 sector, UINT32 count, BOOL useRe
if ((disk->sector_count - part->sector_start) > sector) { if ((disk->sector_count - part->sector_start) > sector) {
sector += part->sector_start; sector += part->sector_start;
} else { } else {
PRINT_ERR("los_part_read failed, invaild sector, sector = %llu\n", sector); PRINT_ERR("los_part_read failed, invalid sector, sector = %llu\n", sector);
goto ERROR_HANDLE; goto ERROR_HANDLE;
} }
} }
...@@ -1054,7 +1054,7 @@ INT32 los_part_write(INT32 pt, const VOID *buf, UINT64 sector, UINT32 count) ...@@ -1054,7 +1054,7 @@ INT32 los_part_write(INT32 pt, const VOID *buf, UINT64 sector, UINT32 count)
} }
if (count > part->sector_count) { if (count > part->sector_count) {
PRINT_ERR("los_part_write failed, invaild count, count = %u\n", count); PRINT_ERR("los_part_write failed, invalid count, count = %u\n", count);
goto ERROR_HANDLE; goto ERROR_HANDLE;
} }
...@@ -1063,7 +1063,7 @@ INT32 los_part_write(INT32 pt, const VOID *buf, UINT64 sector, UINT32 count) ...@@ -1063,7 +1063,7 @@ INT32 los_part_write(INT32 pt, const VOID *buf, UINT64 sector, UINT32 count)
if ((disk->sector_count - part->sector_start) > sector) { if ((disk->sector_count - part->sector_start) > sector) {
sector += part->sector_start; sector += part->sector_start;
} else { } else {
PRINT_ERR("los_part_write failed, invaild sector, sector = %llu\n", sector); PRINT_ERR("los_part_write failed, invalid sector, sector = %llu\n", sector);
goto ERROR_HANDLE; goto ERROR_HANDLE;
} }
} }
......
...@@ -27,7 +27,7 @@ config FS_FAT_CHINESE ...@@ -27,7 +27,7 @@ config FS_FAT_CHINESE
Answer Y to enable LiteOS fat filesystem support Chinese. Answer Y to enable LiteOS fat filesystem support Chinese.
config FS_FAT_VIRTUAL_PARTITION config FS_FAT_VIRTUAL_PARTITION
bool "Enabel Virtual Partition" bool "Enable Virtual Partition"
default n default n
depends on FS_FAT depends on FS_FAT
......
...@@ -267,7 +267,7 @@ static FRESULT FatfsScanClear(INT vol) ...@@ -267,7 +267,7 @@ static FRESULT FatfsScanClear(INT vol)
* Acceptable Return Value: * Acceptable Return Value:
* - FR_OK : The root directory is completely clean. * - FR_OK : The root directory is completely clean.
* - FR_OCCUPIED : The virtual partition entry has been occupied by the same name file. * - FR_OCCUPIED : The virtual partition entry has been occupied by the same name file.
* - FR_CHAIN_ERR : The virtual partition entry has been rebuilt along the invaild cluster * - FR_CHAIN_ERR : The virtual partition entry has been rebuilt along the invalid cluster
* chain. * chain.
* Others Return Value: * Others Return Value:
* Followed the by the lower API * Followed the by the lower API
......
...@@ -53,7 +53,7 @@ extern FATFS *FatFs[FF_VOLUMES]; ...@@ -53,7 +53,7 @@ extern FATFS *FatFs[FF_VOLUMES];
* follow_virentry: * follow_virentry:
* Compare the top segment with the virtual partition entry and replace it to its CHILD FATFS * Compare the top segment with the virtual partition entry and replace it to its CHILD FATFS
* *
* Acceptable return vaule: * Acceptable return value:
* - FR_OK : The top segment matches one of the virtual partition entries, and the FATFS * - FR_OK : The top segment matches one of the virtual partition entries, and the FATFS
* has been replaced to the corresponding FATFS. * has been replaced to the corresponding FATFS.
* - FR_DENIED : The top segment does not matched any of the virtual partition entries, and * - FR_DENIED : The top segment does not matched any of the virtual partition entries, and
...@@ -291,7 +291,7 @@ static void FatfsSetParentFs(FATFS *pfs, FATFS *fs) ...@@ -291,7 +291,7 @@ static void FatfsSetParentFs(FATFS *pfs, FATFS *fs)
* - FR_DENIED : The virtual partition feature has been shut down by switcher * - FR_DENIED : The virtual partition feature has been shut down by switcher
* - FR_DISK_ERR : A disk error happened * - FR_DISK_ERR : A disk error happened
* - FR_NOT_ENOUGH_CORE : Not enough memory for allocate space for CHILD FATFS * - FR_NOT_ENOUGH_CORE : Not enough memory for allocate space for CHILD FATFS
* - FR_INVALID_PARAMETER : There is a invaild value in current setting * - FR_INVALID_PARAMETER : There is a invalid value in current setting
*/ */
FRESULT f_regvirfs(FATFS *fs) FRESULT f_regvirfs(FATFS *fs)
{ {
...@@ -507,7 +507,7 @@ static void FatfsSetChildClst(BYTE *work, FATFS *fs, WORD i) ...@@ -507,7 +507,7 @@ static void FatfsSetChildClst(BYTE *work, FATFS *fs, WORD i)
* - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried * - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried
* - FR_DENIED : The virtual partition feature has been shut down by switcher * - FR_DENIED : The virtual partition feature has been shut down by switcher
* - FR_INVALID_DRIVE : The drive index is error * - FR_INVALID_DRIVE : The drive index is error
* - FR_DISK_ERR : A Disk error happend * - FR_DISK_ERR : A Disk error happened
*/ */
FRESULT f_checkvirpart(FATFS *fs, const TCHAR *path, BYTE vol) FRESULT f_checkvirpart(FATFS *fs, const TCHAR *path, BYTE vol)
{ {
...@@ -663,7 +663,7 @@ static void FatfsClacPartInfo(FATFS *fs, DOUBLE virpartper, UINT i) ...@@ -663,7 +663,7 @@ static void FatfsClacPartInfo(FATFS *fs, DOUBLE virpartper, UINT i)
* - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried * - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried
* - FR_DENIED : The virtual partition feature has been shut down by switcher * - FR_DENIED : The virtual partition feature has been shut down by switcher
* - FR_INVALID_DRIVE : The drive index is error * - FR_INVALID_DRIVE : The drive index is error
* - FR_DISK_ERR : A Disk error happend * - FR_DISK_ERR : A Disk error happened
*/ */
FRESULT f_makevirpart(FATFS *fs, const TCHAR *path, BYTE vol) FRESULT f_makevirpart(FATFS *fs, const TCHAR *path, BYTE vol)
{ {
...@@ -797,7 +797,7 @@ FRESULT f_getvirfree(const TCHAR *path, DWORD *nclst, DWORD *cclst) ...@@ -797,7 +797,7 @@ FRESULT f_getvirfree(const TCHAR *path, DWORD *nclst, DWORD *cclst)
/* If current FATFS is a CHILD FATFS */ /* If current FATFS is a CHILD FATFS */
if (ISCHILD(fs)) { if (ISCHILD(fs)) {
/* If CHILD FATFS' free_clst is invaild, the scan the FAT and update it */ /* If CHILD FATFS' free_clst is invalid, the scan the FAT and update it */
if (fs->free_clst > fs->ct_clst) { if (fs->free_clst > fs->ct_clst) {
dj.obj.fs = fs; dj.obj.fs = fs;
fs->free_clst = fs->ct_clst; fs->free_clst = fs->ct_clst;
......
...@@ -44,14 +44,14 @@ extern "C" { ...@@ -44,14 +44,14 @@ extern "C" {
#define PATH_MAX 256 #define PATH_MAX 256
#define CONFIG_DISABLE_MQUEUE // disable posix mqueue inode configure #define CONFIG_DISABLE_MQUEUE // disable posix mqueue inode configure
/* file system configur */ /* file system config */
#define CONFIG_FS_WRITABLE // enable file system can be written #define CONFIG_FS_WRITABLE // enable file system can be written
#define CONFIG_FS_READABLE // enable file system can be read #define CONFIG_FS_READABLE // enable file system can be read
#define CONFIG_DEBUG_FS // enable vfs debug function #define CONFIG_DEBUG_FS // enable vfs debug function
/* fatfs cache configur */ /* fatfs cache config */
/* config block size for fat file system, only can be 0,32,64,128,256,512,1024 */ /* config block size for fat file system, only can be 0,32,64,128,256,512,1024 */
#define CONFIG_FS_FAT_SECTOR_PER_BLOCK 64 #define CONFIG_FS_FAT_SECTOR_PER_BLOCK 64
......
...@@ -84,7 +84,7 @@ int osShellCmdDoChdir(const char *path) ...@@ -84,7 +84,7 @@ int osShellCmdDoChdir(const char *path)
char *fullpath = NULL; char *fullpath = NULL;
char *fullpath_bak = NULL; char *fullpath_bak = NULL;
int ret; int ret;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -136,7 +136,7 @@ int osShellCmdLs(int argc, const char **argv) ...@@ -136,7 +136,7 @@ int osShellCmdLs(int argc, const char **argv)
char *fullpath = NULL; char *fullpath = NULL;
const char *filename = NULL; const char *filename = NULL;
int ret; int ret;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -182,7 +182,7 @@ int osShellCmdDoCatShow(UINTPTR arg) ...@@ -182,7 +182,7 @@ int osShellCmdDoCatShow(UINTPTR arg)
{ {
int ret = 0; int ret = 0;
char buf[CAT_BUF_SIZE]; char buf[CAT_BUF_SIZE];
size_t size, writen, toWrite; size_t size, written, toWrite;
ssize_t cnt; ssize_t cnt;
char *fullpath = (char *)arg; char *fullpath = (char *)arg;
FILE *ini = NULL; FILE *ini = NULL;
...@@ -207,9 +207,9 @@ int osShellCmdDoCatShow(UINTPTR arg) ...@@ -207,9 +207,9 @@ int osShellCmdDoCatShow(UINTPTR arg)
goto out_with_fclose; goto out_with_fclose;
} }
for (toWrite = size, writen = 0; toWrite > 0;) for (toWrite = size, written = 0; toWrite > 0;)
{ {
cnt = write(1, buf + writen, toWrite); cnt = write(1, buf + written, toWrite);
if (cnt == 0) if (cnt == 0)
{ {
/* avoid task-starvation */ /* avoid task-starvation */
...@@ -222,7 +222,7 @@ int osShellCmdDoCatShow(UINTPTR arg) ...@@ -222,7 +222,7 @@ int osShellCmdDoCatShow(UINTPTR arg)
break; break;
} }
writen += cnt; written += cnt;
toWrite -= cnt; toWrite -= cnt;
} }
} }
...@@ -243,7 +243,7 @@ int osShellCmdCat(int argc, const char **argv) ...@@ -243,7 +243,7 @@ int osShellCmdCat(int argc, const char **argv)
unsigned int ca_task; unsigned int ca_task;
struct Vnode *vnode = NULL; struct Vnode *vnode = NULL;
TSK_INIT_PARAM_S init_param; TSK_INIT_PARAM_S init_param;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -329,7 +329,7 @@ int osShellCmdMount(int argc, const char **argv) ...@@ -329,7 +329,7 @@ int osShellCmdMount(int argc, const char **argv)
char *data = NULL; char *data = NULL;
char *filessystemtype = NULL; char *filessystemtype = NULL;
unsigned long mountfalgs; unsigned long mountfalgs;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -461,7 +461,7 @@ int osShellCmdUmount(int argc, const char **argv) ...@@ -461,7 +461,7 @@ int osShellCmdUmount(int argc, const char **argv)
char *target_path = NULL; char *target_path = NULL;
int cmp_num; int cmp_num;
char *work_path = NULL; char *work_path = NULL;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -506,7 +506,7 @@ int osShellCmdMkdir(int argc, const char **argv) ...@@ -506,7 +506,7 @@ int osShellCmdMkdir(int argc, const char **argv)
int ret; int ret;
char *fullpath = NULL; char *fullpath = NULL;
const char *filename = NULL; const char *filename = NULL;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -531,7 +531,7 @@ int osShellCmdPwd(int argc, const char **argv) ...@@ -531,7 +531,7 @@ int osShellCmdPwd(int argc, const char **argv)
{ {
char buf[SHOW_MAX_LEN] = {0}; char buf[SHOW_MAX_LEN] = {0};
DIR *dir = NULL; DIR *dir = NULL;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -577,7 +577,7 @@ int osShellCmdStatfs(int argc, const char **argv) ...@@ -577,7 +577,7 @@ int osShellCmdStatfs(int argc, const char **argv)
unsigned long long total_size, free_size; unsigned long long total_size, free_size;
char *fullpath = NULL; char *fullpath = NULL;
const char *filename = NULL; const char *filename = NULL;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -618,7 +618,7 @@ int osShellCmdTouch(int argc, const char **argv) ...@@ -618,7 +618,7 @@ int osShellCmdTouch(int argc, const char **argv)
int fd = -1; int fd = -1;
char *fullpath = NULL; char *fullpath = NULL;
const char *filename = NULL; const char *filename = NULL;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -659,7 +659,7 @@ static int os_shell_cmd_do_cp(const char *src_filepath, const char *dst_filename ...@@ -659,7 +659,7 @@ static int os_shell_cmd_do_cp(const char *src_filepath, const char *dst_filename
int dst_fd = -1; int dst_fd = -1;
struct stat stat_buf; struct stat stat_buf;
mode_t src_mode; mode_t src_mode;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -1162,7 +1162,7 @@ int osShellCmdCp(int argc, const char **argv) ...@@ -1162,7 +1162,7 @@ int osShellCmdCp(int argc, const char **argv)
char *dst_fullpath = NULL; char *dst_fullpath = NULL;
struct stat stat_buf; struct stat stat_buf;
int count = 0; int count = 0;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -1266,7 +1266,7 @@ int osShellCmdRm(int argc, const char **argv) ...@@ -1266,7 +1266,7 @@ int osShellCmdRm(int argc, const char **argv)
int ret = 0; int ret = 0;
char *fullpath = NULL; char *fullpath = NULL;
const char *filename = NULL; const char *filename = NULL;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -1319,7 +1319,7 @@ int osShellCmdRmdir(int argc, const char **argv) ...@@ -1319,7 +1319,7 @@ int osShellCmdRmdir(int argc, const char **argv)
int ret; int ret;
char *fullpath = NULL; char *fullpath = NULL;
const char *filename = NULL; const char *filename = NULL;
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -1450,7 +1450,7 @@ int osShellCmdChmod(int argc, const char **argv) ...@@ -1450,7 +1450,7 @@ int osShellCmdChmod(int argc, const char **argv)
} }
filename = argv[1]; filename = argv[1];
shell_working_directory = OsShellGetWorkingDirtectory(); shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -1509,7 +1509,7 @@ int osShellCmdChown(int argc, const char **argv) ...@@ -1509,7 +1509,7 @@ int osShellCmdChown(int argc, const char **argv)
attr.attr_chg_valid |= CHG_UID; attr.attr_chg_valid |= CHG_UID;
} }
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) if (shell_working_directory == NULL)
{ {
return -1; return -1;
...@@ -1547,7 +1547,7 @@ int osShellCmdChgrp(int argc, const char **argv) ...@@ -1547,7 +1547,7 @@ int osShellCmdChgrp(int argc, const char **argv)
attr.attr_chg_valid |= CHG_GID; attr.attr_chg_valid |= CHG_GID;
} }
char *shell_working_directory = OsShellGetWorkingDirtectory(); char *shell_working_directory = OsShellGetWorkingDirectory();
if (shell_working_directory == NULL) { if (shell_working_directory == NULL) {
return -1; return -1;
} }
......
...@@ -6,11 +6,11 @@ config KERNEL_SMP ...@@ -6,11 +6,11 @@ config KERNEL_SMP
This option will enable smp support of LiteOS. This option will enable smp support of LiteOS.
config KERNEL_SMP_CORE_NUM config KERNEL_SMP_CORE_NUM
int "Muti-processing Core Numbers" int "Multi-processing Core Numbers"
default 2 default 2
depends on KERNEL_SMP depends on KERNEL_SMP
help help
This represents the number of muti-processing cores. This represents the number of multi-processing cores.
config KERNEL_SMP_LOCKDEP config KERNEL_SMP_LOCKDEP
bool "Enable Spinlock Lockdep Check" bool "Enable Spinlock Lockdep Check"
...@@ -38,7 +38,7 @@ config KERNEL_SCHED_STATISTICS ...@@ -38,7 +38,7 @@ config KERNEL_SCHED_STATISTICS
default n default n
depends on KERNEL_SMP depends on KERNEL_SMP
help help
This option will enable schedulder statistics. This option will enable scheduler statistics.
config KERNEL_MMU config KERNEL_MMU
bool "Enable MMU" bool "Enable MMU"
......
...@@ -505,7 +505,7 @@ LITE_OS_SEC_TEXT VOID OsTaskResourcesToFree(LosTaskCB *taskCB) ...@@ -505,7 +505,7 @@ LITE_OS_SEC_TEXT VOID OsTaskResourcesToFree(LosTaskCB *taskCB)
LOS_ASSERT(!(processCB->vmSpace == NULL)); LOS_ASSERT(!(processCB->vmSpace == NULL));
UINT32 ret = OsUnMMap(processCB->vmSpace, (UINTPTR)mapBase, mapSize); UINT32 ret = OsUnMMap(processCB->vmSpace, (UINTPTR)mapBase, mapSize);
if ((ret != LOS_OK) && (mapBase != 0) && !(processCB->processStatus & OS_PROCESS_STATUS_INIT)) { if ((ret != LOS_OK) && (mapBase != 0) && !(processCB->processStatus & OS_PROCESS_STATUS_INIT)) {
PRINT_ERR("process(%u) ummap user task(%u) stack failed! mapbase: 0x%x size :0x%x, error: %d\n", PRINT_ERR("process(%u) unmmap user task(%u) stack failed! mapbase: 0x%x size :0x%x, error: %d\n",
processCB->processID, taskCB->taskID, mapBase, mapSize, ret); processCB->processID, taskCB->taskID, mapBase, mapSize, ret);
} }
......
...@@ -56,11 +56,11 @@ typedef struct { ...@@ -56,11 +56,11 @@ typedef struct {
SPIN_LOCK_S taskSortLinkSpin; /* task sort link spin lock */ SPIN_LOCK_S taskSortLinkSpin; /* task sort link spin lock */
SortLinkAttribute swtmrSortLink; /* swtmr sort link */ SortLinkAttribute swtmrSortLink; /* swtmr sort link */
SPIN_LOCK_S swtmrSortLinkSpin; /* swtmr sort link spin lock */ SPIN_LOCK_S swtmrSortLinkSpin; /* swtmr sort link spin lock */
UINT64 responseTime; /* Response time for current nuclear Tick interrupts */ UINT64 responseTime; /* Response time for current CPU tick interrupts */
UINT64 tickStartTime; /* The time when the tick interrupt starts processing */ UINT64 tickStartTime; /* The time when the tick interrupt starts processing */
UINT32 responseID; /* The response ID of the current nuclear TICK interrupt */ UINT32 responseID; /* The response ID of the current CPU tick interrupt */
UINTPTR runProcess; /* The address of the process control block pointer to which UINTPTR runProcess; /* The address of the process control block pointer to which
the current kernel is running */ the current CPU is running */
UINT32 idleTaskID; /* idle task id */ UINT32 idleTaskID; /* idle task id */
UINT32 taskLockCnt; /* task lock flag */ UINT32 taskLockCnt; /* task lock flag */
UINT32 swtmrHandlerQueue; /* software timer timeout queue id */ UINT32 swtmrHandlerQueue; /* software timer timeout queue id */
......
...@@ -78,7 +78,7 @@ STATIC VOID OsSemPendedTaskNamePrint(LosSemCB *semNode) ...@@ -78,7 +78,7 @@ STATIC VOID OsSemPendedTaskNamePrint(LosSemCB *semNode)
#ifdef LOSCFG_DEBUG_SEMAPHORE #ifdef LOSCFG_DEBUG_SEMAPHORE
typedef struct { typedef struct {
UINT16 origSemCount; /* Number of orignal available semaphores */ UINT16 origSemCount; /* Number of original available semaphores */
UINT64 lastAccessTime; /* The last operation time */ UINT64 lastAccessTime; /* The last operation time */
TSK_ENTRY_FUNC creater; /* The task entry who created this sem */ TSK_ENTRY_FUNC creater; /* The task entry who created this sem */
} SemDebugCB; } SemDebugCB;
...@@ -235,7 +235,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID) ...@@ -235,7 +235,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID)
return LOS_OK; return LOS_OK;
} else { } else {
if (GET_SEM_INDEX(semID) >= LOSCFG_BASE_IPC_SEM_LIMIT) { if (GET_SEM_INDEX(semID) >= LOSCFG_BASE_IPC_SEM_LIMIT) {
PRINTK("\nInvalid semphore id!\n"); PRINTK("\nInvalid semaphore id!\n");
return LOS_OK; return LOS_OK;
} }
...@@ -244,7 +244,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID) ...@@ -244,7 +244,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID)
(VOID)memcpy_s(&semNode, sizeof(LosSemCB), semCB, sizeof(LosSemCB)); (VOID)memcpy_s(&semNode, sizeof(LosSemCB), semCB, sizeof(LosSemCB));
SCHEDULER_UNLOCK(intSave); SCHEDULER_UNLOCK(intSave);
if ((semNode.semID != semID) || (semNode.semStat != OS_SEM_USED)) { if ((semNode.semID != semID) || (semNode.semStat != OS_SEM_USED)) {
PRINTK("\nThe semphore is not in use!\n"); PRINTK("\nThe semaphore is not in use!\n");
return LOS_OK; return LOS_OK;
} }
...@@ -252,7 +252,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID) ...@@ -252,7 +252,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID)
PRINTK(" 0x%08x 0x%u\n", semNode.semID, semNode.semCount); PRINTK(" 0x%08x 0x%u\n", semNode.semID, semNode.semCount);
if (LOS_ListEmpty(&semNode.semList)) { if (LOS_ListEmpty(&semNode.semList)) {
PRINTK("No task is pended on this semphore!\n"); PRINTK("No task is pended on this semaphore!\n");
return LOS_OK; return LOS_OK;
} else { } else {
OsSemPendedTaskNamePrint(semCB); OsSemPendedTaskNamePrint(semCB);
......
...@@ -555,7 +555,7 @@ int OsSigTimedWaitNoLock(sigset_t *set, siginfo_t *info, unsigned int timeout) ...@@ -555,7 +555,7 @@ int OsSigTimedWaitNoLock(sigset_t *set, siginfo_t *info, unsigned int timeout)
if (sigcb->waitList.pstNext == NULL) { if (sigcb->waitList.pstNext == NULL) {
LOS_ListInit(&sigcb->waitList); LOS_ListInit(&sigcb->waitList);
} }
/* If pendingflag & set > 0, shound clear pending flag */ /* If pendingflag & set > 0, should clear pending flag */
sigset_t clear = sigcb->sigPendFlag & *set; sigset_t clear = sigcb->sigPendFlag & *set;
if (clear) { if (clear) {
sigcb->sigPendFlag ^= clear; sigcb->sigPendFlag ^= clear;
......
...@@ -189,7 +189,7 @@ STATIC BOOL OsLockDepCheckDependancy(const LosTaskCB *current, LosTaskCB *lockOw ...@@ -189,7 +189,7 @@ STATIC BOOL OsLockDepCheckDependancy(const LosTaskCB *current, LosTaskCB *lockOw
VOID OsLockDepCheckIn(SPIN_LOCK_S *lock) VOID OsLockDepCheckIn(SPIN_LOCK_S *lock)
{ {
UINT32 intSave; UINT32 intSave;
enum LockDepErrType checkResult = LOCKDEP_SUCEESS; enum LockDepErrType checkResult = LOCKDEP_SUCCESS;
#ifdef LOSCFG_COMPILER_CLANG_LLVM #ifdef LOSCFG_COMPILER_CLANG_LLVM
VOID *requestAddr = (VOID *)__builtin_return_address(1); VOID *requestAddr = (VOID *)__builtin_return_address(1);
#else #else
...@@ -223,10 +223,10 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock) ...@@ -223,10 +223,10 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock)
} }
OUT: OUT:
if (checkResult == LOCKDEP_SUCEESS) { if (checkResult == LOCKDEP_SUCCESS) {
/* /*
* though the check may succeed, the waitLock still need to be set. * though the check may succeed, the waitLock still need to be set.
* because the OsLockDepCheckIn and OsLockDepRecord is not strictly muti-core * because the OsLockDepCheckIn and OsLockDepRecord is not strictly multi-core
* sequential, there would be more than two tasks can pass the checking, but * sequential, there would be more than two tasks can pass the checking, but
* only one task can successfully obtain the lock. * only one task can successfully obtain the lock.
*/ */
...@@ -275,7 +275,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock) ...@@ -275,7 +275,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock)
{ {
UINT32 intSave; UINT32 intSave;
INT32 depth; INT32 depth;
enum LockDepErrType checkResult = LOCKDEP_SUCEESS; enum LockDepErrType checkResult = LOCKDEP_SUCCESS;
#ifdef LOSCFG_COMPILER_CLANG_LLVM #ifdef LOSCFG_COMPILER_CLANG_LLVM
VOID *requestAddr = (VOID *)__builtin_return_address(1); VOID *requestAddr = (VOID *)__builtin_return_address(1);
#else #else
......
...@@ -140,7 +140,7 @@ STATIC STATUS_T OsDoReadFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault) ...@@ -140,7 +140,7 @@ STATIC STATUS_T OsDoReadFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault)
return LOS_ERRNO_VM_NO_MEMORY; return LOS_ERRNO_VM_NO_MEMORY;
} }
/* unmap a page when cow happend only */ /* unmap a page when cow happened only */
STATIC LosVmPage *OsCowUnmapOrg(LosArchMmu *archMmu, LosVmMapRegion *region, LosVmPgFault *vmf) STATIC LosVmPage *OsCowUnmapOrg(LosArchMmu *archMmu, LosVmMapRegion *region, LosVmPgFault *vmf)
{ {
UINT32 intSave; UINT32 intSave;
......
...@@ -141,9 +141,9 @@ LosMapInfo *OsGetMapInfo(LosFilePage *page, LosArchMmu *archMmu, VADDR_T vaddr) ...@@ -141,9 +141,9 @@ LosMapInfo *OsGetMapInfo(LosFilePage *page, LosArchMmu *archMmu, VADDR_T vaddr)
VOID OsDeletePageCacheLru(LosFilePage *page) VOID OsDeletePageCacheLru(LosFilePage *page)
{ {
/* delete form lru list */ /* delete from lru list */
OsLruCacheDel(page); OsLruCacheDel(page);
/* delete from cache lits and free pmm if need */ /* delete from cache list and free pmm if needed */
OsPageCacheDel(page); OsPageCacheDel(page);
} }
...@@ -155,7 +155,7 @@ STATIC VOID OsPageCacheUnmap(LosFilePage *fpage, LosArchMmu *archMmu, VADDR_T va ...@@ -155,7 +155,7 @@ STATIC VOID OsPageCacheUnmap(LosFilePage *fpage, LosArchMmu *archMmu, VADDR_T va
LOS_SpinLockSave(&fpage->physSeg->lruLock, &intSave); LOS_SpinLockSave(&fpage->physSeg->lruLock, &intSave);
info = OsGetMapInfo(fpage, archMmu, vaddr); info = OsGetMapInfo(fpage, archMmu, vaddr);
if (info == NULL) { if (info == NULL) {
VM_ERR("OsPageCacheUnmap get map info fail!"); VM_ERR("OsPageCacheUnmap get map info failed!");
} else { } else {
OsUnmapPageLocked(fpage, info); OsUnmapPageLocked(fpage, info);
} }
......
...@@ -46,7 +46,7 @@ VOID *LOS_DmaMemAlloc(DMA_ADDR_T *dmaAddr, size_t size, size_t align, enum DmaMe ...@@ -46,7 +46,7 @@ VOID *LOS_DmaMemAlloc(DMA_ADDR_T *dmaAddr, size_t size, size_t align, enum DmaMe
} }
if ((type != DMA_CACHE) && (type != DMA_NOCACHE)) { if ((type != DMA_CACHE) && (type != DMA_NOCACHE)) {
VM_ERR("The dma type = %d is not support!", type); VM_ERR("The dma type = %d is not supported!", type);
return NULL; return NULL;
} }
......
...@@ -217,7 +217,7 @@ VOID OsShrinkActiveList(LosVmPhysSeg *physSeg, int nScan) ...@@ -217,7 +217,7 @@ VOID OsShrinkActiveList(LosVmPhysSeg *physSeg, int nScan)
continue; continue;
} }
/* happend when caller hold cache lock and try reclaim this page */ /* happened when caller hold cache lock and try reclaim this page */
if (OsIsPageLocked(fpage->vmPage)) { if (OsIsPageLocked(fpage->vmPage)) {
LOS_SpinUnlock(&fpage->mapping->list_lock); LOS_SpinUnlock(&fpage->mapping->list_lock);
continue; continue;
......
...@@ -95,7 +95,7 @@ INT32 GetFilepOps(const struct file *filep, struct file **privFilep, const struc ...@@ -95,7 +95,7 @@ INT32 GetFilepOps(const struct file *filep, struct file **privFilep, const struc
goto ERROUT; goto ERROUT;
} }
/* to find uart driver operation function throutht u.i_opss */ /* to find uart driver operation function through u.i_opss */
drv = (struct drv_data *)(*privFilep)->f_vnode->data; drv = (struct drv_data *)(*privFilep)->f_vnode->data;
...@@ -363,7 +363,7 @@ STATIC INLINE VOID UserEndOfRead(CONSOLE_CB *consoleCB, struct file *filep, ...@@ -363,7 +363,7 @@ STATIC INLINE VOID UserEndOfRead(CONSOLE_CB *consoleCB, struct file *filep,
} }
enum { enum {
STAT_NOMAL_KEY, STAT_NORMAL_KEY,
STAT_ESC_KEY, STAT_ESC_KEY,
STAT_MULTI_KEY STAT_MULTI_KEY
}; };
...@@ -381,22 +381,22 @@ STATIC INT32 UserShellCheckUDRL(const CHAR ch, INT32 *lastTokenType) ...@@ -381,22 +381,22 @@ STATIC INT32 UserShellCheckUDRL(const CHAR ch, INT32 *lastTokenType)
} }
} else if (ch == 0x41) { /* up */ } else if (ch == 0x41) { /* up */
if (*lastTokenType == STAT_MULTI_KEY) { if (*lastTokenType == STAT_MULTI_KEY) {
*lastTokenType = STAT_NOMAL_KEY; *lastTokenType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} else if (ch == 0x42) { /* down */ } else if (ch == 0x42) { /* down */
if (*lastTokenType == STAT_MULTI_KEY) { if (*lastTokenType == STAT_MULTI_KEY) {
*lastTokenType = STAT_NOMAL_KEY; *lastTokenType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} else if (ch == 0x43) { /* right */ } else if (ch == 0x43) { /* right */
if (*lastTokenType == STAT_MULTI_KEY) { if (*lastTokenType == STAT_MULTI_KEY) {
*lastTokenType = STAT_NOMAL_KEY; *lastTokenType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} else if (ch == 0x44) { /* left */ } else if (ch == 0x44) { /* left */
if (*lastTokenType == STAT_MULTI_KEY) { if (*lastTokenType == STAT_MULTI_KEY) {
*lastTokenType = STAT_NOMAL_KEY; *lastTokenType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} }
...@@ -458,7 +458,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru ...@@ -458,7 +458,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru
INT32 ret; INT32 ret;
INT32 needreturn = LOS_NOK; INT32 needreturn = LOS_NOK;
CHAR ch; CHAR ch;
INT32 lastTokenType = STAT_NOMAL_KEY; INT32 lastTokenType = STAT_NORMAL_KEY;
if (fops->read == NULL) { if (fops->read == NULL) {
return -EFAULT; return -EFAULT;
...@@ -504,7 +504,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru ...@@ -504,7 +504,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru
break; break;
} }
} else { } else {
/* if data is already in console fifo, we returen them immediately */ /* if data is already in console fifo, we return them immediately */
ret = ConsoleReadFifo(buffer, consoleCB, bufLen); ret = ConsoleReadFifo(buffer, consoleCB, bufLen);
} }
...@@ -738,7 +738,7 @@ ERROUT: ...@@ -738,7 +738,7 @@ ERROUT:
STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen) STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen)
{ {
INT32 cnt; INT32 cnt;
size_t writen = 0; size_t written = 0;
size_t toWrite = bufLen; size_t toWrite = bufLen;
UINT32 intSave; UINT32 intSave;
...@@ -749,18 +749,18 @@ STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen) ...@@ -749,18 +749,18 @@ STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen)
} }
#endif #endif
LOS_CirBufLock(&cirBufSendCB->cirBufCB, &intSave); LOS_CirBufLock(&cirBufSendCB->cirBufCB, &intSave);
while (writen < (INT32)bufLen) { while (written < (INT32)bufLen) {
/* Transform for CR/LR mode */ /* Transform for CR/LR mode */
if ((buffer[writen] == '\n') || (buffer[writen] == '\r')) { if ((buffer[written] == '\n') || (buffer[written] == '\r')) {
(VOID)LOS_CirBufWrite(&cirBufSendCB->cirBufCB, "\r", 1); (VOID)LOS_CirBufWrite(&cirBufSendCB->cirBufCB, "\r", 1);
} }
cnt = LOS_CirBufWrite(&cirBufSendCB->cirBufCB, &buffer[writen], 1); cnt = LOS_CirBufWrite(&cirBufSendCB->cirBufCB, &buffer[written], 1);
if (cnt <= 0) { if (cnt <= 0) {
break; break;
} }
toWrite -= cnt; toWrite -= cnt;
writen += cnt; written += cnt;
} }
LOS_CirBufUnlock(&cirBufSendCB->cirBufCB, intSave); LOS_CirBufUnlock(&cirBufSendCB->cirBufCB, intSave);
/* Log is cached but not printed when a system exception occurs */ /* Log is cached but not printed when a system exception occurs */
...@@ -768,7 +768,7 @@ STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen) ...@@ -768,7 +768,7 @@ STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen)
(VOID)LOS_EventWrite(&cirBufSendCB->sendEvent, CONSOLE_CIRBUF_EVENT); (VOID)LOS_EventWrite(&cirBufSendCB->sendEvent, CONSOLE_CIRBUF_EVENT);
} }
return writen; return written;
} }
STATIC ssize_t ConsoleWrite(struct file *filep, const CHAR *buffer, size_t bufLen) STATIC ssize_t ConsoleWrite(struct file *filep, const CHAR *buffer, size_t bufLen)
......
...@@ -122,7 +122,7 @@ extern UINT32 __heap_end; ...@@ -122,7 +122,7 @@ extern UINT32 __heap_end;
/** /**
* @ingroup los_config * @ingroup los_config
* Sched clck interval * Sched clock interval
*/ */
#define SCHED_CLOCK_INTETRVAL_TICKS LOSCFG_BASE_CORE_TICK_PER_SECOND #define SCHED_CLOCK_INTETRVAL_TICKS LOSCFG_BASE_CORE_TICK_PER_SECOND
...@@ -405,7 +405,7 @@ extern UINT32 __heap_end; ...@@ -405,7 +405,7 @@ extern UINT32 __heap_end;
* *
* @par Description: * @par Description:
* <ul> * <ul>
* <li>This defination is used to declare the type of functions for reading or writing exception information</li> * <li>This definition is used to declare the type of functions for reading or writing exception information</li>
* </ul> * </ul>
* @attention * @attention
* <ul> * <ul>
...@@ -419,7 +419,7 @@ extern UINT32 __heap_end; ...@@ -419,7 +419,7 @@ extern UINT32 __heap_end;
* *
* @retval none. * @retval none.
* @par Dependency: * @par Dependency:
* <ul><li>los_config.h: the header file that contains the type defination.</li></ul> * <ul><li>los_config.h: the header file that contains the type definition.</li></ul>
* @see * @see
*/ */
typedef VOID (*log_read_write_fn)(UINT32 startAddr, UINT32 space, UINT32 rwFlag, CHAR *buf); typedef VOID (*log_read_write_fn)(UINT32 startAddr, UINT32 space, UINT32 rwFlag, CHAR *buf);
......
...@@ -74,7 +74,7 @@ STATIC MagicKeyOp g_magicHelpOp = { ...@@ -74,7 +74,7 @@ STATIC MagicKeyOp g_magicHelpOp = {
* ctrl+n/shift out=0xe, * ctrl+n/shift out=0xe,
* ctrl+o/shift in=0xf, * ctrl+o/shift in=0xf,
* ctrl+[/esc=0x1b, * ctrl+[/esc=0x1b,
* ctrl+] used for telnet commond mode; * ctrl+] used for telnet command mode;
*/ */
STATIC MagicKeyOp *g_magicOpTable[MAGIC_KEY_NUM] = { STATIC MagicKeyOp *g_magicOpTable[MAGIC_KEY_NUM] = {
&g_magicMemCheckOp, /* ctrl + e */ &g_magicMemCheckOp, /* ctrl + e */
......
...@@ -88,16 +88,16 @@ STATIC VOID UartOutput(const CHAR *str, UINT32 len, BOOL isLock) ...@@ -88,16 +88,16 @@ STATIC VOID UartOutput(const CHAR *str, UINT32 len, BOOL isLock)
#ifdef LOSCFG_PLATFORM_CONSOLE #ifdef LOSCFG_PLATFORM_CONSOLE
STATIC VOID ConsoleOutput(const CHAR *str, UINT32 len) STATIC VOID ConsoleOutput(const CHAR *str, UINT32 len)
{ {
ssize_t writen = 0; ssize_t written = 0;
ssize_t cnt; ssize_t cnt;
ssize_t toWrite = len; ssize_t toWrite = len;
for (;;) { for (;;) {
cnt = write(STDOUT_FILENO, str + writen, (size_t)toWrite); cnt = write(STDOUT_FILENO, str + written, (size_t)toWrite);
if ((cnt < 0) || ((cnt == 0) && (OS_INT_ACTIVE)) || (toWrite == cnt)) { if ((cnt < 0) || ((cnt == 0) && (OS_INT_ACTIVE)) || (toWrite == cnt)) {
break; break;
} }
writen += cnt; written += cnt;
toWrite -= cnt; toWrite -= cnt;
} }
} }
......
...@@ -54,7 +54,7 @@ STATIC INT32 OsGetRealPath(const CHAR *fileName, CHAR *buf, UINT32 maxLen) ...@@ -54,7 +54,7 @@ STATIC INT32 OsGetRealPath(const CHAR *fileName, CHAR *buf, UINT32 maxLen)
UINT32 len, workPathLen, newLen; UINT32 len, workPathLen, newLen;
if (access(fileName, F_OK) < 0) { if (access(fileName, F_OK) < 0) {
workingDirectory = OsShellGetWorkingDirtectory(); workingDirectory = OsShellGetWorkingDirectory();
if (workingDirectory == NULL) { if (workingDirectory == NULL) {
goto ERR_FILE; goto ERR_FILE;
} }
......
...@@ -70,7 +70,7 @@ extern "C" { ...@@ -70,7 +70,7 @@ extern "C" {
LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_QUEUE_WRITE, (const LosQueueCB *queueCB, UINT32 operateType, \ LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_QUEUE_WRITE, (const LosQueueCB *queueCB, UINT32 operateType, \
UINT32 bufferSize, UINT32 timeout)) \ UINT32 bufferSize, UINT32 timeout)) \
LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_QUEUE_DELETE, (const LosQueueCB *queueCB)) \ LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_QUEUE_DELETE, (const LosQueueCB *queueCB)) \
/* Hook types supported by semphore modules */ \ /* Hook types supported by semaphore modules */ \
LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_SEM_CREATE, (const LosSemCB *semCreated)) \ LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_SEM_CREATE, (const LosSemCB *semCreated)) \
LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_SEM_POST, (const LosSemCB *semPosted, const LosTaskCB *resumedTask)) \ LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_SEM_POST, (const LosSemCB *semPosted, const LosTaskCB *resumedTask)) \
LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_SEM_PEND, (const LosSemCB *semPended, const LosTaskCB *runningTask, \ LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_SEM_PEND, (const LosSemCB *semPended, const LosTaskCB *runningTask, \
......
...@@ -14,7 +14,7 @@ config TRACE_FRAME_CORE_MSG ...@@ -14,7 +14,7 @@ config TRACE_FRAME_CORE_MSG
depends on TRACE_MSG_EXTEND depends on TRACE_MSG_EXTEND
config TRACE_FRAME_EVENT_COUNT config TRACE_FRAME_EVENT_COUNT
bool "Record event count, which indicate the sequence of happend events" bool "Record event count, which indicate the sequence of happened events"
default n default n
depends on TRACE_MSG_EXTEND depends on TRACE_MSG_EXTEND
...@@ -23,7 +23,7 @@ config TRACE_FRAME_MAX_PARAMS ...@@ -23,7 +23,7 @@ config TRACE_FRAME_MAX_PARAMS
default 3 default 3
depends on KERNEL_TRACE depends on KERNEL_TRACE
help help
Make sure the max value is bigger than the number defined by each #MODULE#_#TYPE#_PARMAS in los_trace.h, e.g. TASK_SWITCH_PARAMS Make sure the max value is bigger than the number defined by each #MODULE#_#TYPE#_PARAMS in los_trace.h, e.g. TASK_SWITCH_PARAMS
choice choice
prompt "Trace work mode" prompt "Trace work mode"
......
...@@ -62,7 +62,7 @@ LITE_OS_SEC_BSS STATIC UINT32 g_traceTaskId; ...@@ -62,7 +62,7 @@ LITE_OS_SEC_BSS STATIC UINT32 g_traceTaskId;
#define EVENT_MASK 0xFFFFFFF0 #define EVENT_MASK 0xFFFFFFF0
#define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MIN(x, y) ((x) < (y) ? (x) : (y))
LITE_OS_SEC_BSS STATIC TRACE_HWI_FILTER_HOOK g_traceHwiFliterHook = NULL; LITE_OS_SEC_BSS STATIC TRACE_HWI_FILTER_HOOK g_traceHwiFilterHook = NULL;
#ifdef LOSCFG_KERNEL_SMP #ifdef LOSCFG_KERNEL_SMP
LITE_OS_SEC_BSS SPIN_LOCK_INIT(g_traceSpin); LITE_OS_SEC_BSS SPIN_LOCK_INIT(g_traceSpin);
...@@ -74,8 +74,8 @@ STATIC_INLINE BOOL OsTraceHwiFilter(UINT32 hwiNum) ...@@ -74,8 +74,8 @@ STATIC_INLINE BOOL OsTraceHwiFilter(UINT32 hwiNum)
#ifdef LOSCFG_KERNEL_SMP #ifdef LOSCFG_KERNEL_SMP
ret |= (hwiNum == LOS_MP_IPI_SCHEDULE); ret |= (hwiNum == LOS_MP_IPI_SCHEDULE);
#endif #endif
if (g_traceHwiFliterHook != NULL) { if (g_traceHwiFilterHook != NULL) {
ret |= g_traceHwiFliterHook(hwiNum); ret |= g_traceHwiFilterHook(hwiNum);
} }
return ret; return ret;
} }
...@@ -102,13 +102,13 @@ STATIC VOID OsTraceSetFrame(TraceEventFrame *frame, UINT32 eventType, UINTPTR id ...@@ -102,13 +102,13 @@ STATIC VOID OsTraceSetFrame(TraceEventFrame *frame, UINT32 eventType, UINTPTR id
#ifdef LOSCFG_TRACE_FRAME_CORE_MSG #ifdef LOSCFG_TRACE_FRAME_CORE_MSG
frame->core.cpuId = ArchCurrCpuid(); frame->core.cpuId = ArchCurrCpuid();
frame->core.hwiActive = OS_INT_ACTIVE ? TRUE : FALSE; frame->core.hwiActive = OS_INT_ACTIVE ? TRUE : FALSE;
frame->core.taskLockCnt = MIN(OsPercpuGet()->taskLockCnt, 0xF); /* taskLockCnt is 4 bits, max vaule = 0xF */ frame->core.taskLockCnt = MIN(OsPercpuGet()->taskLockCnt, 0xF); /* taskLockCnt is 4 bits, max value = 0xF */
frame->core.paramCount = paramCount; frame->core.paramCount = paramCount;
#endif #endif
#ifdef LOS_TRACE_FRAME_LR #ifdef LOS_TRACE_FRAME_LR
/* Get the linkreg from stack fp and storage to frame */ /* Get the linkreg from stack fp and storage to frame */
LOS_RecordLR(frame->linkReg, LOS_TRACE_LR_RECORD, LOS_TRACE_LR_RECORD, LOS_TRACE_LR_IGNOR); LOS_RecordLR(frame->linkReg, LOS_TRACE_LR_RECORD, LOS_TRACE_LR_RECORD, LOS_TRACE_LR_IGNORE);
#endif #endif
#ifdef LOSCFG_TRACE_FRAME_EVENT_COUNT #ifdef LOSCFG_TRACE_FRAME_EVENT_COUNT
...@@ -371,7 +371,7 @@ VOID LOS_TraceHwiFilterHookReg(TRACE_HWI_FILTER_HOOK hook) ...@@ -371,7 +371,7 @@ VOID LOS_TraceHwiFilterHookReg(TRACE_HWI_FILTER_HOOK hook)
UINT32 intSave; UINT32 intSave;
TRACE_LOCK(intSave); TRACE_LOCK(intSave);
g_traceHwiFliterHook = hook; g_traceHwiFilterHook = hook;
TRACE_UNLOCK(intSave); TRACE_UNLOCK(intSave);
} }
......
...@@ -43,7 +43,7 @@ typedef struct Spinlock SPIN_LOCK_S; ...@@ -43,7 +43,7 @@ typedef struct Spinlock SPIN_LOCK_S;
#define MAX_LOCK_DEPTH 16U #define MAX_LOCK_DEPTH 16U
enum LockDepErrType { enum LockDepErrType {
LOCKDEP_SUCEESS = 0, LOCKDEP_SUCCESS = 0,
LOCKDEP_ERR_DOUBLE_LOCK, LOCKDEP_ERR_DOUBLE_LOCK,
LOCKDEP_ERR_DEAD_LOCK, LOCKDEP_ERR_DEAD_LOCK,
LOCKDEP_ERR_UNLOCK_WITOUT_LOCK, LOCKDEP_ERR_UNLOCK_WITOUT_LOCK,
......
...@@ -337,7 +337,7 @@ extern UINT32 LOS_SwtmrStop(UINT16 swtmrID); ...@@ -337,7 +337,7 @@ extern UINT32 LOS_SwtmrStop(UINT16 swtmrID);
* specified by usSwTmrID. * specified by usSwTmrID.
* @attention * @attention
* <ul> * <ul>
* <li>The specific timer should be created and started successfully, error happends otherwise.</li> * <li>The specific timer should be created and started successfully, error happeneds otherwise.</li>
* </ul> * </ul>
* *
* @param swtmrID [IN] Software timer ID created by LOS_SwtmrCreate. The value of ID should be in * @param swtmrID [IN] Software timer ID created by LOS_SwtmrCreate. The value of ID should be in
......
...@@ -58,7 +58,7 @@ extern "C" { ...@@ -58,7 +58,7 @@ extern "C" {
#define LOSCFG_TRACE_OBJ_MAX_NAME_SIZE LOS_TASK_NAMELEN #define LOSCFG_TRACE_OBJ_MAX_NAME_SIZE LOS_TASK_NAMELEN
#define LOS_TRACE_LR_RECORD 5 #define LOS_TRACE_LR_RECORD 5
#define LOS_TRACE_LR_IGNOR 0 #define LOS_TRACE_LR_IGNORE 0
/** /**
* @ingroup los_trace * @ingroup los_trace
* Trace records the max number of objects(kernel object, like tasks), range is [0, LOSCFG_BASE_CORE_TSK_LIMIT]. * Trace records the max number of objects(kernel object, like tasks), range is [0, LOSCFG_BASE_CORE_TSK_LIMIT].
...@@ -136,7 +136,7 @@ typedef enum { ...@@ -136,7 +136,7 @@ typedef enum {
/** /**
* @ingroup los_trace * @ingroup los_trace
* Trace event type which indicate the exactly happend events, user can define own module's event type like * Trace event type which indicate the exactly happened events, user can define own module's event type like
* TRACE_#MODULE#_FLAG | NUMBER. * TRACE_#MODULE#_FLAG | NUMBER.
* 28 4 * 28 4
* 0 0 0 0 0 0 0 0 X X X X X X X X 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 X X X X X X X X 0 0 0 0 0 0
...@@ -254,7 +254,7 @@ typedef struct { ...@@ -254,7 +254,7 @@ typedef struct {
#endif #endif
#ifdef LOSCFG_TRACE_FRAME_EVENT_COUNT #ifdef LOSCFG_TRACE_FRAME_EVENT_COUNT
UINT32 eventCount; /**< the sequence of happend events */ UINT32 eventCount; /**< the sequence of happened events */
#endif #endif
#ifdef LOS_TRACE_FRAME_LR #ifdef LOS_TRACE_FRAME_LR
...@@ -302,7 +302,7 @@ typedef struct { ...@@ -302,7 +302,7 @@ typedef struct {
* @brief Define the type of trace hardware interrupt filter hook function. * @brief Define the type of trace hardware interrupt filter hook function.
* *
* @par Description: * @par Description:
* User can register fliter function by LOS_TraceHwiFilterHookReg to filter hardware interrupt events. Return true if * User can register filter function by LOS_TraceHwiFilterHookReg to filter hardware interrupt events. Return true if
* user don't need trace the certain number. * user don't need trace the certain number.
* *
* @attention * @attention
...@@ -603,10 +603,10 @@ extern OfflineHead *LOS_TraceRecordGet(VOID); ...@@ -603,10 +603,10 @@ extern OfflineHead *LOS_TraceRecordGet(VOID);
/** /**
* @ingroup los_trace * @ingroup los_trace
* @brief Hwi num fliter hook. * @brief Hwi num filter hook.
* *
* @par Description: * @par Description:
* Hwi fliter function. * Hwi filter function.
* @attention * @attention
* <ul> * <ul>
* <li>Filter the hwi events by hwi num</li> * <li>Filter the hwi events by hwi num</li>
......
...@@ -734,7 +734,7 @@ u32_t lwip_ifconfig(int argc, const char **argv) ...@@ -734,7 +734,7 @@ u32_t lwip_ifconfig(int argc, const char **argv)
LWIP: LWIP:
So in our case, So in our case,
while receiving a packet RX case, if the buffer is full (trypost - it is sys_mbox_trypost) while receiving a packet RX case, if the buffer is full (trypost - it is sys_mbox_trypost)
the error will be returned, we can consider that an overflow has happend. the error will be returned, we can consider that an overflow has happened.
So this can be RX overrun. So this can be RX overrun.
But while transmitting a packet TX case, underrun cannot happen because it block on the But while transmitting a packet TX case, underrun cannot happen because it block on the
......
...@@ -86,7 +86,7 @@ typedef struct { ...@@ -86,7 +86,7 @@ typedef struct {
} }
#define NEED_NEW_LINE(timesPrint, lineCap) ((timesPrint) % (lineCap) == 0) #define NEED_NEW_LINE(timesPrint, lineCap) ((timesPrint) % (lineCap) == 0)
#define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIGNT)) #define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIGHT))
extern UINT32 OsCmdInit(VOID); extern UINT32 OsCmdInit(VOID);
extern CmdModInfo *OsCmdInfoGet(VOID); extern CmdModInfo *OsCmdInfoGet(VOID);
......
...@@ -67,7 +67,7 @@ extern "C" { ...@@ -67,7 +67,7 @@ extern "C" {
#define CMD_HISTORY_LEN 10 #define CMD_HISTORY_LEN 10
#define CMD_MAX_PATH 256 #define CMD_MAX_PATH 256
#define DEFAULT_SCREEN_WIDTH 80 #define DEFAULT_SCREEN_WIDTH 80
#define DEFAULT_SCREEN_HEIGNT 24 #define DEFAULT_SCREEN_HEIGHT 24
#define SHELL_MODE 0 #define SHELL_MODE 0
#define OTHER_MODE 1 #define OTHER_MODE 1
...@@ -117,7 +117,7 @@ typedef enum { ...@@ -117,7 +117,7 @@ typedef enum {
/* /*
* Hook for user-defined debug function * Hook for user-defined debug function
* Unify differnt module's func for registration * Unify different module's func for registration
*/ */
typedef UINT32 (*CmdCallBackFunc)(UINT32 argc, const CHAR **argv); typedef UINT32 (*CmdCallBackFunc)(UINT32 argc, const CHAR **argv);
......
...@@ -99,7 +99,7 @@ extern VOID LOS_LkPrint(INT32 level, const CHAR *func, INT32 line, const CHAR *f ...@@ -99,7 +99,7 @@ extern VOID LOS_LkPrint(INT32 level, const CHAR *func, INT32 line, const CHAR *f
* *
* @par Description: * @par Description:
* <ul> * <ul>
* <li>This API is used to registe a hook function to LK.</li> * <li>This API is used to register a hook function to LK.</li>
* </ul> * </ul>
* *
* @param LK_FUNC [IN] the print func. * @param LK_FUNC [IN] the print func.
......
...@@ -40,7 +40,7 @@ extern "C" { ...@@ -40,7 +40,7 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __cplusplus */ #endif /* __cplusplus */
extern CHAR *OsShellGetWorkingDirtectory(VOID); extern CHAR *OsShellGetWorkingDirectory(VOID);
extern UINT32 OsShellInit(INT32 consoleId); extern UINT32 OsShellInit(INT32 consoleId);
extern INT32 OsShellDeinit(INT32 consoleId); extern INT32 OsShellDeinit(INT32 consoleId);
......
...@@ -110,7 +110,7 @@ STATIC INT32 OsStrSeparate(CHAR *tabStr, CHAR *strPath, CHAR *nameLooking, UINT3 ...@@ -110,7 +110,7 @@ STATIC INT32 OsStrSeparate(CHAR *tabStr, CHAR *strPath, CHAR *nameLooking, UINT3
CHAR *strEnd = NULL; CHAR *strEnd = NULL;
CHAR *cutPos = NULL; CHAR *cutPos = NULL;
CmdParsed parsed = {0}; CmdParsed parsed = {0};
CHAR *shellWorkingDirectory = OsShellGetWorkingDirtectory(); CHAR *shellWorkingDirectory = OsShellGetWorkingDirectory();
INT32 ret; INT32 ret;
ret = OsStrSeparateTabStrGet(&tabStr, &parsed, tabStrLen); ret = OsStrSeparateTabStrGet(&tabStr, &parsed, tabStrLen);
...@@ -215,7 +215,7 @@ STATIC INT32 OsPrintMatchList(UINT32 count, const CHAR *strPath, const CHAR *nam ...@@ -215,7 +215,7 @@ STATIC INT32 OsPrintMatchList(UINT32 count, const CHAR *strPath, const CHAR *nam
return (INT32)OS_ERROR; return (INT32)OS_ERROR;
} }
if (count > (lineCap * DEFAULT_SCREEN_HEIGNT)) { if (count > (lineCap * DEFAULT_SCREEN_HEIGHT)) {
ret = OsSurePrintAll(count); ret = OsSurePrintAll(count);
if (ret != 1) { if (ret != 1) {
return ret; return ret;
...@@ -421,10 +421,10 @@ STATIC INT32 OsTabMatchFile(CHAR *cmdKey, UINT32 *len) ...@@ -421,10 +421,10 @@ STATIC INT32 OsTabMatchFile(CHAR *cmdKey, UINT32 *len)
} }
/* /*
* Description: Pass in the string and clear useless space ,which inlcude: * Description: Pass in the string and clear useless space, which include:
* 1) The overmatch space which is not be marked by Quote's area * 1) The overmatch space which is not be marked by Quote's area
* Squeeze the overmatch space into one space * Squeeze the overmatch space into one space
* 2) Clear all space before first vaild charatctor * 2) Clear all space before first valid charatctor
* Input: cmdKey : Pass in the buff string, which is ready to be operated * Input: cmdKey : Pass in the buff string, which is ready to be operated
* cmdOut : Pass out the buffer string ,which has already been operated * cmdOut : Pass out the buffer string ,which has already been operated
* size : cmdKey length * size : cmdKey length
...@@ -452,7 +452,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI ...@@ -452,7 +452,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI
} }
/* Backup the 'output' start address */ /* Backup the 'output' start address */
outputBak = output; outputBak = output;
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invaild charactor */ /* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */
for (; *cmdKey != '\0'; cmdKey++) { for (; *cmdKey != '\0'; cmdKey++) {
/* Detected a Double Quotes, switch the matching status */ /* Detected a Double Quotes, switch the matching status */
if (*(cmdKey) == '\"') { if (*(cmdKey) == '\"') {
...@@ -462,7 +462,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI ...@@ -462,7 +462,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI
/* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */ /* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */
/* 2) Current charactor is a space */ /* 2) Current charactor is a space */
/* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */ /* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */
/* 4) Invaild charactor, such as single quotes */ /* 4) Invalid charactor, such as single quotes */
if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) { if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) {
continue; continue;
} }
......
...@@ -107,7 +107,7 @@ STATIC VOID ShellNotify(ShellCB *shellCB) ...@@ -107,7 +107,7 @@ STATIC VOID ShellNotify(ShellCB *shellCB)
} }
enum { enum {
STAT_NOMAL_KEY, STAT_NORMAL_KEY,
STAT_ESC_KEY, STAT_ESC_KEY,
STAT_MULTI_KEY STAT_MULTI_KEY
}; };
...@@ -126,23 +126,23 @@ STATIC INT32 ShellCmdLineCheckUDRL(const CHAR ch, ShellCB *shellCB) ...@@ -126,23 +126,23 @@ STATIC INT32 ShellCmdLineCheckUDRL(const CHAR ch, ShellCB *shellCB)
} else if (ch == 0x41) { /* up */ } else if (ch == 0x41) { /* up */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
OsShellHistoryShow(CMD_KEY_UP, shellCB); OsShellHistoryShow(CMD_KEY_UP, shellCB);
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} else if (ch == 0x42) { /* down */ } else if (ch == 0x42) { /* down */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
OsShellHistoryShow(CMD_KEY_DOWN, shellCB); OsShellHistoryShow(CMD_KEY_DOWN, shellCB);
return ret; return ret;
} }
} else if (ch == 0x43) { /* right */ } else if (ch == 0x43) { /* right */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} else if (ch == 0x44) { /* left */ } else if (ch == 0x44) { /* left */
if (shellCB->shellKeyType == STAT_MULTI_KEY) { if (shellCB->shellKeyType == STAT_MULTI_KEY) {
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
return ret; return ret;
} }
} }
...@@ -200,7 +200,7 @@ LITE_OS_SEC_TEXT_MINOR VOID ShellCmdLineParse(CHAR c, pf_OUTPUT outputFunc, Shel ...@@ -200,7 +200,7 @@ LITE_OS_SEC_TEXT_MINOR VOID ShellCmdLineParse(CHAR c, pf_OUTPUT outputFunc, Shel
outputFunc("%c", ch); outputFunc("%c", ch);
} }
shellCB->shellKeyType = STAT_NOMAL_KEY; shellCB->shellKeyType = STAT_NORMAL_KEY;
} }
LITE_OS_SEC_TEXT_MINOR UINT32 ShellMsgTypeGet(CmdParsed *cmdParsed, const CHAR *cmdType) LITE_OS_SEC_TEXT_MINOR UINT32 ShellMsgTypeGet(CmdParsed *cmdParsed, const CHAR *cmdType)
......
...@@ -158,7 +158,7 @@ INT32 OsShellDeinit(INT32 consoleId) ...@@ -158,7 +158,7 @@ INT32 OsShellDeinit(INT32 consoleId)
return 0; return 0;
} }
CHAR *OsShellGetWorkingDirtectory(VOID) CHAR *OsShellGetWorkingDirectory(VOID)
{ {
CONSOLE_CB *consoleCB = OsGetConsoleByTaskID(OsCurrTaskGet()->taskID); CONSOLE_CB *consoleCB = OsGetConsoleByTaskID(OsCurrTaskGet()->taskID);
ShellCB *shellCB = NULL; ShellCB *shellCB = NULL;
......
...@@ -232,7 +232,7 @@ STATIC INT32 OsViewFileTime(const CHAR *filename) ...@@ -232,7 +232,7 @@ STATIC INT32 OsViewFileTime(const CHAR *filename)
CHAR *fullpath = NULL; CHAR *fullpath = NULL;
INT32 ret; INT32 ret;
CHAR buf[BUFFER_SIZE]; CHAR buf[BUFFER_SIZE];
CHAR *shellWorkingDirectory = OsShellGetWorkingDirtectory(); CHAR *shellWorkingDirectory = OsShellGetWorkingDirectory();
ret = vfs_normalize_path(shellWorkingDirectory, filename, &fullpath); ret = vfs_normalize_path(shellWorkingDirectory, filename, &fullpath);
if (ret < 0) { if (ret < 0) {
......
...@@ -649,7 +649,7 @@ INT32 LOS_DmesgToFile(const CHAR *filename) ...@@ -649,7 +649,7 @@ INT32 LOS_DmesgToFile(const CHAR *filename)
CHAR *fullpath = NULL; CHAR *fullpath = NULL;
CHAR *buf = NULL; CHAR *buf = NULL;
INT32 ret; INT32 ret;
CHAR *shellWorkingDirectory = OsShellGetWorkingDirtectory(); CHAR *shellWorkingDirectory = OsShellGetWorkingDirectory();
UINT32 logSize, bufSize, head, tail, intSave; UINT32 logSize, bufSize, head, tail, intSave;
CHAR *logBuf = NULL; CHAR *logBuf = NULL;
......
...@@ -54,8 +54,8 @@ typedef struct { ...@@ -54,8 +54,8 @@ typedef struct {
STATIC WatchCB *g_watchCmd; STATIC WatchCB *g_watchCmd;
#define WATCH_COUNT_MAX 0xFFFFFF #define WATCH_COUNT_MAX 0xFFFFFF
#define WATCH_INTETVAL_MAX 0xFFFFFF #define WATCH_INTERTVAL_MAX 0xFFFFFF
STATIC VOID PrintTime(VOID) STATIC VOID PrintTime(VOID)
{ {
...@@ -129,7 +129,7 @@ INT32 OsWatchOptionParsed(UINT32 argc, UINT32 *argoff, const CHAR **argv, WatchC ...@@ -129,7 +129,7 @@ INT32 OsWatchOptionParsed(UINT32 argc, UINT32 *argoff, const CHAR **argv, WatchC
return -1; return -1;
} }
tmpVal = (long)strtoul(argv[*argoff + 1], &strPtr, 0); tmpVal = (long)strtoul(argv[*argoff + 1], &strPtr, 0);
if ((*strPtr != 0) || (tmpVal <= 0) || (tmpVal > WATCH_INTETVAL_MAX)) { if ((*strPtr != 0) || (tmpVal <= 0) || (tmpVal > WATCH_INTERTVAL_MAX)) {
PRINTK("\ninterval time is invalid\n"); PRINTK("\ninterval time is invalid\n");
OsWatchCmdUsage(); OsWatchCmdUsage();
return -1; return -1;
......
...@@ -112,7 +112,7 @@ VOID OsArmA32SyscallHandle(TaskContext *regs) ...@@ -112,7 +112,7 @@ VOID OsArmA32SyscallHandle(TaskContext *regs)
nArgs = g_syscallNArgs[cmd / NARG_PER_BYTE]; /* 4bit per nargs */ nArgs = g_syscallNArgs[cmd / NARG_PER_BYTE]; /* 4bit per nargs */
nArgs = (cmd & 1) ? (nArgs >> NARG_BITS) : (nArgs & NARG_MASK); nArgs = (cmd & 1) ? (nArgs >> NARG_BITS) : (nArgs & NARG_MASK);
if ((handle == 0) || (nArgs > ARG_NUM_7)) { if ((handle == 0) || (nArgs > ARG_NUM_7)) {
PRINT_ERR("Unsupport syscall ID: %d nArgs: %d\n", cmd, nArgs); PRINT_ERR("Unsupported syscall ID: %d nArgs: %d\n", cmd, nArgs);
regs->R0 = -ENOSYS; regs->R0 = -ENOSYS;
return; return;
} }
......
...@@ -43,7 +43,7 @@ static VOID *PthreadF01(VOID *argument) ...@@ -43,7 +43,7 @@ static VOID *PthreadF01(VOID *argument)
g_testCount++; g_testCount++;
ret = pthread_setcancelstate(-100, NULL); // -100, test for invaild param. ret = pthread_setcancelstate(-100, NULL); // -100, test for invalid param.
ICUNIT_TRACK_EQUAL(ret, EINVAL, ret); ICUNIT_TRACK_EQUAL(ret, EINVAL, ret);
pthread_exit(0); pthread_exit(0);
......
...@@ -66,7 +66,7 @@ static UINT32 Testcase(VOID) ...@@ -66,7 +66,7 @@ static UINT32 Testcase(VOID)
ret = pthread_setschedparam(newTh, 0, &param); ret = pthread_setschedparam(newTh, 0, &param);
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret); ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
ret = pthread_setschedparam(newTh, 4, &param); // 4, test for invaild param. ret = pthread_setschedparam(newTh, 4, &param); // 4, test for invalid param.
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret); ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
ret = pthread_setschedparam(newTh, SCHED_RR, NULL); ret = pthread_setschedparam(newTh, SCHED_RR, NULL);
...@@ -103,13 +103,13 @@ static UINT32 Testcase(VOID) ...@@ -103,13 +103,13 @@ static UINT32 Testcase(VOID)
ret = pthread_setschedparam(newTh, SCHED_RR, &param); ret = pthread_setschedparam(newTh, SCHED_RR, &param);
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret); ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
ret = pthread_setschedparam(newTh + 9, SCHED_RR, &param); // 9, test for invaild param. ret = pthread_setschedparam(newTh + 9, SCHED_RR, &param); // 9, test for invalid param.
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret); ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
ret = pthread_getschedparam(newTh, &policy, &param2); ret = pthread_getschedparam(newTh, &policy, &param2);
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret); ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
ret = pthread_getschedparam(newTh + 8, &policy, &param2); // 8, test for invaild param. ret = pthread_getschedparam(newTh + 8, &policy, &param2); // 8, test for invalid param.
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret); ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
ret = pthread_attr_destroy(&attr); ret = pthread_attr_destroy(&attr);
......
...@@ -43,10 +43,10 @@ static UINT32 Testcase(VOID) ...@@ -43,10 +43,10 @@ static UINT32 Testcase(VOID)
int oldstate; int oldstate;
int oldstype; int oldstype;
ret = pthread_setcancelstate(2, &oldstate); // 2, test for invaild param. ret = pthread_setcancelstate(2, &oldstate); // 2, test for invalid param.
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret); ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
ret = pthread_setcancelstate(3, &oldstate); // 3, test for invaild param. ret = pthread_setcancelstate(3, &oldstate); // 3, test for invalid param.
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret); ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
...@@ -56,10 +56,10 @@ static UINT32 Testcase(VOID) ...@@ -56,10 +56,10 @@ static UINT32 Testcase(VOID)
ICUNIT_ASSERT_EQUAL(ret, 0, ret); ICUNIT_ASSERT_EQUAL(ret, 0, ret);
ICUNIT_ASSERT_EQUAL(oldstate, PTHREAD_CANCEL_ENABLE, oldstate); ICUNIT_ASSERT_EQUAL(oldstate, PTHREAD_CANCEL_ENABLE, oldstate);
ret = pthread_setcanceltype(2, &oldstype); // 2, test for invaild param. ret = pthread_setcanceltype(2, &oldstype); // 2, test for invalid param.
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret); ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
ret = pthread_setcanceltype(3, &oldstype); // 3, test for invaild param. ret = pthread_setcanceltype(3, &oldstype); // 3, test for invalid param.
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret); ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
......
...@@ -39,7 +39,7 @@ static int CheckedMmap(int prot, int flags, int fd) ...@@ -39,7 +39,7 @@ static int CheckedMmap(int prot, int flags, int fd)
int ret; int ret;
if (pageSize < 0) { if (pageSize < 0) {
printf("err: mmap size invaild\n"); printf("err: mmap size invalid\n");
return -1; return -1;
} }
p = mmap(NULL, pageSize, prot, flags, fd, 0); p = mmap(NULL, pageSize, prot, flags, fd, 0);
...@@ -64,11 +64,11 @@ static int Testcase(void) ...@@ -64,11 +64,11 @@ static int Testcase(void)
ICUNIT_ASSERT_NOT_EQUAL(shmfd, -1, shmfd); ICUNIT_ASSERT_NOT_EQUAL(shmfd, -1, shmfd);
if (pageSize <= 0) { if (pageSize <= 0) {
printf("err: malloc size invaild\n"); printf("err: malloc size invalid\n");
return -1; return -1;
} }
if (pageSize <= 0) { if (pageSize <= 0) {
printf("err: malloc size invaild\n"); printf("err: malloc size invalid\n");
return -1; return -1;
} }
buf = (char *)malloc(pageSize); buf = (char *)malloc(pageSize);
......
...@@ -47,7 +47,7 @@ static UINT32 TestCase(VOID) ...@@ -47,7 +47,7 @@ static UINT32 TestCase(VOID)
status = WEXITSTATUS(status); status = WEXITSTATUS(status);
ICUNIT_ASSERT_EQUAL(status, 15, status); /* 15, set priority for test */ ICUNIT_ASSERT_EQUAL(status, 15, status); /* 15, set priority for test */
ret = nice(-40); /* -40, set invaild priority for test */ ret = nice(-40); /* -40, set invalid priority for test */
ICUNIT_ASSERT_EQUAL(ret, -1, ret); ICUNIT_ASSERT_EQUAL(ret, -1, ret);
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno); ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
} }
......
...@@ -36,7 +36,7 @@ static void *Xmalloc(unsigned n) ...@@ -36,7 +36,7 @@ static void *Xmalloc(unsigned n)
{ {
void *p = NULL; void *p = NULL;
if (n <= 0) { if (n <= 0) {
printf("err: malloc size invaild\n"); printf("err: malloc size invalid\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
p = malloc(n); p = malloc(n);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册