Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
07cab404
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
07cab404
编写于
11月 11, 2021
作者:
O
openharmony_ci
提交者:
Gitee
11月 11, 2021
浏览文件
操作
浏览文件
下载
差异文件
!696 chore: 修复社区反馈问题Percpu结构体注释错误
Merge pull request !696 from kenneth/core_typo
上级
f63ce993
0f878feb
变更
53
隐藏空白更改
内联
并排
Showing
53 changed file
with
157 addition
and
157 deletion
+157
-157
apps/shell/builtin/cd.c
apps/shell/builtin/cd.c
+1
-1
apps/shell/include/shcmd.h
apps/shell/include/shcmd.h
+2
-2
apps/shell/include/shell.h
apps/shell/include/shell.h
+1
-1
apps/shell/include/show.h
apps/shell/include/show.h
+1
-1
apps/shell/src/shcmd.c
apps/shell/src/shcmd.c
+8
-8
apps/shell/src/shmsg.c
apps/shell/src/shmsg.c
+7
-7
arch/arm/arm/src/los_exc.c
arch/arm/arm/src/los_exc.c
+4
-4
arch/arm/gic/gic_v2.c
arch/arm/gic/gic_v2.c
+1
-1
drivers/block/disk/src/disk.c
drivers/block/disk/src/disk.c
+4
-4
fs/fat/Kconfig
fs/fat/Kconfig
+1
-1
fs/fat/virpart/src/virpart.c
fs/fat/virpart/src/virpart.c
+1
-1
fs/fat/virpart/src/virpartff.c
fs/fat/virpart/src/virpartff.c
+5
-5
fs/include/vfs_config.h
fs/include/vfs_config.h
+2
-2
fs/vfs/vfs_cmd/vfs_shellcmd.c
fs/vfs/vfs_cmd/vfs_shellcmd.c
+20
-20
kernel/Kconfig
kernel/Kconfig
+3
-3
kernel/base/core/los_task.c
kernel/base/core/los_task.c
+1
-1
kernel/base/include/los_percpu_pri.h
kernel/base/include/los_percpu_pri.h
+3
-3
kernel/base/ipc/los_sem_debug.c
kernel/base/ipc/los_sem_debug.c
+4
-4
kernel/base/ipc/los_signal.c
kernel/base/ipc/los_signal.c
+1
-1
kernel/base/mp/los_lockdep.c
kernel/base/mp/los_lockdep.c
+4
-4
kernel/base/vm/los_vm_fault.c
kernel/base/vm/los_vm_fault.c
+1
-1
kernel/base/vm/los_vm_filemap.c
kernel/base/vm/los_vm_filemap.c
+3
-3
kernel/base/vm/los_vm_iomap.c
kernel/base/vm/los_vm_iomap.c
+1
-1
kernel/base/vm/los_vm_scan.c
kernel/base/vm/los_vm_scan.c
+1
-1
kernel/common/console.c
kernel/common/console.c
+14
-14
kernel/common/los_config.h
kernel/common/los_config.h
+3
-3
kernel/common/los_magickey.c
kernel/common/los_magickey.c
+1
-1
kernel/common/los_printf.c
kernel/common/los_printf.c
+3
-3
kernel/extended/dynload/src/los_exec_elf.c
kernel/extended/dynload/src/los_exec_elf.c
+1
-1
kernel/extended/hook/include/los_hook_types.h
kernel/extended/hook/include/los_hook_types.h
+1
-1
kernel/extended/trace/Kconfig
kernel/extended/trace/Kconfig
+2
-2
kernel/extended/trace/los_trace.c
kernel/extended/trace/los_trace.c
+6
-6
kernel/include/los_lockdep.h
kernel/include/los_lockdep.h
+1
-1
kernel/include/los_swtmr.h
kernel/include/los_swtmr.h
+1
-1
kernel/include/los_trace.h
kernel/include/los_trace.h
+6
-6
net/lwip-2.1/enhancement/src/api_shell.c
net/lwip-2.1/enhancement/src/api_shell.c
+1
-1
shell/full/include/shcmd.h
shell/full/include/shcmd.h
+1
-1
shell/full/include/shell.h
shell/full/include/shell.h
+2
-2
shell/full/include/shell_lk.h
shell/full/include/shell_lk.h
+1
-1
shell/full/include/show.h
shell/full/include/show.h
+1
-1
shell/full/src/base/shcmd.c
shell/full/src/base/shcmd.c
+6
-6
shell/full/src/base/shmsg.c
shell/full/src/base/shmsg.c
+6
-6
shell/full/src/base/show.c
shell/full/src/base/show.c
+1
-1
shell/full/src/cmds/date_shellcmd.c
shell/full/src/cmds/date_shellcmd.c
+1
-1
shell/full/src/cmds/dmesg.c
shell/full/src/cmds/dmesg.c
+1
-1
shell/full/src/cmds/watch_shellcmd.c
shell/full/src/cmds/watch_shellcmd.c
+3
-3
syscall/los_syscall.c
syscall/los_syscall.c
+1
-1
testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_241.c
...s/kernel/sample/posix/pthread/full/It_posix_pthread_241.c
+1
-1
testsuites/kernel/sample/posix/pthread/smoke/It_posix_pthread_018.c
.../kernel/sample/posix/pthread/smoke/It_posix_pthread_018.c
+3
-3
testsuites/kernel/sample/posix/pthread/smoke/It_posix_pthread_021.c
.../kernel/sample/posix/pthread/smoke/It_posix_pthread_021.c
+4
-4
testsuites/unittest/mem/vm/smoke/mmap_test_002.cpp
testsuites/unittest/mem/vm/smoke/mmap_test_002.cpp
+3
-3
testsuites/unittest/sys/full/sys_test_028.cpp
testsuites/unittest/sys/full/sys_test_028.cpp
+1
-1
testsuites/unittest/util/smoke/util_test_007.cpp
testsuites/unittest/util/smoke/util_test_007.cpp
+1
-1
未找到文件。
apps/shell/builtin/cd.c
浏览文件 @
07cab404
...
...
@@ -46,7 +46,7 @@ int Chdir(const char *tgtDir)
ret
=
chdir
(
tgtDir
);
if
(
ret
==
0
)
{
ret
=
OsShellSetWorkingDir
tectory
(
tgtDir
,
strlen
(
tgtDir
)
+
1
);
/* 1: the length of '\0' */
ret
=
OsShellSetWorkingDir
ectory
(
tgtDir
,
strlen
(
tgtDir
)
+
1
);
/* 1: the length of '\0' */
}
return
ret
;
...
...
apps/shell/include/shcmd.h
浏览文件 @
07cab404
...
...
@@ -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_HEIG
N
T))
#define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIG
H
T))
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
OsShellSetWorkingDir
t
ectory
(
const
char
*
dir
,
size_t
len
);
extern
int
OsShellSetWorkingDirectory
(
const
char
*
dir
,
size_t
len
);
#ifdef __cplusplus
#if __cplusplus
...
...
apps/shell/include/shell.h
浏览文件 @
07cab404
...
...
@@ -54,7 +54,7 @@ extern "C" {
#define CMD_HISTORY_LEN 10
#define CMD_MAX_PATH 256
#define DEFAULT_SCREEN_WIDTH 80
#define DEFAULT_SCREEN_HEIG
N
T 24
#define DEFAULT_SCREEN_HEIG
H
T 24
#define SWITCH_QUOTES_STATUS(qu) do { \
if ((qu) == TRUE) { \
...
...
apps/shell/include/show.h
浏览文件 @
07cab404
...
...
@@ -42,7 +42,7 @@ extern "C" {
#endif
/* __cplusplus */
#endif
/* __cplusplus */
extern
char
*
OsShellGetWorkingDir
t
ectory
(
void
);
extern
char
*
OsShellGetWorkingDirectory
(
void
);
extern
unsigned
int
OsShellInit
(
void
);
extern
int
OsShellDeinit
(
ShellCB
*
shellCB
);
extern
ShellCB
*
OsGetShellCb
(
void
);
...
...
apps/shell/src/shcmd.c
浏览文件 @
07cab404
...
...
@@ -91,12 +91,12 @@ static int OsStrSeparateTabStrGet(const char **tabStr, CmdParsed *parsed, unsign
return
SH_OK
;
}
char
*
OsShellGetWorkingDir
tectory
(
)
char
*
OsShellGetWorkingDir
ectory
(
void
)
{
return
OsGetShellCb
()
->
shellWorkingDirectory
;
}
int
OsShellSetWorkingDir
t
ectory
(
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
=
OsShellGetWorkingDir
t
ectory
();
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_HEIG
N
T
))
{
if
(
count
>
(
lineCap
*
DEFAULT_SCREEN_HEIG
H
T
))
{
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 in
lc
ude:
* Description: Pass in the string and clear useless space ,which in
cl
ude:
* 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 va
il
d charatctor
* 2) Clear all space before first va
li
d 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 inva
il
d charactor */
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore inva
li
d 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) Inva
il
d charactor, such as single quotes */
/* 4) Inva
li
d charactor, such as single quotes */
if
((
*
cmdKey
==
' '
)
&&
((
*
(
cmdKey
+
1
)
==
' '
)
||
(
*
(
cmdKey
+
1
)
==
'\0'
))
&&
QUOTES_STATUS_CLOSE
(
quotes
))
{
continue
;
}
...
...
apps/shell/src/shmsg.c
浏览文件 @
07cab404
...
...
@@ -133,7 +133,7 @@ int ShellNotify(ShellCB *shellCB)
}
enum
{
STAT_NOMAL_KEY
,
STAT_NO
R
MAL_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_NO
R
MAL_KEY
;
return
ret
;
}
}
else
if
(
ch
==
0x42
)
{
/* down */
if
(
shellCB
->
shellKeyType
==
STAT_MULTI_KEY
)
{
shellCB
->
shellKeyType
=
STAT_NOMAL_KEY
;
shellCB
->
shellKeyType
=
STAT_NO
R
MAL_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_NO
R
MAL_KEY
;
return
ret
;
}
}
else
if
(
ch
==
0x44
)
{
/* left */
if
(
shellCB
->
shellKeyType
==
STAT_MULTI_KEY
)
{
shellCB
->
shellKeyType
=
STAT_NOMAL_KEY
;
shellCB
->
shellKeyType
=
STAT_NO
R
MAL_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_NO
R
MAL_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
)
OsShellSetWorkingDir
t
ectory
(
shellWorkingDirectory
,
(
PATH_MAX
+
1
));
(
void
)
OsShellSetWorkingDirectory
(
shellWorkingDirectory
,
(
PATH_MAX
+
1
));
}
OUT:
...
...
arch/arm/arm/src/los_exc.c
浏览文件 @
07cab404
...
...
@@ -244,7 +244,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3
STATIC
VOID
OsExcType
(
UINT32
excType
,
ExcContext
*
excBufAddr
,
UINT32
far
,
UINT32
fsr
)
{
/* undefin
it
ed 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
vmmF
al
gs
)
STATIC
VOID
OsDumpProcessUsedMemNode
(
UINT16
vmmF
la
gs
)
{
LosProcessCB
*
runProcess
=
NULL
;
LosVmSpace
*
runspace
=
NULL
;
...
...
@@ -500,7 +500,7 @@ STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs)
return
;
}
OsDumpProcessUsedMemRegion
(
runProcess
,
runspace
,
vmmF
al
gs
);
OsDumpProcessUsedMemRegion
(
runProcess
,
runspace
,
vmmF
la
gs
);
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
;
...
...
arch/arm/gic/gic_v2.c
浏览文件 @
07cab404
...
...
@@ -172,7 +172,7 @@ VOID HalIrqHandler(VOID)
OsInterrupt
(
vector
);
/* use orignal iar to do the EOI */
/* use orig
i
nal iar to do the EOI */
GIC_REG_32
(
GICC_EOIR
)
=
iar
;
}
...
...
drivers/block/disk/src/disk.c
浏览文件 @
07cab404
...
...
@@ -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, inva
il
d count, count = %u
\n
"
,
count
);
PRINT_ERR
(
"los_part_read failed, inva
li
d 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, inva
il
d sector, sector = %llu
\n
"
,
sector
);
PRINT_ERR
(
"los_part_read failed, inva
li
d 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, inva
il
d count, count = %u
\n
"
,
count
);
PRINT_ERR
(
"los_part_write failed, inva
li
d 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, inva
il
d sector, sector = %llu
\n
"
,
sector
);
PRINT_ERR
(
"los_part_write failed, inva
li
d sector, sector = %llu
\n
"
,
sector
);
goto
ERROR_HANDLE
;
}
}
...
...
fs/fat/Kconfig
浏览文件 @
07cab404
...
...
@@ -27,7 +27,7 @@ config FS_FAT_CHINESE
Answer Y to enable LiteOS fat filesystem support Chinese.
config FS_FAT_VIRTUAL_PARTITION
bool "Enab
el
Virtual Partition"
bool "Enab
le
Virtual Partition"
default n
depends on FS_FAT
...
...
fs/fat/virpart/src/virpart.c
浏览文件 @
07cab404
...
...
@@ -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 inva
il
d cluster
* - FR_CHAIN_ERR : The virtual partition entry has been rebuilt along the inva
li
d cluster
* chain.
* Others Return Value:
* Followed the by the lower API
...
...
fs/fat/virpart/src/virpartff.c
浏览文件 @
07cab404
...
...
@@ -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 va
ul
e:
* Acceptable return va
lu
e:
* - 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 inva
il
d value in current setting
* - FR_INVALID_PARAMETER : There is a inva
li
d 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 happen
e
d
*/
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 happen
e
d
*/
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 inva
il
d, the scan the FAT and update it */
/* If CHILD FATFS' free_clst is inva
li
d, the scan the FAT and update it */
if
(
fs
->
free_clst
>
fs
->
ct_clst
)
{
dj
.
obj
.
fs
=
fs
;
fs
->
free_clst
=
fs
->
ct_clst
;
...
...
fs/include/vfs_config.h
浏览文件 @
07cab404
...
...
@@ -44,14 +44,14 @@ extern "C" {
#define PATH_MAX 256
#define CONFIG_DISABLE_MQUEUE // disable posix mqueue inode configure
/* file system config
ur
*/
/* 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 config
ur
*/
/* 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
...
...
fs/vfs/vfs_cmd/vfs_shellcmd.c
浏览文件 @
07cab404
...
...
@@ -84,7 +84,7 @@ int osShellCmdDoChdir(const char *path)
char
*
fullpath
=
NULL
;
char
*
fullpath_bak
=
NULL
;
int
ret
;
char
*
shell_working_directory
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
,
writ
t
en
,
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
,
writ
t
en
=
0
;
toWrite
>
0
;)
{
cnt
=
write
(
1
,
buf
+
writen
,
toWrite
);
cnt
=
write
(
1
,
buf
+
writ
t
en
,
toWrite
);
if
(
cnt
==
0
)
{
/* avoid task-starvation */
...
...
@@ -222,7 +222,7 @@ int osShellCmdDoCatShow(UINTPTR arg)
break
;
}
writen
+=
cnt
;
writ
t
en
+=
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
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
=
OsShellGetWorkingDir
t
ectory
();
char
*
shell_working_directory
=
OsShellGetWorkingDirectory
();
if
(
shell_working_directory
==
NULL
)
{
return
-
1
;
}
...
...
kernel/Kconfig
浏览文件 @
07cab404
...
...
@@ -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 "Mu
l
ti-processing Core Numbers"
default 2
depends on KERNEL_SMP
help
This represents the number of muti-processing cores.
This represents the number of mu
l
ti-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 schedul
d
er statistics.
This option will enable scheduler statistics.
config KERNEL_MMU
bool "Enable MMU"
...
...
kernel/base/core/los_task.c
浏览文件 @
07cab404
...
...
@@ -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) u
n
mmap user task(%u) stack failed! mapbase: 0x%x size :0x%x, error: %d
\n
"
,
processCB
->
processID
,
taskCB
->
taskID
,
mapBase
,
mapSize
,
ret
);
}
...
...
kernel/base/include/los_percpu_pri.h
浏览文件 @
07cab404
...
...
@@ -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 T
ick interrupts */
UINT64
responseTime
;
/* Response time for current
CPU t
ick 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 */
...
...
kernel/base/ipc/los_sem_debug.c
浏览文件 @
07cab404
...
...
@@ -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 orig
i
nal 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
(
"
\n
Invalid semphore id!
\n
"
);
PRINTK
(
"
\n
Invalid sem
a
phore 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
(
"
\n
The semphore is not in use!
\n
"
);
PRINTK
(
"
\n
The sem
a
phore 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 sem
a
phore!
\n
"
);
return
LOS_OK
;
}
else
{
OsSemPendedTaskNamePrint
(
semCB
);
...
...
kernel/base/ipc/los_signal.c
浏览文件 @
07cab404
...
...
@@ -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, shou
n
d clear pending flag */
/* If pendingflag & set > 0, shou
l
d clear pending flag */
sigset_t
clear
=
sigcb
->
sigPendFlag
&
*
set
;
if
(
clear
)
{
sigcb
->
sigPendFlag
^=
clear
;
...
...
kernel/base/mp/los_lockdep.c
浏览文件 @
07cab404
...
...
@@ -189,7 +189,7 @@ STATIC BOOL OsLockDepCheckDependancy(const LosTaskCB *current, LosTaskCB *lockOw
VOID
OsLockDepCheckIn
(
SPIN_LOCK_S
*
lock
)
{
UINT32
intSave
;
enum
LockDepErrType
checkResult
=
LOCKDEP_SUC
E
ESS
;
enum
LockDepErrType
checkResult
=
LOCKDEP_SUC
C
ESS
;
#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_SUC
E
ESS
)
{
if
(
checkResult
==
LOCKDEP_SUC
C
ESS
)
{
/*
* 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 mu
l
ti-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_SUC
E
ESS
;
enum
LockDepErrType
checkResult
=
LOCKDEP_SUC
C
ESS
;
#ifdef LOSCFG_COMPILER_CLANG_LLVM
VOID
*
requestAddr
=
(
VOID
*
)
__builtin_return_address
(
1
);
#else
...
...
kernel/base/vm/los_vm_fault.c
浏览文件 @
07cab404
...
...
@@ -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 happen
e
d only */
STATIC
LosVmPage
*
OsCowUnmapOrg
(
LosArchMmu
*
archMmu
,
LosVmMapRegion
*
region
,
LosVmPgFault
*
vmf
)
{
UINT32
intSave
;
...
...
kernel/base/vm/los_vm_filemap.c
浏览文件 @
07cab404
...
...
@@ -141,9 +141,9 @@ LosMapInfo *OsGetMapInfo(LosFilePage *page, LosArchMmu *archMmu, VADDR_T vaddr)
VOID
OsDeletePageCacheLru
(
LosFilePage
*
page
)
{
/* delete f
or
m lru list */
/* delete f
ro
m lru list */
OsLruCacheDel
(
page
);
/* delete from cache li
ts and free pmm if ne
ed */
/* delete from cache li
st and free pmm if need
ed */
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 fail
ed
!"
);
}
else
{
OsUnmapPageLocked
(
fpage
,
info
);
}
...
...
kernel/base/vm/los_vm_iomap.c
浏览文件 @
07cab404
...
...
@@ -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 support
ed
!"
,
type
);
return
NULL
;
}
...
...
kernel/base/vm/los_vm_scan.c
浏览文件 @
07cab404
...
...
@@ -217,7 +217,7 @@ VOID OsShrinkActiveList(LosVmPhysSeg *physSeg, int nScan)
continue
;
}
/* happend when caller hold cache lock and try reclaim this page */
/* happen
e
d when caller hold cache lock and try reclaim this page */
if
(
OsIsPageLocked
(
fpage
->
vmPage
))
{
LOS_SpinUnlock
(
&
fpage
->
mapping
->
list_lock
);
continue
;
...
...
kernel/common/console.c
浏览文件 @
07cab404
...
...
@@ -95,7 +95,7 @@ INT32 GetFilepOps(const struct file *filep, struct file **privFilep, const struc
goto
ERROUT
;
}
/* to find uart driver operation function throu
tht
u.i_opss */
/* to find uart driver operation function throu
gh
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_NO
R
MAL_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_NO
R
MAL_KEY
;
return
ret
;
}
}
else
if
(
ch
==
0x42
)
{
/* down */
if
(
*
lastTokenType
==
STAT_MULTI_KEY
)
{
*
lastTokenType
=
STAT_NOMAL_KEY
;
*
lastTokenType
=
STAT_NO
R
MAL_KEY
;
return
ret
;
}
}
else
if
(
ch
==
0x43
)
{
/* right */
if
(
*
lastTokenType
==
STAT_MULTI_KEY
)
{
*
lastTokenType
=
STAT_NOMAL_KEY
;
*
lastTokenType
=
STAT_NO
R
MAL_KEY
;
return
ret
;
}
}
else
if
(
ch
==
0x44
)
{
/* left */
if
(
*
lastTokenType
==
STAT_MULTI_KEY
)
{
*
lastTokenType
=
STAT_NOMAL_KEY
;
*
lastTokenType
=
STAT_NO
R
MAL_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_NO
R
MAL_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 retur
e
n 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
writ
t
en
=
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
(
writ
t
en
<
(
INT32
)
bufLen
)
{
/* Transform for CR/LR mode */
if
((
buffer
[
writ
en
]
==
'\n'
)
||
(
buffer
[
wri
ten
]
==
'\r'
))
{
if
((
buffer
[
writ
ten
]
==
'\n'
)
||
(
buffer
[
writ
ten
]
==
'\r'
))
{
(
VOID
)
LOS_CirBufWrite
(
&
cirBufSendCB
->
cirBufCB
,
"
\r
"
,
1
);
}
cnt
=
LOS_CirBufWrite
(
&
cirBufSendCB
->
cirBufCB
,
&
buffer
[
writen
],
1
);
cnt
=
LOS_CirBufWrite
(
&
cirBufSendCB
->
cirBufCB
,
&
buffer
[
writ
t
en
],
1
);
if
(
cnt
<=
0
)
{
break
;
}
toWrite
-=
cnt
;
writen
+=
cnt
;
writ
t
en
+=
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
writ
t
en
;
}
STATIC
ssize_t
ConsoleWrite
(
struct
file
*
filep
,
const
CHAR
*
buffer
,
size_t
bufLen
)
...
...
kernel/common/los_config.h
浏览文件 @
07cab404
...
...
@@ -122,7 +122,7 @@ extern UINT32 __heap_end;
/**
* @ingroup los_config
* Sched clck interval
* Sched cl
o
ck 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 defin
a
tion is used to declare the type of functions for reading or writing exception information</li>
* <li>This defin
i
tion 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 defin
a
tion.</li></ul>
* <ul><li>los_config.h: the header file that contains the type defin
i
tion.</li></ul>
* @see
*/
typedef
VOID
(
*
log_read_write_fn
)(
UINT32
startAddr
,
UINT32
space
,
UINT32
rwFlag
,
CHAR
*
buf
);
...
...
kernel/common/los_magickey.c
浏览文件 @
07cab404
...
...
@@ -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 comm
o
nd mode;
* ctrl+] used for telnet comm
a
nd mode;
*/
STATIC
MagicKeyOp
*
g_magicOpTable
[
MAGIC_KEY_NUM
]
=
{
&
g_magicMemCheckOp
,
/* ctrl + e */
...
...
kernel/common/los_printf.c
浏览文件 @
07cab404
...
...
@@ -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
writ
t
en
=
0
;
ssize_t
cnt
;
ssize_t
toWrite
=
len
;
for
(;;)
{
cnt
=
write
(
STDOUT_FILENO
,
str
+
writen
,
(
size_t
)
toWrite
);
cnt
=
write
(
STDOUT_FILENO
,
str
+
writ
t
en
,
(
size_t
)
toWrite
);
if
((
cnt
<
0
)
||
((
cnt
==
0
)
&&
(
OS_INT_ACTIVE
))
||
(
toWrite
==
cnt
))
{
break
;
}
writen
+=
cnt
;
writ
t
en
+=
cnt
;
toWrite
-=
cnt
;
}
}
...
...
kernel/extended/dynload/src/los_exec_elf.c
浏览文件 @
07cab404
...
...
@@ -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
=
OsShellGetWorkingDir
t
ectory
();
workingDirectory
=
OsShellGetWorkingDirectory
();
if
(
workingDirectory
==
NULL
)
{
goto
ERR_FILE
;
}
...
...
kernel/extended/hook/include/los_hook_types.h
浏览文件 @
07cab404
...
...
@@ -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 sem
a
phore 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, \
...
...
kernel/extended/trace/Kconfig
浏览文件 @
07cab404
...
...
@@ -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 happen
e
d 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#_PAR
MA
S in los_trace.h, e.g. TASK_SWITCH_PARAMS
Make sure the max value is bigger than the number defined by each #MODULE#_#TYPE#_PAR
AM
S in los_trace.h, e.g. TASK_SWITCH_PARAMS
choice
prompt "Trace work mode"
...
...
kernel/extended/trace/los_trace.c
浏览文件 @
07cab404
...
...
@@ -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_traceHwiF
li
terHook
=
NULL
;
LITE_OS_SEC_BSS
STATIC
TRACE_HWI_FILTER_HOOK
g_traceHwiF
il
terHook
=
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_traceHwiF
li
terHook
!=
NULL
)
{
ret
|=
g_traceHwiF
li
terHook
(
hwiNum
);
if
(
g_traceHwiF
il
terHook
!=
NULL
)
{
ret
|=
g_traceHwiF
il
terHook
(
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 va
ul
e = 0xF */
frame
->
core
.
taskLockCnt
=
MIN
(
OsPercpuGet
()
->
taskLockCnt
,
0xF
);
/* taskLockCnt is 4 bits, max va
lu
e = 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_IGNOR
E
);
#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_traceHwiF
li
terHook
=
hook
;
g_traceHwiF
il
terHook
=
hook
;
TRACE_UNLOCK
(
intSave
);
}
...
...
kernel/include/los_lockdep.h
浏览文件 @
07cab404
...
...
@@ -43,7 +43,7 @@ typedef struct Spinlock SPIN_LOCK_S;
#define MAX_LOCK_DEPTH 16U
enum
LockDepErrType
{
LOCKDEP_SUC
E
ESS
=
0
,
LOCKDEP_SUC
C
ESS
=
0
,
LOCKDEP_ERR_DOUBLE_LOCK
,
LOCKDEP_ERR_DEAD_LOCK
,
LOCKDEP_ERR_UNLOCK_WITOUT_LOCK
,
...
...
kernel/include/los_swtmr.h
浏览文件 @
07cab404
...
...
@@ -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 happen
e
ds otherwise.</li>
* </ul>
*
* @param swtmrID [IN] Software timer ID created by LOS_SwtmrCreate. The value of ID should be in
...
...
kernel/include/los_trace.h
浏览文件 @
07cab404
...
...
@@ -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_IGNOR
E
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 happen
e
d 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 happen
e
d 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 f
li
ter function by LOS_TraceHwiFilterHookReg to filter hardware interrupt events. Return true if
* User can register f
il
ter 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 f
li
ter hook.
* @brief Hwi num f
il
ter hook.
*
* @par Description:
* Hwi f
li
ter function.
* Hwi f
il
ter function.
* @attention
* <ul>
* <li>Filter the hwi events by hwi num</li>
...
...
net/lwip-2.1/enhancement/src/api_shell.c
浏览文件 @
07cab404
...
...
@@ -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 happen
e
d.
So this can be RX overrun.
But while transmitting a packet TX case, underrun cannot happen because it block on the
...
...
shell/full/include/shcmd.h
浏览文件 @
07cab404
...
...
@@ -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_HEIG
N
T))
#define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIG
H
T))
extern
UINT32
OsCmdInit
(
VOID
);
extern
CmdModInfo
*
OsCmdInfoGet
(
VOID
);
...
...
shell/full/include/shell.h
浏览文件 @
07cab404
...
...
@@ -67,7 +67,7 @@ extern "C" {
#define CMD_HISTORY_LEN 10
#define CMD_MAX_PATH 256
#define DEFAULT_SCREEN_WIDTH 80
#define DEFAULT_SCREEN_HEIG
N
T 24
#define DEFAULT_SCREEN_HEIG
H
T 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 differ
e
nt module's func for registration
*/
typedef
UINT32
(
*
CmdCallBackFunc
)(
UINT32
argc
,
const
CHAR
**
argv
);
...
...
shell/full/include/shell_lk.h
浏览文件 @
07cab404
...
...
@@ -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 registe
r
a hook function to LK.</li>
* </ul>
*
* @param LK_FUNC [IN] the print func.
...
...
shell/full/include/show.h
浏览文件 @
07cab404
...
...
@@ -40,7 +40,7 @@ extern "C" {
#endif
/* __cplusplus */
#endif
/* __cplusplus */
extern
CHAR
*
OsShellGetWorkingDir
t
ectory
(
VOID
);
extern
CHAR
*
OsShellGetWorkingDirectory
(
VOID
);
extern
UINT32
OsShellInit
(
INT32
consoleId
);
extern
INT32
OsShellDeinit
(
INT32
consoleId
);
...
...
shell/full/src/base/shcmd.c
浏览文件 @
07cab404
...
...
@@ -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
=
OsShellGetWorkingDir
t
ectory
();
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_HEIG
N
T
))
{
if
(
count
>
(
lineCap
*
DEFAULT_SCREEN_HEIG
H
T
))
{
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 inlc
ude:
* Description: Pass in the string and clear useless space
, which incl
ude:
* 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 va
il
d charatctor
* 2) Clear all space before first va
li
d 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 inva
il
d charactor */
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore inva
li
d 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) Inva
il
d charactor, such as single quotes */
/* 4) Inva
li
d charactor, such as single quotes */
if
((
*
cmdKey
==
' '
)
&&
((
*
(
cmdKey
+
1
)
==
' '
)
||
(
*
(
cmdKey
+
1
)
==
'\0'
))
&&
QUOTES_STATUS_CLOSE
(
quotes
))
{
continue
;
}
...
...
shell/full/src/base/shmsg.c
浏览文件 @
07cab404
...
...
@@ -107,7 +107,7 @@ STATIC VOID ShellNotify(ShellCB *shellCB)
}
enum
{
STAT_NOMAL_KEY
,
STAT_NO
R
MAL_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_NO
R
MAL_KEY
;
return
ret
;
}
}
else
if
(
ch
==
0x42
)
{
/* down */
if
(
shellCB
->
shellKeyType
==
STAT_MULTI_KEY
)
{
shellCB
->
shellKeyType
=
STAT_NOMAL_KEY
;
shellCB
->
shellKeyType
=
STAT_NO
R
MAL_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_NO
R
MAL_KEY
;
return
ret
;
}
}
else
if
(
ch
==
0x44
)
{
/* left */
if
(
shellCB
->
shellKeyType
==
STAT_MULTI_KEY
)
{
shellCB
->
shellKeyType
=
STAT_NOMAL_KEY
;
shellCB
->
shellKeyType
=
STAT_NO
R
MAL_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_NO
R
MAL_KEY
;
}
LITE_OS_SEC_TEXT_MINOR
UINT32
ShellMsgTypeGet
(
CmdParsed
*
cmdParsed
,
const
CHAR
*
cmdType
)
...
...
shell/full/src/base/show.c
浏览文件 @
07cab404
...
...
@@ -158,7 +158,7 @@ INT32 OsShellDeinit(INT32 consoleId)
return
0
;
}
CHAR
*
OsShellGetWorkingDir
t
ectory
(
VOID
)
CHAR
*
OsShellGetWorkingDirectory
(
VOID
)
{
CONSOLE_CB
*
consoleCB
=
OsGetConsoleByTaskID
(
OsCurrTaskGet
()
->
taskID
);
ShellCB
*
shellCB
=
NULL
;
...
...
shell/full/src/cmds/date_shellcmd.c
浏览文件 @
07cab404
...
...
@@ -232,7 +232,7 @@ STATIC INT32 OsViewFileTime(const CHAR *filename)
CHAR
*
fullpath
=
NULL
;
INT32
ret
;
CHAR
buf
[
BUFFER_SIZE
];
CHAR
*
shellWorkingDirectory
=
OsShellGetWorkingDir
t
ectory
();
CHAR
*
shellWorkingDirectory
=
OsShellGetWorkingDirectory
();
ret
=
vfs_normalize_path
(
shellWorkingDirectory
,
filename
,
&
fullpath
);
if
(
ret
<
0
)
{
...
...
shell/full/src/cmds/dmesg.c
浏览文件 @
07cab404
...
...
@@ -649,7 +649,7 @@ INT32 LOS_DmesgToFile(const CHAR *filename)
CHAR
*
fullpath
=
NULL
;
CHAR
*
buf
=
NULL
;
INT32
ret
;
CHAR
*
shellWorkingDirectory
=
OsShellGetWorkingDir
t
ectory
();
CHAR
*
shellWorkingDirectory
=
OsShellGetWorkingDirectory
();
UINT32
logSize
,
bufSize
,
head
,
tail
,
intSave
;
CHAR
*
logBuf
=
NULL
;
...
...
shell/full/src/cmds/watch_shellcmd.c
浏览文件 @
07cab404
...
...
@@ -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_INTE
R
TVAL_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_INTE
R
TVAL_MAX
))
{
PRINTK
(
"
\n
interval time is invalid
\n
"
);
OsWatchCmdUsage
();
return
-
1
;
...
...
syscall/los_syscall.c
浏览文件 @
07cab404
...
...
@@ -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
(
"Unsupport
ed
syscall ID: %d nArgs: %d
\n
"
,
cmd
,
nArgs
);
regs
->
R0
=
-
ENOSYS
;
return
;
}
...
...
testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_241.c
浏览文件 @
07cab404
...
...
@@ -43,7 +43,7 @@ static VOID *PthreadF01(VOID *argument)
g_testCount
++
;
ret
=
pthread_setcancelstate
(
-
100
,
NULL
);
// -100, test for inva
il
d param.
ret
=
pthread_setcancelstate
(
-
100
,
NULL
);
// -100, test for inva
li
d param.
ICUNIT_TRACK_EQUAL
(
ret
,
EINVAL
,
ret
);
pthread_exit
(
0
);
...
...
testsuites/kernel/sample/posix/pthread/smoke/It_posix_pthread_018.c
浏览文件 @
07cab404
...
...
@@ -66,7 +66,7 @@ static UINT32 Testcase(VOID)
ret
=
pthread_setschedparam
(
newTh
,
0
,
&
param
);
ICUNIT_ASSERT_EQUAL
(
ret
,
EINVAL
,
ret
);
ret
=
pthread_setschedparam
(
newTh
,
4
,
&
param
);
// 4, test for inva
il
d param.
ret
=
pthread_setschedparam
(
newTh
,
4
,
&
param
);
// 4, test for inva
li
d 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
,
&
param
);
ICUNIT_ASSERT_EQUAL
(
ret
,
ESRCH
,
ret
);
ret
=
pthread_setschedparam
(
newTh
+
9
,
SCHED_RR
,
&
param
);
// 9, test for inva
il
d param.
ret
=
pthread_setschedparam
(
newTh
+
9
,
SCHED_RR
,
&
param
);
// 9, test for inva
li
d param.
ICUNIT_ASSERT_EQUAL
(
ret
,
ESRCH
,
ret
);
ret
=
pthread_getschedparam
(
newTh
,
&
policy
,
&
param2
);
ICUNIT_ASSERT_EQUAL
(
ret
,
ESRCH
,
ret
);
ret
=
pthread_getschedparam
(
newTh
+
8
,
&
policy
,
&
param2
);
// 8, test for inva
il
d param.
ret
=
pthread_getschedparam
(
newTh
+
8
,
&
policy
,
&
param2
);
// 8, test for inva
li
d param.
ICUNIT_ASSERT_EQUAL
(
ret
,
ESRCH
,
ret
);
ret
=
pthread_attr_destroy
(
&
attr
);
...
...
testsuites/kernel/sample/posix/pthread/smoke/It_posix_pthread_021.c
浏览文件 @
07cab404
...
...
@@ -43,10 +43,10 @@ static UINT32 Testcase(VOID)
int
oldstate
;
int
oldstype
;
ret
=
pthread_setcancelstate
(
2
,
&
oldstate
);
// 2, test for inva
il
d param.
ret
=
pthread_setcancelstate
(
2
,
&
oldstate
);
// 2, test for inva
li
d param.
ICUNIT_ASSERT_EQUAL
(
ret
,
EINVAL
,
ret
);
ret
=
pthread_setcancelstate
(
3
,
&
oldstate
);
// 3, test for inva
il
d param.
ret
=
pthread_setcancelstate
(
3
,
&
oldstate
);
// 3, test for inva
li
d 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 inva
il
d param.
ret
=
pthread_setcanceltype
(
2
,
&
oldstype
);
// 2, test for inva
li
d param.
ICUNIT_ASSERT_EQUAL
(
ret
,
EINVAL
,
ret
);
ret
=
pthread_setcanceltype
(
3
,
&
oldstype
);
// 3, test for inva
il
d param.
ret
=
pthread_setcanceltype
(
3
,
&
oldstype
);
// 3, test for inva
li
d param.
ICUNIT_ASSERT_EQUAL
(
ret
,
EINVAL
,
ret
);
ret
=
pthread_setcanceltype
(
PTHREAD_CANCEL_ASYNCHRONOUS
,
NULL
);
...
...
testsuites/unittest/mem/vm/smoke/mmap_test_002.cpp
浏览文件 @
07cab404
...
...
@@ -39,7 +39,7 @@ static int CheckedMmap(int prot, int flags, int fd)
int
ret
;
if
(
pageSize
<
0
)
{
printf
(
"err: mmap size inva
il
d
\n
"
);
printf
(
"err: mmap size inva
li
d
\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 inva
il
d
\n
"
);
printf
(
"err: malloc size inva
li
d
\n
"
);
return
-
1
;
}
if
(
pageSize
<=
0
)
{
printf
(
"err: malloc size inva
il
d
\n
"
);
printf
(
"err: malloc size inva
li
d
\n
"
);
return
-
1
;
}
buf
=
(
char
*
)
malloc
(
pageSize
);
...
...
testsuites/unittest/sys/full/sys_test_028.cpp
浏览文件 @
07cab404
...
...
@@ -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 inva
il
d priority for test */
ret
=
nice
(
-
40
);
/* -40, set inva
li
d priority for test */
ICUNIT_ASSERT_EQUAL
(
ret
,
-
1
,
ret
);
ICUNIT_ASSERT_EQUAL
(
errno
,
EINVAL
,
errno
);
}
...
...
testsuites/unittest/util/smoke/util_test_007.cpp
浏览文件 @
07cab404
...
...
@@ -36,7 +36,7 @@ static void *Xmalloc(unsigned n)
{
void
*
p
=
NULL
;
if
(
n
<=
0
)
{
printf
(
"err: malloc size inva
il
d
\n
"
);
printf
(
"err: malloc size inva
li
d
\n
"
);
exit
(
EXIT_FAILURE
);
}
p
=
malloc
(
n
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录