Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
efd00c1e
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
462
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看板
未验证
提交
efd00c1e
编写于
4月 25, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
!872 内核codex清零
Merge pull request !872 from Kiita/0421_codex
上级
6d7641af
ffe7462c
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
76 addition
and
76 deletion
+76
-76
arch/arm/arm/src/los_exc.c
arch/arm/arm/src/los_exc.c
+3
-3
compat/posix/src/pthread.c
compat/posix/src/pthread.c
+1
-1
fs/proc/os_adapt/fd_proc.c
fs/proc/os_adapt/fd_proc.c
+1
-1
fs/vfs/operation/vfs_init.c
fs/vfs/operation/vfs_init.c
+4
-4
fs/vfs/operation/vfs_other.c
fs/vfs/operation/vfs_other.c
+3
-3
fs/vfs/path_cache.c
fs/vfs/path_cache.c
+1
-1
fs/vfs/vnode.c
fs/vfs/vnode.c
+1
-1
kernel/base/core/los_process.c
kernel/base/core/los_process.c
+1
-1
kernel/base/core/los_task.c
kernel/base/core/los_task.c
+1
-1
kernel/base/ipc/los_futex.c
kernel/base/ipc/los_futex.c
+5
-5
kernel/base/ipc/los_signal.c
kernel/base/ipc/los_signal.c
+2
-2
kernel/base/mem/tlsf/los_memory.c
kernel/base/mem/tlsf/los_memory.c
+18
-18
kernel/base/misc/los_stackinfo.c
kernel/base/misc/los_stackinfo.c
+1
-1
kernel/base/misc/mempt_shellcmd.c
kernel/base/misc/mempt_shellcmd.c
+1
-1
kernel/base/mp/los_lockdep.c
kernel/base/mp/los_lockdep.c
+2
-2
kernel/base/sched/sched_sq/los_sched.c
kernel/base/sched/sched_sq/los_sched.c
+2
-2
kernel/base/vm/los_vm_dump.c
kernel/base/vm/los_vm_dump.c
+5
-5
kernel/base/vm/los_vm_phys.c
kernel/base/vm/los_vm_phys.c
+3
-3
kernel/base/vm/los_vm_syscall.c
kernel/base/vm/los_vm_syscall.c
+1
-1
kernel/base/vm/oom.c
kernel/base/vm/oom.c
+2
-2
kernel/common/rootfs/los_bootargs.c
kernel/common/rootfs/los_bootargs.c
+2
-2
kernel/extended/dynload/src/los_load_elf.c
kernel/extended/dynload/src/los_load_elf.c
+3
-3
kernel/extended/liteipc/hm_liteipc.c
kernel/extended/liteipc/hm_liteipc.c
+10
-10
platform/los_hilog.c
platform/los_hilog.c
+1
-1
syscall/los_syscall.c
syscall/los_syscall.c
+2
-2
未找到文件。
arch/arm/arm/src/los_exc.c
浏览文件 @
efd00c1e
...
...
@@ -455,7 +455,7 @@ STATIC VOID OsDumpExcVaddrRegion(LosVmSpace *space, LosVmMapRegion *region)
mmuFlag
=
FALSE
;
}
PrintExcInfo
(
" 0x%08x 0x%08x 0x%08x
\n
"
,
startVaddr
,
LOS_PaddrToKVaddr
(
startPaddr
),
(
UINT32
)
pageCount
<<
PAGE_SHIFT
);
startVaddr
,
(
UINTPTR
)
LOS_PaddrToKVaddr
(
startPaddr
),
(
UINT32
)
pageCount
<<
PAGE_SHIFT
);
pageCount
=
0
;
startPaddr
=
0
;
}
...
...
@@ -516,7 +516,7 @@ VOID OsDumpContextMem(const ExcContext *excBufAddr)
for
(
excReg
=
&
(
excBufAddr
->
R0
);
count
<=
DUMPREGS
;
excReg
++
,
count
++
)
{
if
(
IS_VALID_ADDR
(
*
excReg
))
{
PrintExcInfo
(
"
\n
dump mem around R%u:
%p
"
,
count
,
(
*
excReg
));
PrintExcInfo
(
"
\n
dump mem around R%u:
0x%x
"
,
count
,
(
*
excReg
));
OsDumpMemByte
(
DUMPSIZE
,
((
*
excReg
)
-
(
DUMPSIZE
>>
1
)));
}
}
...
...
@@ -812,7 +812,7 @@ VOID OsCallStackInfo(VOID)
PrintExcInfo
(
"runTask->stackPointer = 0x%x
\n
"
"runTask->topOfStack = 0x%x
\n
"
"text_start:0x%x,text_end:0x%x
\n
"
,
stackPointer
,
runTask
->
topOfStack
,
&
__text_start
,
&
__text_end
);
(
UINTPTR
)
stackPointer
,
runTask
->
topOfStack
,
&
__text_start
,
&
__text_end
);
while
((
stackPointer
>
(
UINT32
*
)
runTask
->
topOfStack
)
&&
(
count
<
OS_MAX_BACKTRACE
))
{
if
((
*
stackPointer
>
(
UINTPTR
)(
&
__text_start
))
&&
...
...
compat/posix/src/pthread.c
浏览文件 @
efd00c1e
...
...
@@ -231,7 +231,7 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
SetPthreadAttr
(
self
,
attr
,
&
userAttr
);
(
VOID
)
snprintf_s
(
name
,
sizeof
(
name
),
sizeof
(
name
)
-
1
,
"pth%02
d
"
,
pthreadNumber
);
(
VOID
)
snprintf_s
(
name
,
sizeof
(
name
),
sizeof
(
name
)
-
1
,
"pth%02
u
"
,
pthreadNumber
);
pthreadNumber
++
;
taskInitParam
.
pcName
=
name
;
...
...
fs/proc/os_adapt/fd_proc.c
浏览文件 @
efd00c1e
...
...
@@ -75,7 +75,7 @@ static void FillFdInfo(struct SeqBuf *seqBuf, struct filelist *fileList, unsigne
}
if
(
hasPrivilege
)
{
(
void
)
LosBufPrintf
(
seqBuf
,
"%u
\t
%d
\t
%6d <%
d
>
\t
%s
\n
"
,
pid
,
fd
,
sysFd
,
filp
?
filp
->
f_refcount
:
1
,
name
);
(
void
)
LosBufPrintf
(
seqBuf
,
"%u
\t
%d
\t
%6d <%
lu
>
\t
%s
\n
"
,
pid
,
fd
,
sysFd
,
filp
?
filp
->
f_refcount
:
1
,
name
);
}
else
{
(
void
)
LosBufPrintf
(
seqBuf
,
"%u
\t
%d
\t
%s
\n
"
,
pid
,
fd
,
name
);
}
...
...
fs/vfs/operation/vfs_init.c
浏览文件 @
efd00c1e
...
...
@@ -59,24 +59,24 @@ void los_vfs_init(void)
retval
=
VnodesInit
();
if
(
retval
!=
LOS_OK
)
{
PRINT_ERR
(
"los_vfs_init VnodeInit failed error %
d
\n
"
,
retval
);
PRINT_ERR
(
"los_vfs_init VnodeInit failed error %
u
\n
"
,
retval
);
return
;
}
retval
=
PathCacheInit
();
if
(
retval
!=
LOS_OK
)
{
PRINT_ERR
(
"los_vfs_init PathCacheInit failed error %
d
\n
"
,
retval
);
PRINT_ERR
(
"los_vfs_init PathCacheInit failed error %
u
\n
"
,
retval
);
return
;
}
retval
=
VnodeHashInit
();
if
(
retval
!=
LOS_OK
)
{
PRINT_ERR
(
"los_vfs_init VnodeHashInit failed error %
d
\n
"
,
retval
);
PRINT_ERR
(
"los_vfs_init VnodeHashInit failed error %
u
\n
"
,
retval
);
return
;
}
retval
=
VnodeDevInit
();
if
(
retval
!=
LOS_OK
)
{
PRINT_ERR
(
"los_vfs_init VnodeDevInit failed error %
d
\n
"
,
retval
);
PRINT_ERR
(
"los_vfs_init VnodeDevInit failed error %
u
\n
"
,
retval
);
return
;
}
...
...
fs/vfs/operation/vfs_other.c
浏览文件 @
efd00c1e
...
...
@@ -535,7 +535,7 @@ static void PrintFileInfo64(const struct stat64 *stat64Info, const char *name)
dirFlag
=
'-'
;
}
PRINTK
(
"%c%s%s%s %-8lld u:%-5
d g:%-5d
%-10s
\n
"
,
dirFlag
,
PRINTK
(
"%c%s%s%s %-8lld u:%-5
u g:%-5u
%-10s
\n
"
,
dirFlag
,
str
[
0
],
str
[
1
],
str
[
UGO_NUMS
-
1
],
stat64Info
->
st_size
,
stat64Info
->
st_uid
,
stat64Info
->
st_gid
,
name
);
}
...
...
@@ -561,7 +561,7 @@ static void PrintFileInfo(const struct stat *statInfo, const char *name)
dirFlag
=
'-'
;
}
PRINTK
(
"%c%s%s%s %-8lld u:%-5
d g:%-5d
%-10s
\n
"
,
dirFlag
,
PRINTK
(
"%c%s%s%s %-8lld u:%-5
u g:%-5u
%-10s
\n
"
,
dirFlag
,
str
[
0
],
str
[
1
],
str
[
UGO_NUMS
-
1
],
statInfo
->
st_size
,
statInfo
->
st_uid
,
statInfo
->
st_gid
,
name
);
}
...
...
@@ -736,7 +736,7 @@ void lsfd(void)
while
(
i
<
CONFIG_NFILE_DESCRIPTORS
)
{
node
=
files_get_openfile
(
i
);
if
(
node
)
{
PRINTK
(
"%5
d
%s
\n
"
,
i
,
f_list
->
fl_files
[
i
].
f_path
);
PRINTK
(
"%5
u
%s
\n
"
,
i
,
f_list
->
fl_files
[
i
].
f_path
);
}
i
++
;
}
...
...
fs/vfs/path_cache.c
浏览文件 @
efd00c1e
...
...
@@ -71,7 +71,7 @@ void PathCacheDump(void)
LIST_HEAD
*
nhead
=
&
g_pathCacheHashEntrys
[
i
];
LOS_DL_LIST_FOR_EACH_ENTRY
(
pc
,
nhead
,
struct
PathCache
,
hashEntry
)
{
PRINTK
(
" pathCache dump hash %d item %s %p %p %
d
\n
"
,
i
,
PRINTK
(
" pathCache dump hash %d item %s %p %p %
u
\n
"
,
i
,
pc
->
name
,
pc
->
parentVnode
,
pc
->
childVnode
,
pc
->
nameLen
);
}
}
...
...
fs/vfs/vnode.c
浏览文件 @
efd00c1e
...
...
@@ -669,7 +669,7 @@ void VnodeMemoryDump(void)
}
PRINTK
(
"Vnode number = %d
\n
"
,
vnodeCount
);
PRINTK
(
"Vnode memory size = %
d
(B)
\n
"
,
vnodeCount
*
sizeof
(
struct
Vnode
));
PRINTK
(
"Vnode memory size = %
u
(B)
\n
"
,
vnodeCount
*
sizeof
(
struct
Vnode
));
}
LIST_HEAD
*
GetVnodeFreeList
()
...
...
kernel/base/core/los_process.c
浏览文件 @
efd00c1e
...
...
@@ -338,7 +338,7 @@ STATIC VOID OsWaitCheckAndWakeParentProcess(LosProcessCB *parentCB, const LosPro
LITE_OS_SEC_TEXT
VOID
OsProcessResourcesToFree
(
LosProcessCB
*
processCB
)
{
if
(
!
(
processCB
->
processStatus
&
(
OS_PROCESS_STATUS_INIT
|
OS_PROCESS_STATUS_RUNNING
)))
{
PRINT_ERR
(
"The process(%
d) has no permission to release process(%d
) resources!
\n
"
,
PRINT_ERR
(
"The process(%
u) has no permission to release process(%u
) resources!
\n
"
,
OsCurrProcessGet
()
->
processID
,
processCB
->
processID
);
}
...
...
kernel/base/core/los_task.c
浏览文件 @
efd00c1e
...
...
@@ -478,7 +478,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) ummap user task(%u) stack failed! mapbase: 0x%x size :0x%x, error: %
u
\n
"
,
processCB
->
processID
,
taskCB
->
taskID
,
mapBase
,
mapSize
,
ret
);
}
...
...
kernel/base/ipc/los_futex.c
浏览文件 @
efd00c1e
...
...
@@ -519,7 +519,7 @@ STATIC INT32 OsFutexWaitParamCheck(const UINT32 *userVaddr, UINT32 flags, UINT32
}
if
(
flags
&&
(
OsFutexKeyShmPermCheck
(
userVaddr
,
flags
)
!=
LOS_OK
))
{
PRINT_ERR
(
"Futex wait param check failed! error shared memory perm userVaddr: 0x%x
\n
"
,
userVaddr
);
PRINT_ERR
(
"Futex wait param check failed! error shared memory perm userVaddr: 0x%x
\n
"
,
(
UINTPTR
)
userVaddr
);
return
LOS_EINVAL
;
}
...
...
@@ -663,12 +663,12 @@ STATIC INT32 OsFutexWakeParamCheck(const UINT32 *userVaddr, UINT32 flags)
}
if
((
vaddr
%
sizeof
(
INT32
))
||
(
vaddr
<
OS_FUTEX_KEY_BASE
)
||
(
vaddr
>=
OS_FUTEX_KEY_MAX
))
{
PRINT_ERR
(
"Futex wake param check failed! error userVaddr: 0x%x
\n
"
,
userVaddr
);
PRINT_ERR
(
"Futex wake param check failed! error userVaddr: 0x%x
\n
"
,
(
UINTPTR
)
userVaddr
);
return
LOS_EINVAL
;
}
if
(
flags
&&
(
OsFutexKeyShmPermCheck
(
userVaddr
,
flags
)
!=
LOS_OK
))
{
PRINT_ERR
(
"Futex wake param check failed! error shared memory perm userVaddr: 0x%x
\n
"
,
userVaddr
);
PRINT_ERR
(
"Futex wake param check failed! error shared memory perm userVaddr: 0x%x
\n
"
,
(
UINTPTR
)
userVaddr
);
return
LOS_EINVAL
;
}
...
...
@@ -941,12 +941,12 @@ STATIC INT32 OsFutexRequeueParamCheck(const UINT32 *oldUserVaddr, UINT32 flags,
}
if
((
oldVaddr
%
sizeof
(
INT32
))
||
(
oldVaddr
<
OS_FUTEX_KEY_BASE
)
||
(
oldVaddr
>=
OS_FUTEX_KEY_MAX
))
{
PRINT_ERR
(
"Futex requeue param check failed! error old userVaddr: 0x%x
\n
"
,
oldUserVaddr
);
PRINT_ERR
(
"Futex requeue param check failed! error old userVaddr: 0x%x
\n
"
,
(
UINTPTR
)
oldUserVaddr
);
return
LOS_EINVAL
;
}
if
((
newVaddr
%
sizeof
(
INT32
))
||
(
newVaddr
<
OS_FUTEX_KEY_BASE
)
||
(
newVaddr
>=
OS_FUTEX_KEY_MAX
))
{
PRINT_ERR
(
"Futex requeue param check failed! error new userVaddr: 0x%x
\n
"
,
newUserVaddr
);
PRINT_ERR
(
"Futex requeue param check failed! error new userVaddr: 0x%x
\n
"
,
(
UINTPTR
)
newUserVaddr
);
return
LOS_EINVAL
;
}
...
...
kernel/base/ipc/los_signal.c
浏览文件 @
efd00c1e
...
...
@@ -698,7 +698,7 @@ VOID *OsSaveSignalContext(VOID *sp, VOID *newSp)
sigcb
->
sigFlag
=
0
;
process
->
sigShare
=
0
;
SCHEDULER_UNLOCK
(
intSave
);
PRINT_ERR
(
"The signal processing function for the current process pid =%
d
is NULL!
\n
"
,
task
->
processID
);
PRINT_ERR
(
"The signal processing function for the current process pid =%
u
is NULL!
\n
"
,
task
->
processID
);
return
sp
;
}
/* One pthread do the share signal */
...
...
@@ -732,7 +732,7 @@ VOID *OsRestorSignalContext(VOID *sp)
SCHEDULER_LOCK
(
intSave
);
if
(
sigcb
->
count
!=
1
)
{
SCHEDULER_UNLOCK
(
intSave
);
PRINT_ERR
(
"sig error count : %
d
\n
"
,
sigcb
->
count
);
PRINT_ERR
(
"sig error count : %
u
\n
"
,
sigcb
->
count
);
return
sp
;
}
...
...
kernel/base/mem/tlsf/los_memory.c
浏览文件 @
efd00c1e
...
...
@@ -312,7 +312,7 @@ STATIC INLINE struct OsMemNodeHead *PreSentinelNodeGet(const VOID *pool, const s
sentinelNode
=
OS_MEM_END_NODE
(
pool
,
((
struct
OsMemPoolHead
*
)
pool
)
->
info
.
totalSize
);
while
(
sentinelNode
!=
NULL
)
{
if
(
OsMemIsLastSentinelNode
(
sentinelNode
))
{
PRINT_ERR
(
"PreSentinelNodeGet can not find node %#x
\n
"
,
node
);
PRINT_ERR
(
"PreSentinelNodeGet can not find node %#x
\n
"
,
(
UINTPTR
)
node
);
return
NULL
;
}
nextNode
=
OsMemSentinelNodeGet
(
sentinelNode
);
...
...
@@ -363,7 +363,7 @@ STATIC INLINE BOOL TryShrinkPool(const VOID *pool, const struct OsMemNodeHead *n
}
if
(
OsMemLargeNodeFree
(
node
)
!=
LOS_OK
)
{
PRINT_ERR
(
"TryShrinkPool free %#x failed!
\n
"
,
node
);
PRINT_ERR
(
"TryShrinkPool free %#x failed!
\n
"
,
(
UINTPTR
)
node
);
return
FALSE
;
}
...
...
@@ -1474,13 +1474,13 @@ STATIC UINT32 OsMemAddrValidCheckPrint(const VOID *pool, struct OsMemFreeNodeHea
if
(((
*
tmpNode
)
->
prev
!=
NULL
)
&&
!
OsMemAddrValidCheck
(
pool
,
(
*
tmpNode
)
->
prev
))
{
PRINT_ERR
(
"[%s], %d, memory check error!
\n
"
" freeNode.prev:%#x is out of legal mem range
\n
"
,
__FUNCTION__
,
__LINE__
,
(
*
tmpNode
)
->
prev
);
__FUNCTION__
,
__LINE__
,
(
UINTPTR
)(
*
tmpNode
)
->
prev
);
return
LOS_NOK
;
}
if
(((
*
tmpNode
)
->
next
!=
NULL
)
&&
!
OsMemAddrValidCheck
(
pool
,
(
*
tmpNode
)
->
next
))
{
PRINT_ERR
(
"[%s], %d, memory check error!
\n
"
" freeNode.next:%#x is out of legal mem range
\n
"
,
__FUNCTION__
,
__LINE__
,
(
*
tmpNode
)
->
next
);
__FUNCTION__
,
__LINE__
,
(
UINTPTR
)(
*
tmpNode
)
->
next
);
return
LOS_NOK
;
}
return
LOS_OK
;
...
...
@@ -1538,7 +1538,7 @@ STATIC VOID OsMemPoolHeadCheck(const struct OsMemPoolHead *pool)
if
(
OsMemFreeListNodeCheck
(
pool
,
tmpNode
))
{
flag
=
1
;
PRINT_ERR
(
"FreeListIndex: %u, node: %#x, bNode: %#x, prev: %#x, next: %#x
\n
"
,
index
,
tmpNode
,
tmpNode
->
header
.
ptr
.
prev
,
tmpNode
->
prev
,
tmpNode
->
next
);
index
,
(
UINTPTR
)
tmpNode
,
(
UINTPTR
)
tmpNode
->
header
.
ptr
.
prev
,
(
UINTPTR
)
tmpNode
->
prev
,
(
UINTPTR
)
tmpNode
->
next
);
goto
OUT
;
}
}
...
...
@@ -1546,7 +1546,7 @@ STATIC VOID OsMemPoolHeadCheck(const struct OsMemPoolHead *pool)
OUT:
if
(
flag
)
{
PRINTK
(
"mem pool info: poolAddr: %#x, poolSize: 0x%x
\n
"
,
pool
,
pool
->
info
.
totalSize
);
PRINTK
(
"mem pool info: poolAddr: %#x, poolSize: 0x%x
\n
"
,
(
UINTPTR
)
pool
,
pool
->
info
.
totalSize
);
#ifdef LOSCFG_MEM_WATERLINE
PRINTK
(
"mem pool info: poolWaterLine: 0x%x, poolCurUsedSize: 0x%x
\n
"
,
pool
->
info
.
waterLine
,
pool
->
info
.
curUsedSize
);
...
...
@@ -1559,7 +1559,7 @@ OUT:
size
=
OS_MEM_NODE_GET_SIZE
(
sentinel
->
sizeAndFlag
);
node
=
OsMemSentinelNodeGet
(
sentinel
);
sentinel
=
OS_MEM_END_NODE
(
node
,
size
);
PRINTK
(
"expand node info: nodeAddr: %#x, nodeSize: 0x%x
\n
"
,
node
,
size
);
PRINTK
(
"expand node info: nodeAddr: %#x, nodeSize: 0x%x
\n
"
,
(
UINTPTR
)
node
,
size
);
}
#endif
}
...
...
@@ -1606,23 +1606,23 @@ STATIC VOID OsMemNodeInfo(const struct OsMemNodeHead *tmpNode,
if
(
OS_MEM_NODE_GET_USED_FLAG
(
tmpNode
->
sizeAndFlag
))
{
usedNode
=
(
struct
OsMemUsedNodeHead
*
)
tmpNode
;
PRINTK
(
"
\n
broken node head: %#x %#x %#x, "
,
usedNode
->
header
.
ptr
.
prev
,
usedNode
->
header
.
magic
,
usedNode
->
header
.
sizeAndFlag
);
(
UINTPTR
)
usedNode
->
header
.
ptr
.
prev
,
usedNode
->
header
.
magic
,
usedNode
->
header
.
sizeAndFlag
);
}
else
{
freeNode
=
(
struct
OsMemFreeNodeHead
*
)
tmpNode
;
PRINTK
(
"
\n
broken node head: %#x %#x %#x %#x, "
,
freeNode
->
header
.
ptr
.
prev
,
freeNode
->
next
,
freeNode
->
prev
,
freeNode
->
header
.
magic
,
freeNode
->
header
.
sizeAndFlag
);
(
UINTPTR
)
freeNode
->
header
.
ptr
.
prev
,
(
UINTPTR
)
freeNode
->
next
,
(
UINTPTR
)
freeNode
->
prev
,
freeNode
->
header
.
magic
,
freeNode
->
header
.
sizeAndFlag
);
}
if
(
OS_MEM_NODE_GET_USED_FLAG
(
preNode
->
sizeAndFlag
))
{
usedNode
=
(
struct
OsMemUsedNodeHead
*
)
preNode
;
PRINTK
(
"prev node head: %#x %#x %#x
\n
"
,
usedNode
->
header
.
ptr
.
prev
,
usedNode
->
header
.
magic
,
usedNode
->
header
.
sizeAndFlag
);
(
UINTPTR
)
usedNode
->
header
.
ptr
.
prev
,
usedNode
->
header
.
magic
,
usedNode
->
header
.
sizeAndFlag
);
}
else
{
freeNode
=
(
struct
OsMemFreeNodeHead
*
)
preNode
;
PRINTK
(
"prev node head: %#x %#x %#x %#x, "
,
freeNode
->
header
.
ptr
.
prev
,
freeNode
->
next
,
freeNode
->
prev
,
freeNode
->
header
.
magic
,
freeNode
->
header
.
sizeAndFlag
);
(
UINTPTR
)
freeNode
->
header
.
ptr
.
prev
,
(
UINTPTR
)
freeNode
->
next
,
(
UINTPTR
)
freeNode
->
prev
,
freeNode
->
header
.
magic
,
freeNode
->
header
.
sizeAndFlag
);
}
#ifdef LOSCFG_MEM_LEAKCHECK
...
...
@@ -1630,11 +1630,11 @@ STATIC VOID OsMemNodeInfo(const struct OsMemNodeHead *tmpNode,
#endif
PRINTK
(
"
\n
---------------------------------------------
\n
"
);
PRINTK
(
" dump mem tmpNode:%#x ~ %#x
\n
"
,
tmpNode
,
((
UINTPTR
)
tmpNode
+
OS_MEM_NODE_DUMP_SIZE
));
PRINTK
(
" dump mem tmpNode:%#x ~ %#x
\n
"
,
(
UINTPTR
)
tmpNode
,
((
UINTPTR
)
tmpNode
+
OS_MEM_NODE_DUMP_SIZE
));
OsDumpMemByte
(
OS_MEM_NODE_DUMP_SIZE
,
(
UINTPTR
)
tmpNode
);
PRINTK
(
"
\n
---------------------------------------------
\n
"
);
if
(
preNode
!=
tmpNode
)
{
PRINTK
(
" dump mem :%#x ~ tmpNode:%#x
\n
"
,
((
UINTPTR
)
tmpNode
-
OS_MEM_NODE_DUMP_SIZE
),
tmpNode
);
PRINTK
(
" dump mem :%#x ~ tmpNode:%#x
\n
"
,
((
UINTPTR
)
tmpNode
-
OS_MEM_NODE_DUMP_SIZE
),
(
UINTPTR
)
tmpNode
);
OsDumpMemByte
(
OS_MEM_NODE_DUMP_SIZE
,
((
UINTPTR
)
tmpNode
-
OS_MEM_NODE_DUMP_SIZE
));
PRINTK
(
"
\n
---------------------------------------------
\n
"
);
}
...
...
@@ -1669,10 +1669,10 @@ STATIC VOID OsMemIntegrityCheckError(struct OsMemPoolHead *pool,
}
MEM_UNLOCK
(
pool
,
intSave
);
LOS_Panic
(
"cur node: %#x
\n
pre node: %#x
\n
pre node was allocated by task:%s
\n
"
,
tmpNode
,
preNode
,
taskCB
->
taskName
);
(
UINTPTR
)
tmpNode
,
(
UINTPTR
)
preNode
,
taskCB
->
taskName
);
#else
MEM_UNLOCK
(
pool
,
intSave
);
LOS_Panic
(
"Memory interity check error, cur node: %#x, pre node: %#x
\n
"
,
tmpNode
,
preNode
);
LOS_Panic
(
"Memory interity check error, cur node: %#x, pre node: %#x
\n
"
,
(
UINTPTR
)
tmpNode
,
(
UINTPTR
)
preNode
);
#endif
}
...
...
@@ -1753,7 +1753,7 @@ UINT32 LOS_MemInfoGet(VOID *pool, LOS_MEM_POOL_STATUS *poolStatus)
}
if
((
pool
==
NULL
)
||
(
poolInfo
->
info
.
pool
!=
pool
))
{
PRINT_ERR
(
"wrong mem pool addr: %#x, line:%d
\n
"
,
poolInfo
,
__LINE__
);
PRINT_ERR
(
"wrong mem pool addr: %#x, line:%d
\n
"
,
(
UINTPTR
)
poolInfo
,
__LINE__
);
return
LOS_NOK
;
}
...
...
kernel/base/misc/los_stackinfo.c
浏览文件 @
efd00c1e
...
...
@@ -100,7 +100,7 @@ VOID OsExcStackInfo(VOID)
stack
=
(
UINTPTR
*
)((
UINTPTR
)
stackTop
+
g_stackInfo
[
index
].
stackSize
);
(
VOID
)
OsStackWaterLineGet
(
stack
,
stackTop
,
&
size
);
PrintExcInfo
(
"%11s %-5
d
%-10p 0x%-8x 0x%-4x
\n
"
,
g_stackInfo
[
index
].
stackName
,
PrintExcInfo
(
"%11s %-5
u
%-10p 0x%-8x 0x%-4x
\n
"
,
g_stackInfo
[
index
].
stackName
,
LOSCFG_KERNEL_CORE_NUM
-
1
-
cpuid
,
stackTop
,
g_stackInfo
[
index
].
stackSize
,
size
);
}
}
...
...
kernel/base/misc/mempt_shellcmd.c
浏览文件 @
efd00c1e
...
...
@@ -63,7 +63,7 @@ VOID OsDumpMemByte(size_t length, UINTPTR addr)
}
while
(
dataLen
)
{
if
(
IS_ALIGNED
(
count
,
sizeof
(
CHAR
*
)))
{
PRINTK
(
"
\n
0x%lx :"
,
alignAddr
);
PRINTK
(
"
\n
0x%lx :"
,
(
UINTPTR
)
alignAddr
);
#ifdef LOSCFG_SAVE_EXCINFO
WriteExcInfoToBuf
(
"
\n
0x%lx :"
,
alignAddr
);
#endif
...
...
kernel/base/mp/los_lockdep.c
浏览文件 @
efd00c1e
...
...
@@ -111,7 +111,7 @@ STATIC VOID OsLockDepDumpLock(const LosTaskCB *task, const SPIN_LOCK_S *lock,
PrintExcInfo
(
"lockdep check failed
\n
"
);
PrintExcInfo
(
"error type : %s
\n
"
,
OsLockDepErrorStringGet
(
errType
));
PrintExcInfo
(
"request addr : 0x%x
\n
"
,
requestAddr
);
PrintExcInfo
(
"request addr : 0x%x
\n
"
,
(
UINTPTR
)
requestAddr
);
while
(
1
)
{
PrintExcInfo
(
"task name : %s
\n
"
,
temp
->
taskName
);
...
...
@@ -121,7 +121,7 @@ STATIC VOID OsLockDepDumpLock(const LosTaskCB *task, const SPIN_LOCK_S *lock,
for
(
i
=
0
;
i
<
lockDep
->
lockDepth
;
i
++
)
{
if
(
lockDep
->
heldLocks
[
i
].
lockPtr
==
lock
)
{
PrintExcInfo
(
"[%d] %s <-- addr:0x%x
\n
"
,
i
,
LOCKDEP_GET_NAME
(
lockDep
,
i
),
LOCKDEP_GET_ADDR
(
lockDep
,
i
));
(
UINTPTR
)
LOCKDEP_GET_ADDR
(
lockDep
,
i
));
}
else
{
PrintExcInfo
(
"[%d] %s
\n
"
,
i
,
LOCKDEP_GET_NAME
(
lockDep
,
i
));
}
...
...
kernel/base/sched/sched_sq/los_sched.c
浏览文件 @
efd00c1e
...
...
@@ -920,7 +920,7 @@ VOID OsSchedStart(VOID)
OsPercpuGet
()
->
responseID
=
OS_INVALID
;
OsSchedSetNextExpireTime
(
newTask
->
startTime
,
newTask
->
taskID
,
newTask
->
startTime
+
newTask
->
timeSlice
,
OS_INVALID
);
PRINTK
(
"cpu %
d
entering scheduler
\n
"
,
cpuid
);
PRINTK
(
"cpu %
u
entering scheduler
\n
"
,
cpuid
);
OsTaskContextLoad
(
newTask
);
}
...
...
@@ -939,7 +939,7 @@ VOID OsSchedToUserReleaseLock(VOID)
STATIC
VOID
OsTaskStackCheck
(
LosTaskCB
*
runTask
,
LosTaskCB
*
newTask
)
{
if
(
!
OS_STACK_MAGIC_CHECK
(
runTask
->
topOfStack
))
{
LOS_Panic
(
"CURRENT task ID: %s:%
d
stack overflow!
\n
"
,
runTask
->
taskName
,
runTask
->
taskID
);
LOS_Panic
(
"CURRENT task ID: %s:%
u
stack overflow!
\n
"
,
runTask
->
taskName
,
runTask
->
taskID
);
}
if
(((
UINTPTR
)(
newTask
->
stackPointer
)
<=
newTask
->
topOfStack
)
||
...
...
kernel/base/vm/los_vm_dump.c
浏览文件 @
efd00c1e
...
...
@@ -374,8 +374,8 @@ VOID OsDumpRegion2(LosVmSpace *space, LosVmMapRegion *region)
if
(
flagsStr
==
NULL
)
{
return
;
}
PRINTK
(
"
\t
%#010x %-32.32s %#010x %#010x %-15.15s %4
d %4d
\n
"
,
region
,
OsGetRegionNameOrFilePath
(
region
),
region
->
range
.
base
,
PRINTK
(
"
\t
%#010x %-32.32s %#010x %#010x %-15.15s %4
u %4u
\n
"
,
(
UINTPTR
)
region
,
OsGetRegionNameOrFilePath
(
region
),
region
->
range
.
base
,
region
->
range
.
size
,
flagsStr
,
regionPages
,
pssPages
);
(
VOID
)
LOS_MemFree
(
m_aucSysMem0
,
flagsStr
);
}
...
...
@@ -395,7 +395,7 @@ VOID OsDumpAspace(LosVmSpace *space)
spacePages
=
OsCountAspacePages
(
space
);
PRINTK
(
"
\r\n
PID aspace name base size pages
\n
"
);
PRINTK
(
" ---- ------ ---- ---- ----- ----
\n
"
);
PRINTK
(
" %-4
d %#010x %-10.10s %#010x %#010x %d
\n
"
,
pcb
->
processID
,
space
,
pcb
->
processName
,
PRINTK
(
" %-4
u %#010x %-10.10s %#010x %#010x %u
\n
"
,
pcb
->
processID
,
space
,
pcb
->
processName
,
space
->
base
,
space
->
size
,
spacePages
);
PRINTK
(
"
\r\n\t
region name base size mmu_flags pages pg/ref
\n
"
);
PRINTK
(
"
\t
------ ---- ---- ---- --------- ----- -----
\n
"
);
...
...
@@ -468,7 +468,7 @@ VOID OsDumpPte(VADDR_T vaddr)
}
return
;
ERR:
PRINTK
(
"%s, error vaddr: %#x, l2Table: %#x, l2Index: %#x
\n
"
,
__FUNCTION__
,
vaddr
,
l2Table
,
l2Index
);
PRINTK
(
"%s, error vaddr: %#x, l2Table: %#x, l2Index: %#x
\n
"
,
__FUNCTION__
,
vaddr
,
(
UINTPTR
)
l2Table
,
l2Index
);
}
UINT32
OsVmPhySegPagesGet
(
LosVmPhysSeg
*
seg
)
...
...
@@ -505,7 +505,7 @@ VOID OsVmPhysDump(VOID)
PRINTK
(
"
\r\n
phys_seg base size free_pages
\n
"
);
PRINTK
(
" -------- ------- ---------- ---------
\n
"
);
#endif
PRINTK
(
" 0x%08x 0x%08x 0x%08x %8u
\n
"
,
seg
,
seg
->
start
,
seg
->
size
,
segFreePages
);
PRINTK
(
" 0x%08x 0x%08x 0x%08x %8u
\n
"
,
(
UINTPTR
)
seg
,
seg
->
start
,
seg
->
size
,
segFreePages
);
totalFreePages
+=
segFreePages
;
totalPages
+=
(
seg
->
size
>>
PAGE_SHIFT
);
...
...
kernel/base/vm/los_vm_phys.c
浏览文件 @
efd00c1e
...
...
@@ -163,7 +163,7 @@ STATIC VOID OsVmPhysFreeListAdd(LosVmPage *page, UINT8 order)
struct
VmFreeList
*
list
=
NULL
;
if
(
page
->
segID
>=
VM_PHYS_SEG_MAX
)
{
LOS_Panic
(
"The page segment id(%
d
) is invalid
\n
"
,
page
->
segID
);
LOS_Panic
(
"The page segment id(%
u
) is invalid
\n
"
,
page
->
segID
);
}
page
->
order
=
order
;
...
...
@@ -180,7 +180,7 @@ STATIC VOID OsVmPhysFreeListAddUnsafe(LosVmPage *page, UINT8 order)
struct
VmFreeList
*
list
=
NULL
;
if
(
page
->
segID
>=
VM_PHYS_SEG_MAX
)
{
LOS_Panic
(
"The page segment id(%
d
) is invalid
\n
"
,
page
->
segID
);
LOS_Panic
(
"The page segment id(%
u
) is invalid
\n
"
,
page
->
segID
);
}
page
->
order
=
order
;
...
...
@@ -242,7 +242,7 @@ LosVmPage *OsVmPhysToPage(paddr_t pa, UINT8 segID)
paddr_t
offset
;
if
(
segID
>=
VM_PHYS_SEG_MAX
)
{
LOS_Panic
(
"The page segment id(%
d
) is invalid
\n
"
,
segID
);
LOS_Panic
(
"The page segment id(%
u
) is invalid
\n
"
,
segID
);
}
seg
=
&
g_vmPhysSeg
[
segID
];
if
((
pa
<
seg
->
start
)
||
(
pa
>=
(
seg
->
start
+
seg
->
size
)))
{
...
...
kernel/base/vm/los_vm_syscall.c
浏览文件 @
efd00c1e
...
...
@@ -220,7 +220,7 @@ VOID *LOS_DoBrk(VOID *addr)
size
=
(
UINTPTR
)
addr
-
(
UINTPTR
)
space
->
heapBase
;
size
=
ROUNDUP
(
size
,
PAGE_SIZE
);
alignAddr
=
(
CHAR
*
)(
UINTPTR
)(
space
->
heapBase
)
+
size
;
PRINT_INFO
(
"brk addr %p , size 0x%x, alignAddr %p, align %
d
\n
"
,
addr
,
size
,
alignAddr
,
PAGE_SIZE
);
PRINT_INFO
(
"brk addr %p , size 0x%x, alignAddr %p, align %
u
\n
"
,
addr
,
size
,
alignAddr
,
PAGE_SIZE
);
(
VOID
)
LOS_MuxAcquire
(
&
space
->
regionMux
);
if
(
addr
<
(
VOID
*
)(
UINTPTR
)
space
->
heapNow
)
{
...
...
kernel/base/vm/oom.c
浏览文件 @
efd00c1e
...
...
@@ -210,10 +210,10 @@ LITE_OS_SEC_TEXT_MINOR VOID OomSetCheckInterval(UINT32 checkInterval)
{
if
((
checkInterval
>=
OOM_CHECK_MIN
)
&&
(
checkInterval
<=
OOM_CHECK_MAX
))
{
g_oomCB
->
checkInterval
=
checkInterval
;
PRINTK
(
"[oom] set oom check interval (%
d
)ms successful
\n
"
,
PRINTK
(
"[oom] set oom check interval (%
u
)ms successful
\n
"
,
g_oomCB
->
checkInterval
);
}
else
{
PRINTK
(
"[oom] set oom check interval (%
d
)ms failed, should be in [%d, %d]
\n
"
,
PRINTK
(
"[oom] set oom check interval (%
u
)ms failed, should be in [%d, %d]
\n
"
,
g_oomCB
->
checkInterval
,
OOM_CHECK_MIN
,
OOM_CHECK_MAX
);
}
}
...
...
kernel/common/rootfs/los_bootargs.c
浏览文件 @
efd00c1e
...
...
@@ -214,7 +214,7 @@ UINT64 LOS_SizeStrToNum(CHAR *value)
UINT64
num
=
0
;
/* If the string is a hexadecimal value */
if
(
sscanf_s
(
value
,
"0x%x"
,
&
num
)
>
0
)
{
if
(
sscanf_s
(
value
,
"0x%x"
,
(
UINTPTR
)(
&
num
)
)
>
0
)
{
value
+=
strlen
(
"0x"
);
if
(
strspn
(
value
,
"0123456789abcdefABCDEF"
)
<
strlen
(
value
))
{
goto
ERROUT
;
...
...
@@ -223,7 +223,7 @@ UINT64 LOS_SizeStrToNum(CHAR *value)
}
/* If the string is a decimal value in unit *Bytes */
INT32
ret
=
sscanf_s
(
value
,
"%
d
"
,
&
num
);
INT32
ret
=
sscanf_s
(
value
,
"%
llu
"
,
&
num
);
INT32
decOffset
=
strspn
(
value
,
"0123456789"
);
CHAR
*
endPos
=
value
+
decOffset
;
if
((
ret
<=
0
)
||
(
decOffset
<
(
strlen
(
value
)
-
1
)))
{
...
...
kernel/extended/dynload/src/los_load_elf.c
浏览文件 @
efd00c1e
...
...
@@ -424,7 +424,7 @@ INT32 OsGetKernelVaddr(const LosVmSpace *space, VADDR_T vaddr, VADDR_T *kvaddr)
PADDR_T
paddr
=
0
;
if
((
space
==
NULL
)
||
(
vaddr
==
0
)
||
(
kvaddr
==
NULL
))
{
PRINT_ERR
(
"%s[%d], space: %#x, vaddr: %#x
\n
"
,
__FUNCTION__
,
__LINE__
,
space
,
vaddr
);
PRINT_ERR
(
"%s[%d], space: %#x, vaddr: %#x
\n
"
,
__FUNCTION__
,
__LINE__
,
(
UINTPTR
)
space
,
vaddr
);
return
LOS_NOK
;
}
...
...
@@ -573,7 +573,7 @@ STATIC CHAR *OsGetParamPtr(CHAR * const *ptr, INT32 index)
}
ret
=
LOS_GetUser
(
&
userStrPtr
,
(
UINTPTR
*
)(
ptr
+
index
));
if
(
ret
!=
LOS_OK
)
{
PRINT_ERR
(
"%s[%d], %#x
\n
"
,
__FUNCTION__
,
__LINE__
,
ptr
);
PRINT_ERR
(
"%s[%d], %#x
\n
"
,
__FUNCTION__
,
__LINE__
,
(
UINTPTR
)
ptr
);
return
NULL
;
}
...
...
@@ -868,7 +868,7 @@ STATIC INT32 OsPutParamToStack(ELFLoadInfo *loadInfo, const UINTPTR *auxVecInfo,
size
=
LOS_ArchCopyToUser
(
argsPtr
,
auxVecInfo
,
vecIndex
*
sizeof
(
UINTPTR
));
if
(
size
!=
0
)
{
PRINT_ERR
(
"%s[%d], Failed to copy strings! Bytes not copied: %
d
\n
"
,
__FUNCTION__
,
__LINE__
,
size
);
PRINT_ERR
(
"%s[%d], Failed to copy strings! Bytes not copied: %
u
\n
"
,
__FUNCTION__
,
__LINE__
,
size
);
return
-
EFAULT
;
}
...
...
kernel/extended/liteipc/hm_liteipc.c
浏览文件 @
efd00c1e
...
...
@@ -111,7 +111,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsLiteIpcInit(VOID)
}
ret
=
(
UINT32
)
register_driver
(
LITEIPC_DRIVER
,
&
g_liteIpcFops
,
LITEIPC_DRIVER_MODE
,
NULL
);
if
(
ret
!=
LOS_OK
)
{
PRINT_ERR
(
"register lite_ipc driver failed:%
d
\n
"
,
ret
);
PRINT_ERR
(
"register lite_ipc driver failed:%
u
\n
"
,
ret
);
}
LOS_ListInit
(
&
(
g_ipcPendlist
));
for
(
i
=
0
;
i
<
LOSCFG_BASE_CORE_PROCESS_LIMIT
;
i
++
)
{
...
...
@@ -294,15 +294,15 @@ LITE_OS_SEC_TEXT STATIC VOID EnableIpcNodeFreeByUser(UINT32 processID, VOID *buf
LITE_OS_SEC_TEXT
STATIC
VOID
*
LiteIpcNodeAlloc
(
UINT32
processID
,
UINT32
size
)
{
VOID
*
ptr
=
LOS_MemAlloc
(
OS_PCB_FROM_PID
(
processID
)
->
ipcInfo
.
pool
.
kvaddr
,
size
);
PRINT_INFO
(
"LiteIpcNodeAlloc pid:%
d, pool:%x buf:%x size:%d
\n
"
,
processID
,
OS_PCB_FROM_PID
(
processID
)
->
ipcInfo
.
pool
.
kvaddr
,
ptr
,
size
);
PRINT_INFO
(
"LiteIpcNodeAlloc pid:%
u, pool:%x buf:%x size:%u
\n
"
,
processID
,
(
UINTPTR
)
OS_PCB_FROM_PID
(
processID
)
->
ipcInfo
.
pool
.
kvaddr
,
(
UINTPTR
)
ptr
,
size
);
return
ptr
;
}
LITE_OS_SEC_TEXT
STATIC
UINT32
LiteIpcNodeFree
(
UINT32
processID
,
VOID
*
buf
)
{
PRINT_INFO
(
"LiteIpcNodeFree pid:%
d
, pool:%x buf:%x
\n
"
,
processID
,
OS_PCB_FROM_PID
(
processID
)
->
ipcInfo
.
pool
.
kvaddr
,
buf
);
PRINT_INFO
(
"LiteIpcNodeFree pid:%
u
, pool:%x buf:%x
\n
"
,
processID
,
(
UINTPTR
)
OS_PCB_FROM_PID
(
processID
)
->
ipcInfo
.
pool
.
kvaddr
,
(
UINTPTR
)
buf
);
return
LOS_MemFree
(
OS_PCB_FROM_PID
(
processID
)
->
ipcInfo
.
pool
.
kvaddr
,
buf
);
}
...
...
@@ -454,7 +454,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 SetIpcTask(VOID)
OsCurrProcessGet
()
->
ipcInfo
.
ipcTaskID
=
LOS_CurTaskIDGet
();
return
OsCurrProcessGet
()
->
ipcInfo
.
ipcTaskID
;
}
PRINT_ERR
(
"curprocess %
d
IpcTask already set!
\n
"
,
OsCurrProcessGet
()
->
processID
);
PRINT_ERR
(
"curprocess %
u
IpcTask already set!
\n
"
,
OsCurrProcessGet
()
->
processID
);
return
-
EINVAL
;
}
...
...
@@ -811,7 +811,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 CopyDataFromUser(IpcListNode *node, UINT32 bufSz,
node
->
msg
.
offsets
=
(
VOID
*
)((
UINTPTR
)
node
+
sizeof
(
IpcListNode
)
+
msg
->
dataSz
);
ret
=
copy_from_user
((
VOID
*
)(
node
->
msg
.
offsets
),
msg
->
offsets
,
msg
->
spObjNum
*
sizeof
(
UINT32
));
if
(
ret
!=
LOS_OK
)
{
PRINT_DEBUG
(
"%s, %d, %x, %x, %
d
\n
"
,
__FUNCTION__
,
__LINE__
,
node
->
msg
.
offsets
,
msg
->
offsets
,
msg
->
spObjNum
);
PRINT_DEBUG
(
"%s, %d, %x, %x, %
u
\n
"
,
__FUNCTION__
,
__LINE__
,
(
UINTPTR
)
node
->
msg
.
offsets
,
(
UINTPTR
)
msg
->
offsets
,
msg
->
spObjNum
);
return
ret
;
}
}
else
{
...
...
@@ -898,7 +898,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckPara(IpcContent *content, UINT32 *dstTid)
#endif
OsHookCall
(
LOS_HOOK_TYPE_IPC_WRITE_DROP
,
msg
,
*
dstTid
,
(
*
dstTid
==
INVAILD_ID
)
?
INVAILD_ID
:
OS_TCB_FROM_TID
(
*
dstTid
)
->
processID
,
0
);
PRINT_ERR
(
"A timeout reply, request timestamp:%ll
d, now:%lld
\n
"
,
msg
->
timestamp
,
now
);
PRINT_ERR
(
"A timeout reply, request timestamp:%ll
u, now:%llu
\n
"
,
msg
->
timestamp
,
now
);
return
-
ETIME
;
}
#endif
...
...
@@ -1090,7 +1090,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcMsgHandle(IpcContent *con)
if
((
content
->
flag
&
BUFF_FREE
)
==
BUFF_FREE
)
{
ret
=
CheckUsedBuffer
(
content
->
buffToFree
,
&
nodeNeedFree
);
if
(
ret
!=
LOS_OK
)
{
PRINT_ERR
(
"CheckUsedBuffer failed:%
d
\n
"
,
ret
);
PRINT_ERR
(
"CheckUsedBuffer failed:%
u
\n
"
,
ret
);
return
ret
;
}
}
...
...
@@ -1136,7 +1136,7 @@ BUFFER_FREE:
UINT32
offset
=
LOS_OFF_SET_OF
(
IpcContent
,
inMsg
);
ret
=
copy_to_user
((
char
*
)
con
+
offset
,
(
char
*
)
content
+
offset
,
sizeof
(
IpcMsg
*
));
if
(
ret
!=
LOS_OK
)
{
PRINT_ERR
(
"%s, %d, %
d
\n
"
,
__FUNCTION__
,
__LINE__
,
ret
);
PRINT_ERR
(
"%s, %d, %
u
\n
"
,
__FUNCTION__
,
__LINE__
,
ret
);
return
-
EINVAL
;
}
}
...
...
platform/los_hilog.c
浏览文件 @
efd00c1e
...
...
@@ -179,7 +179,7 @@ static ssize_t HiLogRead(struct file *filep, char *buffer, size_t bufLen)
}
if
(
bufLen
<
header
.
len
+
sizeof
(
header
))
{
dprintf
(
"buffer too small,bufLen=%
d, header.len=%d,%d
\n
"
,
bufLen
,
header
.
len
,
header
.
hdrSize
);
dprintf
(
"buffer too small,bufLen=%
u, header.len=%u,%u
\n
"
,
bufLen
,
header
.
len
,
header
.
hdrSize
);
retval
=
-
ENOMEM
;
goto
out
;
}
...
...
syscall/los_syscall.c
浏览文件 @
efd00c1e
...
...
@@ -104,7 +104,7 @@ VOID OsArmA32SyscallHandle(TaskContext *regs)
UINT32
cmd
=
regs
->
reserved2
;
if
(
cmd
>=
SYS_CALL_NUM
)
{
PRINT_ERR
(
"Syscall ID: error %
d
!!!
\n
"
,
cmd
);
PRINT_ERR
(
"Syscall ID: error %
u
!!!
\n
"
,
cmd
);
return
;
}
...
...
@@ -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 syscall ID: %
u nArgs: %u
\n
"
,
cmd
,
nArgs
);
regs
->
R0
=
-
ENOSYS
;
return
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录