Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos M
提交
6efd469a
K
Kernel Liteos M
项目概览
OpenHarmony
/
Kernel Liteos M
大约 1 年 前同步成功
通知
20
Star
28
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos M
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6efd469a
编写于
2月 17, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
!601 fix: 修复pthread 编译告警
Merge pull request !601 from zhushengle/pthread
上级
5dbac3ab
cc57f81a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
17 deletion
+17
-17
kal/posix/src/pthread.c
kal/posix/src/pthread.c
+17
-17
未找到文件。
kal/posix/src/pthread.c
浏览文件 @
6efd469a
...
...
@@ -159,7 +159,7 @@ static int CheckForCancel(void)
pthread_t
thread
=
pthread_self
();
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
0
;
}
...
...
@@ -215,7 +215,7 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
int
pthread_setschedparam
(
pthread_t
thread
,
int
policy
,
const
struct
sched_param
*
param
)
{
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -239,7 +239,7 @@ int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param
int
pthread_setschedprio
(
pthread_t
thread
,
int
prio
)
{
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -257,7 +257,7 @@ int pthread_once(pthread_once_t *onceControl, void (*initRoutine)(void))
pthread_t
thread
=
pthread_self
();
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -288,7 +288,7 @@ int pthread_setcancelstate(int state, int *oldState)
PthreadData
*
pthreadData
=
NULL
;
pthread_t
thread
=
pthread_self
();
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -321,7 +321,7 @@ int pthread_setcanceltype(int type, int *oldType)
pthread_t
thread
=
pthread_self
();
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -352,7 +352,7 @@ int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *par
UINT32
prio
;
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -403,7 +403,7 @@ int pthread_cancel(pthread_t thread)
LosTaskCB
*
tcb
=
NULL
;
PthreadData
*
pthreadData
=
NULL
;
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
intSave
=
LOS_IntLock
();
...
...
@@ -445,7 +445,7 @@ int pthread_join(pthread_t thread, void **retval)
UINTPTR
result
;
UINT32
ret
;
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -472,7 +472,7 @@ int pthread_detach(pthread_t thread)
{
UINT32
ret
;
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -492,7 +492,7 @@ void pthread_exit(void *retVal)
pthread_t
thread
=
pthread_self
();
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
goto
EXIT
;
}
...
...
@@ -525,7 +525,7 @@ int pthread_setname_np(pthread_t thread, const char *name)
char
*
taskName
=
NULL
;
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -562,7 +562,7 @@ int pthread_getname_np(pthread_t thread, char *buf, size_t buflen)
const
char
*
name
=
NULL
;
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -613,7 +613,7 @@ int pthread_key_create(pthread_key_t *k, void (*dtor)(void *))
pthread_t
thread
=
pthread_self
();
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -651,7 +651,7 @@ int pthread_key_delete(pthread_key_t k)
pthread_t
thread
=
pthread_self
();
if
(
!
IsPthread
(
thread
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
thread
);
return
EINVAL
;
}
...
...
@@ -692,7 +692,7 @@ int pthread_setspecific(pthread_key_t k, const void *x)
pthread_t
self
=
pthread_self
();
if
(
!
IsPthread
(
self
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
self
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
self
);
return
EINVAL
;
}
...
...
@@ -733,7 +733,7 @@ void *pthread_getspecific(pthread_key_t k)
void
*
key
=
NULL
;
pthread_t
self
=
pthread_self
();
if
(
!
IsPthread
(
self
))
{
PRINT_ERR
(
"[%s:%d] This task %
d
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
self
);
PRINT_ERR
(
"[%s:%d] This task %
lu
is not a posix thread!!!
\n
"
,
__FUNCTION__
,
__LINE__
,
self
);
return
NULL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录