!696 chore: 修复社区反馈问题Percpu结构体注释错误
Merge pull request !696 from kenneth/core_typo
This commit is contained in:
commit
07cab40473
|
@ -46,7 +46,7 @@ int Chdir(const char *tgtDir)
|
|||
|
||||
ret = chdir(tgtDir);
|
||||
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;
|
||||
|
|
|
@ -53,7 +53,7 @@ typedef struct {
|
|||
} CmdKeyLink;
|
||||
|
||||
#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 OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size);
|
||||
|
@ -62,7 +62,7 @@ extern void OsShellCmdPush(const char *string, CmdKeyLink *cmdKeyLink);
|
|||
extern void OsShellHistoryShow(unsigned int value, ShellCB *shellCB);
|
||||
extern unsigned int OsShellKeyInit(ShellCB *shellCB);
|
||||
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
|
||||
#if __cplusplus
|
||||
|
|
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
#define CMD_HISTORY_LEN 10
|
||||
#define CMD_MAX_PATH 256
|
||||
#define DEFAULT_SCREEN_WIDTH 80
|
||||
#define DEFAULT_SCREEN_HEIGNT 24
|
||||
#define DEFAULT_SCREEN_HEIGHT 24
|
||||
|
||||
#define SWITCH_QUOTES_STATUS(qu) do { \
|
||||
if ((qu) == TRUE) { \
|
||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern char *OsShellGetWorkingDirtectory(void);
|
||||
extern char *OsShellGetWorkingDirectory(void);
|
||||
extern unsigned int OsShellInit(void);
|
||||
extern int OsShellDeinit(ShellCB *shellCB);
|
||||
extern ShellCB *OsGetShellCb(void);
|
||||
|
|
|
@ -91,12 +91,12 @@ static int OsStrSeparateTabStrGet(const char **tabStr, CmdParsed *parsed, unsign
|
|||
return SH_OK;
|
||||
}
|
||||
|
||||
char *OsShellGetWorkingDirtectory()
|
||||
char *OsShellGetWorkingDirectory(void)
|
||||
{
|
||||
return OsGetShellCb()->shellWorkingDirectory;
|
||||
}
|
||||
|
||||
int OsShellSetWorkingDirtectory(const char *dir, size_t len)
|
||||
int OsShellSetWorkingDirectory(const char *dir, size_t len)
|
||||
{
|
||||
if (dir == NULL) {
|
||||
return SH_NOK;
|
||||
|
@ -115,7 +115,7 @@ static int OsStrSeparate(const char *tabStr, char *strPath, char *nameLooking, u
|
|||
char *strEnd = NULL;
|
||||
char *cutPos = NULL;
|
||||
CmdParsed parsed = {0};
|
||||
char *shellWorkingDirectory = OsShellGetWorkingDirtectory();
|
||||
char *shellWorkingDirectory = OsShellGetWorkingDirectory();
|
||||
int ret;
|
||||
|
||||
ret = OsStrSeparateTabStrGet(&tabStr, &parsed, tabStrLen);
|
||||
|
@ -223,7 +223,7 @@ static int OsPrintMatchList(unsigned int count, const char *strPath, const char
|
|||
return (int)SH_ERROR;
|
||||
}
|
||||
|
||||
if (count > (lineCap * DEFAULT_SCREEN_HEIGNT)) {
|
||||
if (count > (lineCap * DEFAULT_SCREEN_HEIGHT)) {
|
||||
ret = OsSurePrintAll(count);
|
||||
if (ret != 1) {
|
||||
return ret;
|
||||
|
@ -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
|
||||
* 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
|
||||
* cmdOut : Pass out the buffer string ,which has already been operated
|
||||
* size : cmdKey length
|
||||
|
@ -407,7 +407,7 @@ 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 invaild charactor */
|
||||
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */
|
||||
for (; *cmdKey != '\0'; cmdKey++) {
|
||||
/* Detected a Double Quotes, switch the matching status */
|
||||
if (*(cmdKey) == '\"') {
|
||||
|
@ -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) */
|
||||
/* 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) Invaild charactor, such as single quotes */
|
||||
/* 4) Invalid charactor, such as single quotes */
|
||||
if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ int ShellNotify(ShellCB *shellCB)
|
|||
}
|
||||
|
||||
enum {
|
||||
STAT_NOMAL_KEY,
|
||||
STAT_NORMAL_KEY,
|
||||
STAT_ESC_KEY,
|
||||
STAT_MULTI_KEY
|
||||
};
|
||||
|
@ -152,23 +152,23 @@ static int ShellCmdLineCheckUDRL(const char ch, ShellCB *shellCB)
|
|||
} else if (ch == 0x41) { /* up */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
OsShellHistoryShow(CMD_KEY_UP, shellCB);
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x42) { /* down */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
OsShellHistoryShow(CMD_KEY_DOWN, shellCB);
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x43) { /* right */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x44) { /* left */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ void ParseNormalChar(char ch, OutputFunc outputFunc, ShellCB *shellCB)
|
|||
outputFunc("%c", ch);
|
||||
}
|
||||
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
}
|
||||
|
||||
void ShellCmdLineParse(char c, OutputFunc outputFunc, ShellCB *shellCB)
|
||||
|
@ -459,7 +459,7 @@ static void ParseAndExecCmdline(CmdParsed *cmdParsed, const char *cmdline, unsig
|
|||
DoCmdExec(cmdName, cmdlineOrigin, len, cmdParsed);
|
||||
|
||||
if (getcwd(shellWorkingDirectory, PATH_MAX) != NULL) {
|
||||
(void)OsShellSetWorkingDirtectory(shellWorkingDirectory, (PATH_MAX + 1));
|
||||
(void)OsShellSetWorkingDirectory(shellWorkingDirectory, (PATH_MAX + 1));
|
||||
}
|
||||
|
||||
OUT:
|
||||
|
|
|
@ -244,7 +244,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3
|
|||
|
||||
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 ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */
|
||||
excBufAddr->PC = excBufAddr->PC - ARM_INSTR_LEN;
|
||||
|
@ -479,7 +479,7 @@ STATIC VOID OsDumpProcessUsedMemRegion(LosProcessCB *runProcess, LosVmSpace *run
|
|||
RB_SCAN_SAFE_END(&space->regionRbTree, pstRbNodeTemp, pstRbNodeNext)
|
||||
}
|
||||
|
||||
STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs)
|
||||
STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFlags)
|
||||
{
|
||||
LosProcessCB *runProcess = NULL;
|
||||
LosVmSpace *runspace = NULL;
|
||||
|
@ -500,7 +500,7 @@ STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs)
|
|||
return;
|
||||
}
|
||||
|
||||
OsDumpProcessUsedMemRegion(runProcess, runspace, vmmFalgs);
|
||||
OsDumpProcessUsedMemRegion(runProcess, runspace, vmmFlags);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -1048,7 +1048,7 @@ STATIC VOID OsCheckAllCpuStatus(VOID)
|
|||
LOCKDEP_CLEAR_LOCKS();
|
||||
|
||||
LOS_SpinLock(&g_excSerializerSpin);
|
||||
/* Only the current nuclear anomaly */
|
||||
/* Only the current CPU anomaly */
|
||||
if (g_currHandleExcCpuID == INVALID_CPUID) {
|
||||
g_currHandleExcCpuID = currCpuID;
|
||||
g_currHandleExcPID = OsCurrProcessGet()->processID;
|
||||
|
|
|
@ -172,7 +172,7 @@ VOID HalIrqHandler(VOID)
|
|||
|
||||
OsInterrupt(vector);
|
||||
|
||||
/* use orignal iar to do the EOI */
|
||||
/* use original iar to do the EOI */
|
||||
GIC_REG_32(GICC_EOIR) = iar;
|
||||
}
|
||||
|
||||
|
|
|
@ -998,7 +998,7 @@ INT32 los_part_read(INT32 pt, VOID *buf, UINT64 sector, UINT32 count, BOOL useRe
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
sector += part->sector_start;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
@ -1054,7 +1054,7 @@ INT32 los_part_write(INT32 pt, const VOID *buf, UINT64 sector, UINT32 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;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
sector += part->sector_start;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ config FS_FAT_CHINESE
|
|||
Answer Y to enable LiteOS fat filesystem support Chinese.
|
||||
|
||||
config FS_FAT_VIRTUAL_PARTITION
|
||||
bool "Enabel Virtual Partition"
|
||||
bool "Enable Virtual Partition"
|
||||
default n
|
||||
depends on FS_FAT
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ static FRESULT FatfsScanClear(INT vol)
|
|||
* Acceptable Return Value:
|
||||
* - FR_OK : The root directory is completely clean.
|
||||
* - 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.
|
||||
* Others Return Value:
|
||||
* Followed the by the lower API
|
||||
|
|
|
@ -53,7 +53,7 @@ extern FATFS *FatFs[FF_VOLUMES];
|
|||
* follow_virentry:
|
||||
* 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
|
||||
* has been replaced to the corresponding FATFS.
|
||||
* - 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)
|
|||
* - FR_DENIED : The virtual partition feature has been shut down by switcher
|
||||
* - FR_DISK_ERR : A disk error happened
|
||||
* - 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)
|
||||
{
|
||||
|
@ -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_DENIED : The virtual partition feature has been shut down by switcher
|
||||
* - 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)
|
||||
{
|
||||
|
@ -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_DENIED : The virtual partition feature has been shut down by switcher
|
||||
* - 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)
|
||||
{
|
||||
|
@ -797,7 +797,7 @@ FRESULT f_getvirfree(const TCHAR *path, DWORD *nclst, DWORD *cclst)
|
|||
|
||||
/* If current FATFS is a CHILD FATFS */
|
||||
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) {
|
||||
dj.obj.fs = fs;
|
||||
fs->free_clst = fs->ct_clst;
|
||||
|
|
|
@ -44,14 +44,14 @@ extern "C" {
|
|||
#define PATH_MAX 256
|
||||
#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_READABLE // enable file system can be read
|
||||
#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 */
|
||||
#define CONFIG_FS_FAT_SECTOR_PER_BLOCK 64
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ int osShellCmdDoChdir(const char *path)
|
|||
char *fullpath = NULL;
|
||||
char *fullpath_bak = NULL;
|
||||
int ret;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -136,7 +136,7 @@ int osShellCmdLs(int argc, const char **argv)
|
|||
char *fullpath = NULL;
|
||||
const char *filename = NULL;
|
||||
int ret;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -182,7 +182,7 @@ int osShellCmdDoCatShow(UINTPTR arg)
|
|||
{
|
||||
int ret = 0;
|
||||
char buf[CAT_BUF_SIZE];
|
||||
size_t size, writen, toWrite;
|
||||
size_t size, written, toWrite;
|
||||
ssize_t cnt;
|
||||
char *fullpath = (char *)arg;
|
||||
FILE *ini = NULL;
|
||||
|
@ -207,9 +207,9 @@ int osShellCmdDoCatShow(UINTPTR arg)
|
|||
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)
|
||||
{
|
||||
/* avoid task-starvation */
|
||||
|
@ -222,7 +222,7 @@ int osShellCmdDoCatShow(UINTPTR arg)
|
|||
break;
|
||||
}
|
||||
|
||||
writen += cnt;
|
||||
written += cnt;
|
||||
toWrite -= cnt;
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ int osShellCmdCat(int argc, const char **argv)
|
|||
unsigned int ca_task;
|
||||
struct Vnode *vnode = NULL;
|
||||
TSK_INIT_PARAM_S init_param;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -329,7 +329,7 @@ int osShellCmdMount(int argc, const char **argv)
|
|||
char *data = NULL;
|
||||
char *filessystemtype = NULL;
|
||||
unsigned long mountfalgs;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -461,7 +461,7 @@ int osShellCmdUmount(int argc, const char **argv)
|
|||
char *target_path = NULL;
|
||||
int cmp_num;
|
||||
char *work_path = NULL;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -506,7 +506,7 @@ int osShellCmdMkdir(int argc, const char **argv)
|
|||
int ret;
|
||||
char *fullpath = NULL;
|
||||
const char *filename = NULL;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -531,7 +531,7 @@ int osShellCmdPwd(int argc, const char **argv)
|
|||
{
|
||||
char buf[SHOW_MAX_LEN] = {0};
|
||||
DIR *dir = NULL;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -577,7 +577,7 @@ int osShellCmdStatfs(int argc, const char **argv)
|
|||
unsigned long long total_size, free_size;
|
||||
char *fullpath = NULL;
|
||||
const char *filename = NULL;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -618,7 +618,7 @@ int osShellCmdTouch(int argc, const char **argv)
|
|||
int fd = -1;
|
||||
char *fullpath = NULL;
|
||||
const char *filename = NULL;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -659,7 +659,7 @@ static int os_shell_cmd_do_cp(const char *src_filepath, const char *dst_filename
|
|||
int dst_fd = -1;
|
||||
struct stat stat_buf;
|
||||
mode_t src_mode;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -1162,7 +1162,7 @@ int osShellCmdCp(int argc, const char **argv)
|
|||
char *dst_fullpath = NULL;
|
||||
struct stat stat_buf;
|
||||
int count = 0;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -1266,7 +1266,7 @@ int osShellCmdRm(int argc, const char **argv)
|
|||
int ret = 0;
|
||||
char *fullpath = NULL;
|
||||
const char *filename = NULL;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -1319,7 +1319,7 @@ int osShellCmdRmdir(int argc, const char **argv)
|
|||
int ret;
|
||||
char *fullpath = NULL;
|
||||
const char *filename = NULL;
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -1450,7 +1450,7 @@ int osShellCmdChmod(int argc, const char **argv)
|
|||
}
|
||||
filename = argv[1];
|
||||
|
||||
shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -1509,7 +1509,7 @@ int osShellCmdChown(int argc, const char **argv)
|
|||
attr.attr_chg_valid |= CHG_UID;
|
||||
}
|
||||
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL)
|
||||
{
|
||||
return -1;
|
||||
|
@ -1547,7 +1547,7 @@ int osShellCmdChgrp(int argc, const char **argv)
|
|||
attr.attr_chg_valid |= CHG_GID;
|
||||
}
|
||||
|
||||
char *shell_working_directory = OsShellGetWorkingDirtectory();
|
||||
char *shell_working_directory = OsShellGetWorkingDirectory();
|
||||
if (shell_working_directory == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@ config KERNEL_SMP
|
|||
This option will enable smp support of LiteOS.
|
||||
|
||||
config KERNEL_SMP_CORE_NUM
|
||||
int "Muti-processing Core Numbers"
|
||||
int "Multi-processing Core Numbers"
|
||||
default 2
|
||||
depends on KERNEL_SMP
|
||||
help
|
||||
This represents the number of muti-processing cores.
|
||||
This represents the number of multi-processing cores.
|
||||
|
||||
config KERNEL_SMP_LOCKDEP
|
||||
bool "Enable Spinlock Lockdep Check"
|
||||
|
@ -38,7 +38,7 @@ config KERNEL_SCHED_STATISTICS
|
|||
default n
|
||||
depends on KERNEL_SMP
|
||||
help
|
||||
This option will enable schedulder statistics.
|
||||
This option will enable scheduler statistics.
|
||||
|
||||
config KERNEL_MMU
|
||||
bool "Enable MMU"
|
||||
|
|
|
@ -505,7 +505,7 @@ LITE_OS_SEC_TEXT VOID OsTaskResourcesToFree(LosTaskCB *taskCB)
|
|||
LOS_ASSERT(!(processCB->vmSpace == NULL));
|
||||
UINT32 ret = OsUnMMap(processCB->vmSpace, (UINTPTR)mapBase, mapSize);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,11 +56,11 @@ typedef struct {
|
|||
SPIN_LOCK_S taskSortLinkSpin; /* task sort link spin lock */
|
||||
SortLinkAttribute swtmrSortLink; /* swtmr sort link */
|
||||
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 */
|
||||
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
|
||||
the current kernel is running */
|
||||
the current CPU is running */
|
||||
UINT32 idleTaskID; /* idle task id */
|
||||
UINT32 taskLockCnt; /* task lock flag */
|
||||
UINT32 swtmrHandlerQueue; /* software timer timeout queue id */
|
||||
|
|
|
@ -78,7 +78,7 @@ STATIC VOID OsSemPendedTaskNamePrint(LosSemCB *semNode)
|
|||
#ifdef LOSCFG_DEBUG_SEMAPHORE
|
||||
|
||||
typedef struct {
|
||||
UINT16 origSemCount; /* Number of orignal available semaphores */
|
||||
UINT16 origSemCount; /* Number of original available semaphores */
|
||||
UINT64 lastAccessTime; /* The last operation time */
|
||||
TSK_ENTRY_FUNC creater; /* The task entry who created this sem */
|
||||
} SemDebugCB;
|
||||
|
@ -235,7 +235,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID)
|
|||
return LOS_OK;
|
||||
} else {
|
||||
if (GET_SEM_INDEX(semID) >= LOSCFG_BASE_IPC_SEM_LIMIT) {
|
||||
PRINTK("\nInvalid semphore id!\n");
|
||||
PRINTK("\nInvalid semaphore id!\n");
|
||||
return LOS_OK;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID)
|
|||
(VOID)memcpy_s(&semNode, sizeof(LosSemCB), semCB, sizeof(LosSemCB));
|
||||
SCHEDULER_UNLOCK(intSave);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID)
|
|||
PRINTK(" 0x%08x 0x%u\n", semNode.semID, semNode.semCount);
|
||||
|
||||
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;
|
||||
} else {
|
||||
OsSemPendedTaskNamePrint(semCB);
|
||||
|
|
|
@ -555,7 +555,7 @@ int OsSigTimedWaitNoLock(sigset_t *set, siginfo_t *info, unsigned int timeout)
|
|||
if (sigcb->waitList.pstNext == NULL) {
|
||||
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;
|
||||
if (clear) {
|
||||
sigcb->sigPendFlag ^= clear;
|
||||
|
|
|
@ -189,7 +189,7 @@ STATIC BOOL OsLockDepCheckDependancy(const LosTaskCB *current, LosTaskCB *lockOw
|
|||
VOID OsLockDepCheckIn(SPIN_LOCK_S *lock)
|
||||
{
|
||||
UINT32 intSave;
|
||||
enum LockDepErrType checkResult = LOCKDEP_SUCEESS;
|
||||
enum LockDepErrType checkResult = LOCKDEP_SUCCESS;
|
||||
#ifdef LOSCFG_COMPILER_CLANG_LLVM
|
||||
VOID *requestAddr = (VOID *)__builtin_return_address(1);
|
||||
#else
|
||||
|
@ -223,10 +223,10 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock)
|
|||
}
|
||||
|
||||
OUT:
|
||||
if (checkResult == LOCKDEP_SUCEESS) {
|
||||
if (checkResult == LOCKDEP_SUCCESS) {
|
||||
/*
|
||||
* 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
|
||||
* only one task can successfully obtain the lock.
|
||||
*/
|
||||
|
@ -275,7 +275,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock)
|
|||
{
|
||||
UINT32 intSave;
|
||||
INT32 depth;
|
||||
enum LockDepErrType checkResult = LOCKDEP_SUCEESS;
|
||||
enum LockDepErrType checkResult = LOCKDEP_SUCCESS;
|
||||
#ifdef LOSCFG_COMPILER_CLANG_LLVM
|
||||
VOID *requestAddr = (VOID *)__builtin_return_address(1);
|
||||
#else
|
||||
|
|
|
@ -140,7 +140,7 @@ STATIC STATUS_T OsDoReadFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault)
|
|||
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)
|
||||
{
|
||||
UINT32 intSave;
|
||||
|
|
|
@ -141,9 +141,9 @@ LosMapInfo *OsGetMapInfo(LosFilePage *page, LosArchMmu *archMmu, VADDR_T vaddr)
|
|||
|
||||
VOID OsDeletePageCacheLru(LosFilePage *page)
|
||||
{
|
||||
/* delete form lru list */
|
||||
/* delete from lru list */
|
||||
OsLruCacheDel(page);
|
||||
/* delete from cache lits and free pmm if need */
|
||||
/* delete from cache list and free pmm if needed */
|
||||
OsPageCacheDel(page);
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ STATIC VOID OsPageCacheUnmap(LosFilePage *fpage, LosArchMmu *archMmu, VADDR_T va
|
|||
LOS_SpinLockSave(&fpage->physSeg->lruLock, &intSave);
|
||||
info = OsGetMapInfo(fpage, archMmu, vaddr);
|
||||
if (info == NULL) {
|
||||
VM_ERR("OsPageCacheUnmap get map info fail!");
|
||||
VM_ERR("OsPageCacheUnmap get map info failed!");
|
||||
} else {
|
||||
OsUnmapPageLocked(fpage, info);
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
VM_ERR("The dma type = %d is not support!", type);
|
||||
VM_ERR("The dma type = %d is not supported!", type);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ VOID OsShrinkActiveList(LosVmPhysSeg *physSeg, int nScan)
|
|||
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)) {
|
||||
LOS_SpinUnlock(&fpage->mapping->list_lock);
|
||||
continue;
|
||||
|
|
|
@ -95,7 +95,7 @@ INT32 GetFilepOps(const struct file *filep, struct file **privFilep, const struc
|
|||
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;
|
||||
|
||||
|
@ -363,7 +363,7 @@ STATIC INLINE VOID UserEndOfRead(CONSOLE_CB *consoleCB, struct file *filep,
|
|||
}
|
||||
|
||||
enum {
|
||||
STAT_NOMAL_KEY,
|
||||
STAT_NORMAL_KEY,
|
||||
STAT_ESC_KEY,
|
||||
STAT_MULTI_KEY
|
||||
};
|
||||
|
@ -381,22 +381,22 @@ STATIC INT32 UserShellCheckUDRL(const CHAR ch, INT32 *lastTokenType)
|
|||
}
|
||||
} else if (ch == 0x41) { /* up */
|
||||
if (*lastTokenType == STAT_MULTI_KEY) {
|
||||
*lastTokenType = STAT_NOMAL_KEY;
|
||||
*lastTokenType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x42) { /* down */
|
||||
if (*lastTokenType == STAT_MULTI_KEY) {
|
||||
*lastTokenType = STAT_NOMAL_KEY;
|
||||
*lastTokenType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x43) { /* right */
|
||||
if (*lastTokenType == STAT_MULTI_KEY) {
|
||||
*lastTokenType = STAT_NOMAL_KEY;
|
||||
*lastTokenType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x44) { /* left */
|
||||
if (*lastTokenType == STAT_MULTI_KEY) {
|
||||
*lastTokenType = STAT_NOMAL_KEY;
|
||||
*lastTokenType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru
|
|||
INT32 ret;
|
||||
INT32 needreturn = LOS_NOK;
|
||||
CHAR ch;
|
||||
INT32 lastTokenType = STAT_NOMAL_KEY;
|
||||
INT32 lastTokenType = STAT_NORMAL_KEY;
|
||||
|
||||
if (fops->read == NULL) {
|
||||
return -EFAULT;
|
||||
|
@ -504,7 +504,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru
|
|||
break;
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
|
||||
|
@ -738,7 +738,7 @@ ERROUT:
|
|||
STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen)
|
||||
{
|
||||
INT32 cnt;
|
||||
size_t writen = 0;
|
||||
size_t written = 0;
|
||||
size_t toWrite = bufLen;
|
||||
UINT32 intSave;
|
||||
|
||||
|
@ -749,18 +749,18 @@ STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen)
|
|||
}
|
||||
#endif
|
||||
LOS_CirBufLock(&cirBufSendCB->cirBufCB, &intSave);
|
||||
while (writen < (INT32)bufLen) {
|
||||
while (written < (INT32)bufLen) {
|
||||
/* 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);
|
||||
}
|
||||
|
||||
cnt = LOS_CirBufWrite(&cirBufSendCB->cirBufCB, &buffer[writen], 1);
|
||||
cnt = LOS_CirBufWrite(&cirBufSendCB->cirBufCB, &buffer[written], 1);
|
||||
if (cnt <= 0) {
|
||||
break;
|
||||
}
|
||||
toWrite -= cnt;
|
||||
writen += cnt;
|
||||
written += cnt;
|
||||
}
|
||||
LOS_CirBufUnlock(&cirBufSendCB->cirBufCB, intSave);
|
||||
/* 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)
|
|||
(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)
|
||||
|
|
|
@ -122,7 +122,7 @@ extern UINT32 __heap_end;
|
|||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Sched clck interval
|
||||
* Sched clock interval
|
||||
*/
|
||||
#define SCHED_CLOCK_INTETRVAL_TICKS LOSCFG_BASE_CORE_TICK_PER_SECOND
|
||||
|
||||
|
@ -405,7 +405,7 @@ extern UINT32 __heap_end;
|
|||
*
|
||||
* @par Description:
|
||||
* <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>
|
||||
* @attention
|
||||
* <ul>
|
||||
|
@ -419,7 +419,7 @@ extern UINT32 __heap_end;
|
|||
*
|
||||
* @retval none.
|
||||
* @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
|
||||
*/
|
||||
typedef VOID (*log_read_write_fn)(UINT32 startAddr, UINT32 space, UINT32 rwFlag, CHAR *buf);
|
||||
|
|
|
@ -74,7 +74,7 @@ STATIC MagicKeyOp g_magicHelpOp = {
|
|||
* ctrl+n/shift out=0xe,
|
||||
* ctrl+o/shift in=0xf,
|
||||
* ctrl+[/esc=0x1b,
|
||||
* ctrl+] used for telnet commond mode;
|
||||
* ctrl+] used for telnet command mode;
|
||||
*/
|
||||
STATIC MagicKeyOp *g_magicOpTable[MAGIC_KEY_NUM] = {
|
||||
&g_magicMemCheckOp, /* ctrl + e */
|
||||
|
|
|
@ -88,16 +88,16 @@ STATIC VOID UartOutput(const CHAR *str, UINT32 len, BOOL isLock)
|
|||
#ifdef LOSCFG_PLATFORM_CONSOLE
|
||||
STATIC VOID ConsoleOutput(const CHAR *str, UINT32 len)
|
||||
{
|
||||
ssize_t writen = 0;
|
||||
ssize_t written = 0;
|
||||
ssize_t cnt;
|
||||
ssize_t toWrite = len;
|
||||
|
||||
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)) {
|
||||
break;
|
||||
}
|
||||
writen += cnt;
|
||||
written += cnt;
|
||||
toWrite -= cnt;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ STATIC INT32 OsGetRealPath(const CHAR *fileName, CHAR *buf, UINT32 maxLen)
|
|||
UINT32 len, workPathLen, newLen;
|
||||
|
||||
if (access(fileName, F_OK) < 0) {
|
||||
workingDirectory = OsShellGetWorkingDirtectory();
|
||||
workingDirectory = OsShellGetWorkingDirectory();
|
||||
if (workingDirectory == NULL) {
|
||||
goto ERR_FILE;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ extern "C" {
|
|||
LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_QUEUE_WRITE, (const LosQueueCB *queueCB, UINT32 operateType, \
|
||||
UINT32 bufferSize, UINT32 timeout)) \
|
||||
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_POST, (const LosSemCB *semPosted, const LosTaskCB *resumedTask)) \
|
||||
LOS_HOOK_TYPE_DEF(LOS_HOOK_TYPE_SEM_PEND, (const LosSemCB *semPended, const LosTaskCB *runningTask, \
|
||||
|
|
|
@ -14,7 +14,7 @@ config TRACE_FRAME_CORE_MSG
|
|||
depends on TRACE_MSG_EXTEND
|
||||
|
||||
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
|
||||
depends on TRACE_MSG_EXTEND
|
||||
|
||||
|
@ -23,7 +23,7 @@ config TRACE_FRAME_MAX_PARAMS
|
|||
default 3
|
||||
depends on KERNEL_TRACE
|
||||
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
|
||||
prompt "Trace work mode"
|
||||
|
|
|
@ -62,7 +62,7 @@ LITE_OS_SEC_BSS STATIC UINT32 g_traceTaskId;
|
|||
#define EVENT_MASK 0xFFFFFFF0
|
||||
#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
|
||||
LITE_OS_SEC_BSS SPIN_LOCK_INIT(g_traceSpin);
|
||||
|
@ -74,8 +74,8 @@ STATIC_INLINE BOOL OsTraceHwiFilter(UINT32 hwiNum)
|
|||
#ifdef LOSCFG_KERNEL_SMP
|
||||
ret |= (hwiNum == LOS_MP_IPI_SCHEDULE);
|
||||
#endif
|
||||
if (g_traceHwiFliterHook != NULL) {
|
||||
ret |= g_traceHwiFliterHook(hwiNum);
|
||||
if (g_traceHwiFilterHook != NULL) {
|
||||
ret |= g_traceHwiFilterHook(hwiNum);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -102,13 +102,13 @@ STATIC VOID OsTraceSetFrame(TraceEventFrame *frame, UINT32 eventType, UINTPTR id
|
|||
#ifdef LOSCFG_TRACE_FRAME_CORE_MSG
|
||||
frame->core.cpuId = ArchCurrCpuid();
|
||||
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;
|
||||
#endif
|
||||
|
||||
#ifdef LOS_TRACE_FRAME_LR
|
||||
/* 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
|
||||
|
||||
#ifdef LOSCFG_TRACE_FRAME_EVENT_COUNT
|
||||
|
@ -371,7 +371,7 @@ VOID LOS_TraceHwiFilterHookReg(TRACE_HWI_FILTER_HOOK hook)
|
|||
UINT32 intSave;
|
||||
|
||||
TRACE_LOCK(intSave);
|
||||
g_traceHwiFliterHook = hook;
|
||||
g_traceHwiFilterHook = hook;
|
||||
TRACE_UNLOCK(intSave);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ typedef struct Spinlock SPIN_LOCK_S;
|
|||
#define MAX_LOCK_DEPTH 16U
|
||||
|
||||
enum LockDepErrType {
|
||||
LOCKDEP_SUCEESS = 0,
|
||||
LOCKDEP_SUCCESS = 0,
|
||||
LOCKDEP_ERR_DOUBLE_LOCK,
|
||||
LOCKDEP_ERR_DEAD_LOCK,
|
||||
LOCKDEP_ERR_UNLOCK_WITOUT_LOCK,
|
||||
|
|
|
@ -337,7 +337,7 @@ extern UINT32 LOS_SwtmrStop(UINT16 swtmrID);
|
|||
* specified by usSwTmrID.
|
||||
* @attention
|
||||
* <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>
|
||||
*
|
||||
* @param swtmrID [IN] Software timer ID created by LOS_SwtmrCreate. The value of ID should be in
|
||||
|
|
|
@ -58,7 +58,7 @@ extern "C" {
|
|||
#define LOSCFG_TRACE_OBJ_MAX_NAME_SIZE LOS_TASK_NAMELEN
|
||||
|
||||
#define LOS_TRACE_LR_RECORD 5
|
||||
#define LOS_TRACE_LR_IGNOR 0
|
||||
#define LOS_TRACE_LR_IGNORE 0
|
||||
/**
|
||||
* @ingroup los_trace
|
||||
* 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 {
|
|||
|
||||
/**
|
||||
* @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.
|
||||
* 28 4
|
||||
* 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 {
|
|||
#endif
|
||||
|
||||
#ifdef LOSCFG_TRACE_FRAME_EVENT_COUNT
|
||||
UINT32 eventCount; /**< the sequence of happend events */
|
||||
UINT32 eventCount; /**< the sequence of happened events */
|
||||
#endif
|
||||
|
||||
#ifdef LOS_TRACE_FRAME_LR
|
||||
|
@ -302,7 +302,7 @@ typedef struct {
|
|||
* @brief Define the type of trace hardware interrupt filter hook function.
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @attention
|
||||
|
@ -603,10 +603,10 @@ extern OfflineHead *LOS_TraceRecordGet(VOID);
|
|||
|
||||
/**
|
||||
* @ingroup los_trace
|
||||
* @brief Hwi num fliter hook.
|
||||
* @brief Hwi num filter hook.
|
||||
*
|
||||
* @par Description:
|
||||
* Hwi fliter function.
|
||||
* Hwi filter function.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>Filter the hwi events by hwi num</li>
|
||||
|
|
|
@ -734,7 +734,7 @@ u32_t lwip_ifconfig(int argc, const char **argv)
|
|||
LWIP:
|
||||
So in our case,
|
||||
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.
|
||||
|
||||
But while transmitting a packet TX case, underrun cannot happen because it block on the
|
||||
|
|
|
@ -86,7 +86,7 @@ typedef struct {
|
|||
}
|
||||
|
||||
#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 CmdModInfo *OsCmdInfoGet(VOID);
|
||||
|
|
|
@ -67,7 +67,7 @@ extern "C" {
|
|||
#define CMD_HISTORY_LEN 10
|
||||
#define CMD_MAX_PATH 256
|
||||
#define DEFAULT_SCREEN_WIDTH 80
|
||||
#define DEFAULT_SCREEN_HEIGNT 24
|
||||
#define DEFAULT_SCREEN_HEIGHT 24
|
||||
|
||||
#define SHELL_MODE 0
|
||||
#define OTHER_MODE 1
|
||||
|
@ -117,7 +117,7 @@ typedef enum {
|
|||
|
||||
/*
|
||||
* 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);
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ extern VOID LOS_LkPrint(INT32 level, const CHAR *func, INT32 line, const CHAR *f
|
|||
*
|
||||
* @par Description:
|
||||
* <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>
|
||||
*
|
||||
* @param LK_FUNC [IN] the print func.
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern CHAR *OsShellGetWorkingDirtectory(VOID);
|
||||
extern CHAR *OsShellGetWorkingDirectory(VOID);
|
||||
extern UINT32 OsShellInit(INT32 consoleId);
|
||||
extern INT32 OsShellDeinit(INT32 consoleId);
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ STATIC INT32 OsStrSeparate(CHAR *tabStr, CHAR *strPath, CHAR *nameLooking, UINT3
|
|||
CHAR *strEnd = NULL;
|
||||
CHAR *cutPos = NULL;
|
||||
CmdParsed parsed = {0};
|
||||
CHAR *shellWorkingDirectory = OsShellGetWorkingDirtectory();
|
||||
CHAR *shellWorkingDirectory = OsShellGetWorkingDirectory();
|
||||
INT32 ret;
|
||||
|
||||
ret = OsStrSeparateTabStrGet(&tabStr, &parsed, tabStrLen);
|
||||
|
@ -215,7 +215,7 @@ STATIC INT32 OsPrintMatchList(UINT32 count, const CHAR *strPath, const CHAR *nam
|
|||
return (INT32)OS_ERROR;
|
||||
}
|
||||
|
||||
if (count > (lineCap * DEFAULT_SCREEN_HEIGNT)) {
|
||||
if (count > (lineCap * DEFAULT_SCREEN_HEIGHT)) {
|
||||
ret = OsSurePrintAll(count);
|
||||
if (ret != 1) {
|
||||
return ret;
|
||||
|
@ -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
|
||||
* 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
|
||||
* cmdOut : Pass out the buffer string ,which has already been operated
|
||||
* size : cmdKey length
|
||||
|
@ -452,7 +452,7 @@ 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 invaild charactor */
|
||||
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */
|
||||
for (; *cmdKey != '\0'; cmdKey++) {
|
||||
/* Detected a Double Quotes, switch the matching status */
|
||||
if (*(cmdKey) == '\"') {
|
||||
|
@ -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) */
|
||||
/* 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) Invaild charactor, such as single quotes */
|
||||
/* 4) Invalid charactor, such as single quotes */
|
||||
if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ STATIC VOID ShellNotify(ShellCB *shellCB)
|
|||
}
|
||||
|
||||
enum {
|
||||
STAT_NOMAL_KEY,
|
||||
STAT_NORMAL_KEY,
|
||||
STAT_ESC_KEY,
|
||||
STAT_MULTI_KEY
|
||||
};
|
||||
|
@ -126,23 +126,23 @@ STATIC INT32 ShellCmdLineCheckUDRL(const CHAR ch, ShellCB *shellCB)
|
|||
} else if (ch == 0x41) { /* up */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
OsShellHistoryShow(CMD_KEY_UP, shellCB);
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x42) { /* down */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
OsShellHistoryShow(CMD_KEY_DOWN, shellCB);
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x43) { /* right */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
} else if (ch == 0x44) { /* left */
|
||||
if (shellCB->shellKeyType == STAT_MULTI_KEY) {
|
||||
shellCB->shellKeyType = STAT_NOMAL_KEY;
|
||||
shellCB->shellKeyType = STAT_NORMAL_KEY;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ LITE_OS_SEC_TEXT_MINOR VOID ShellCmdLineParse(CHAR c, pf_OUTPUT outputFunc, Shel
|
|||
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)
|
||||
|
|
|
@ -158,7 +158,7 @@ INT32 OsShellDeinit(INT32 consoleId)
|
|||
return 0;
|
||||
}
|
||||
|
||||
CHAR *OsShellGetWorkingDirtectory(VOID)
|
||||
CHAR *OsShellGetWorkingDirectory(VOID)
|
||||
{
|
||||
CONSOLE_CB *consoleCB = OsGetConsoleByTaskID(OsCurrTaskGet()->taskID);
|
||||
ShellCB *shellCB = NULL;
|
||||
|
|
|
@ -232,7 +232,7 @@ STATIC INT32 OsViewFileTime(const CHAR *filename)
|
|||
CHAR *fullpath = NULL;
|
||||
INT32 ret;
|
||||
CHAR buf[BUFFER_SIZE];
|
||||
CHAR *shellWorkingDirectory = OsShellGetWorkingDirtectory();
|
||||
CHAR *shellWorkingDirectory = OsShellGetWorkingDirectory();
|
||||
|
||||
ret = vfs_normalize_path(shellWorkingDirectory, filename, &fullpath);
|
||||
if (ret < 0) {
|
||||
|
|
|
@ -649,7 +649,7 @@ INT32 LOS_DmesgToFile(const CHAR *filename)
|
|||
CHAR *fullpath = NULL;
|
||||
CHAR *buf = NULL;
|
||||
INT32 ret;
|
||||
CHAR *shellWorkingDirectory = OsShellGetWorkingDirtectory();
|
||||
CHAR *shellWorkingDirectory = OsShellGetWorkingDirectory();
|
||||
UINT32 logSize, bufSize, head, tail, intSave;
|
||||
CHAR *logBuf = NULL;
|
||||
|
||||
|
|
|
@ -54,8 +54,8 @@ typedef struct {
|
|||
|
||||
STATIC WatchCB *g_watchCmd;
|
||||
|
||||
#define WATCH_COUNT_MAX 0xFFFFFF
|
||||
#define WATCH_INTETVAL_MAX 0xFFFFFF
|
||||
#define WATCH_COUNT_MAX 0xFFFFFF
|
||||
#define WATCH_INTERTVAL_MAX 0xFFFFFF
|
||||
|
||||
STATIC VOID PrintTime(VOID)
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ INT32 OsWatchOptionParsed(UINT32 argc, UINT32 *argoff, const CHAR **argv, WatchC
|
|||
return -1;
|
||||
}
|
||||
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");
|
||||
OsWatchCmdUsage();
|
||||
return -1;
|
||||
|
|
|
@ -112,7 +112,7 @@ VOID OsArmA32SyscallHandle(TaskContext *regs)
|
|||
nArgs = g_syscallNArgs[cmd / NARG_PER_BYTE]; /* 4bit per nargs */
|
||||
nArgs = (cmd & 1) ? (nArgs >> NARG_BITS) : (nArgs & NARG_MASK);
|
||||
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;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ static VOID *PthreadF01(VOID *argument)
|
|||
|
||||
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);
|
||||
|
||||
pthread_exit(0);
|
||||
|
|
|
@ -66,7 +66,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = pthread_setschedparam(newTh, 0, ¶m);
|
||||
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
|
||||
|
||||
ret = pthread_setschedparam(newTh, 4, ¶m); // 4, test for invaild param.
|
||||
ret = pthread_setschedparam(newTh, 4, ¶m); // 4, test for invalid param.
|
||||
ICUNIT_ASSERT_EQUAL(ret, EINVAL, ret);
|
||||
|
||||
ret = pthread_setschedparam(newTh, SCHED_RR, NULL);
|
||||
|
@ -103,13 +103,13 @@ static UINT32 Testcase(VOID)
|
|||
ret = pthread_setschedparam(newTh, SCHED_RR, ¶m);
|
||||
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
|
||||
|
||||
ret = pthread_setschedparam(newTh + 9, SCHED_RR, ¶m); // 9, test for invaild param.
|
||||
ret = pthread_setschedparam(newTh + 9, SCHED_RR, ¶m); // 9, test for invalid param.
|
||||
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
|
||||
|
||||
ret = pthread_getschedparam(newTh, &policy, ¶m2);
|
||||
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
|
||||
|
||||
ret = pthread_getschedparam(newTh + 8, &policy, ¶m2); // 8, test for invaild param.
|
||||
ret = pthread_getschedparam(newTh + 8, &policy, ¶m2); // 8, test for invalid param.
|
||||
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
|
||||
|
||||
ret = pthread_attr_destroy(&attr);
|
||||
|
|
|
@ -43,10 +43,10 @@ static UINT32 Testcase(VOID)
|
|||
int oldstate;
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
|
@ -56,10 +56,10 @@ static UINT32 Testcase(VOID)
|
|||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
|
|
@ -39,7 +39,7 @@ static int CheckedMmap(int prot, int flags, int fd)
|
|||
int ret;
|
||||
|
||||
if (pageSize < 0) {
|
||||
printf("err: mmap size invaild\n");
|
||||
printf("err: mmap size invalid\n");
|
||||
return -1;
|
||||
}
|
||||
p = mmap(NULL, pageSize, prot, flags, fd, 0);
|
||||
|
@ -64,11 +64,11 @@ static int Testcase(void)
|
|||
ICUNIT_ASSERT_NOT_EQUAL(shmfd, -1, shmfd);
|
||||
|
||||
if (pageSize <= 0) {
|
||||
printf("err: malloc size invaild\n");
|
||||
printf("err: malloc size invalid\n");
|
||||
return -1;
|
||||
}
|
||||
if (pageSize <= 0) {
|
||||
printf("err: malloc size invaild\n");
|
||||
printf("err: malloc size invalid\n");
|
||||
return -1;
|
||||
}
|
||||
buf = (char *)malloc(pageSize);
|
||||
|
|
|
@ -47,7 +47,7 @@ static UINT32 TestCase(VOID)
|
|||
status = WEXITSTATUS(status);
|
||||
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(errno, EINVAL, errno);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ static void *Xmalloc(unsigned n)
|
|||
{
|
||||
void *p = NULL;
|
||||
if (n <= 0) {
|
||||
printf("err: malloc size invaild\n");
|
||||
printf("err: malloc size invalid\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
p = malloc(n);
|
||||
|
|
Loading…
Reference in New Issue