Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
5e701291
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
467
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看板
未验证
提交
5e701291
编写于
7月 04, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 04, 2022
浏览文件
操作
浏览文件
下载
差异文件
!917 【OpenHarmony开源贡献者计划2022】fix warning: unused variable
Merge pull request !917 from rtos_ming/unused
上级
12adfd58
08937699
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
13 addition
and
85 deletion
+13
-85
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_001.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_001.cpp
+1
-5
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_002.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_002.cpp
+1
-3
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_003.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_003.cpp
+1
-4
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_004.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_004.cpp
+2
-8
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_005.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_005.cpp
+2
-8
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_006.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_006.cpp
+2
-8
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_007.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_007.cpp
+3
-8
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_008.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_008.cpp
+1
-7
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_017.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_017.cpp
+0
-5
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_019.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_019.cpp
+0
-5
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_020.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_020.cpp
+0
-8
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_021.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_021.cpp
+0
-8
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_022.cpp
...ttest/process/lock/mutex/smoke/pthread_mutex_test_022.cpp
+0
-8
未找到文件。
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_001.cpp
浏览文件 @
5e701291
...
...
@@ -64,12 +64,8 @@ EXIT:
static
int
Testcase
(
void
)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
int
index
=
0
;
pthread_mutexattr_settype
(
&
mutex
,
PTHREAD_MUTEX_NORMAL
);
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_002.cpp
浏览文件 @
5e701291
...
...
@@ -65,10 +65,8 @@ static int Testcase(void)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
int
index
=
0
;
int
currThreadPri
,
currThreadPolicy
;
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_003.cpp
浏览文件 @
5e701291
...
...
@@ -74,12 +74,9 @@ static int Testcase(void)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
int
count
=
0
;
int
currThreadPri
,
currThreadPolicy
;
g_preTaskPri
=
0xffffffff
;
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_004.cpp
浏览文件 @
5e701291
...
...
@@ -49,8 +49,6 @@ static void *ThreadFuncTest3(void *a)
int
ret
;
int
tid
=
Gettid
();
pthread_t
thread
=
pthread_self
();
int
currThreadPri
,
currThreadPolicy
;
struct
sched_param
param
=
{
0
};
ret
=
pthread_detach
(
thread
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -124,14 +122,10 @@ EXIT:
static
int
Testcase
(
void
)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
int
index
=
0
;
pthread_mutexattr_settype
(
&
mutex
,
PTHREAD_MUTEX_NORMAL
);
pthread_mutex_init
(
&
g_muxLock001
,
&
mutex
);
pthread_mutex_init
(
&
g_muxLock002
,
&
mutex
);
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_005.cpp
浏览文件 @
5e701291
...
...
@@ -49,8 +49,6 @@ static void *ThreadFuncTest3(void *a)
int
ret
;
int
tid
;
pthread_t
thread
=
pthread_self
();
int
currThreadPri
,
currThreadPolicy
;
struct
sched_param
param
=
{
0
};
ret
=
pthread_detach
(
thread
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -126,14 +124,10 @@ EXIT:
static
int
Testcase
(
void
)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
int
index
=
0
;
pthread_mutexattr_settype
(
&
mutex
,
PTHREAD_MUTEX_NORMAL
);
pthread_mutex_init
(
&
g_muxLock001
,
&
mutex
);
pthread_mutex_init
(
&
g_muxLock002
,
&
mutex
);
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_006.cpp
浏览文件 @
5e701291
...
...
@@ -48,8 +48,6 @@ static void *ThreadFuncTest3(void *a)
{
int
ret
;
int
tid
=
Gettid
();
int
currThreadPri
,
currThreadPolicy
;
struct
sched_param
param
=
{
0
};
pthread_t
thread
=
pthread_self
();
ret
=
pthread_detach
(
thread
);
...
...
@@ -118,18 +116,14 @@ static void *ThreadFuncTest1(void *a)
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
EXIT:
return
nullptr
;
return
nullptr
;
}
static
int
Testcase
(
void
)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
int
index
=
0
;
pthread_mutexattr_settype
(
&
mutex
,
PTHREAD_MUTEX_NORMAL
);
pthread_mutex_init
(
&
g_mutexLock001
,
&
mutex
);
pthread_mutex_init
(
&
g_mutexLock002
,
&
mutex
);
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_007.cpp
浏览文件 @
5e701291
...
...
@@ -43,7 +43,6 @@ static void *ThreadFuncTest3(void *a)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
int
currThreadPri
,
currThreadPolicy
;
struct
sched_param
param
=
{
0
};
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
...
...
@@ -62,7 +61,7 @@ static void *ThreadFuncTest3(void *a)
g_testToCount003
++
;
while
(
g_testToCount002
==
0
)
{
SLEEP_AND_YIELD
(
2
);
// 2, delay enoug
e
time
SLEEP_AND_YIELD
(
2
);
// 2, delay enoug
h
time
}
ret
=
pthread_mutex_unlock
(
&
g_muxLock003
);
...
...
@@ -96,7 +95,7 @@ static void *ThreadFuncTest2(void *a)
g_testToCount002
++
;
while
(
g_testToCount001
==
0
)
{
SLEEP_AND_YIELD
(
2
);
// 2, delay enoug
e
time
SLEEP_AND_YIELD
(
2
);
// 2, delay enoug
h
time
}
ret
=
pthread_mutex_unlock
(
&
g_muxLock002
);
...
...
@@ -141,12 +140,8 @@ EXIT:
static
int
Testcase
(
void
)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
=
{
0
};
int
index
=
TEST_COUNT
;
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_008.cpp
浏览文件 @
5e701291
...
...
@@ -41,8 +41,6 @@ static void *ThreadFuncTest3(void *a)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
int
currThreadPri
,
currThreadPolicy
;
struct
sched_param
param
=
{
0
};
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
...
...
@@ -120,12 +118,8 @@ EXIT:
static
int
Testcase
(
void
)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
,
newPthread1
;
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
int
index
=
TEST_COUNT
;
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_017.cpp
浏览文件 @
5e701291
...
...
@@ -38,7 +38,6 @@ static int g_testBackCount = 0;
static
void
*
ThreadFuncTest3
(
void
*
a
)
{
int
ret
;
int
tid
=
Gettid
();
pthread_t
thread
=
pthread_self
();
ret
=
pthread_detach
(
thread
);
...
...
@@ -59,8 +58,6 @@ EXIT:
static
void
*
ThreadFuncTest2
(
void
*
a
)
{
int
ret
;
int
tid
=
Gettid
();
pthread_t
thread
=
pthread_self
();
g_testBackCount
++
;
ret
=
pthread_mutex_lock
(
&
g_mutexLock
);
...
...
@@ -78,10 +75,8 @@ static int TestCase(void)
{
struct
sched_param
param
=
{
0
};
int
ret
;
void
*
res
=
nullptr
;
int
currThreadPri
,
currThreadPolicy
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
;
pthread_mutexattr_t
mutex
;
pthread_mutexattr_settype
(
&
mutex
,
PTHREAD_MUTEX_NORMAL
);
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_019.cpp
浏览文件 @
5e701291
...
...
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
ret
=
pthread_detach
(
thread
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -69,7 +67,6 @@ EXIT:
static
void
*
ThreadFuncTest1
(
void
*
a
)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
...
...
@@ -106,9 +103,7 @@ static int Testcase(void)
struct
sched_param
param
=
{
0
};
int
ret
;
int
threadCount
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
[
10
],
newPthread1
;
pthread_mutexattr_t
mutex
;
int
index
=
TEST_COUNT
;
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_020.cpp
浏览文件 @
5e701291
...
...
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
ret
=
pthread_detach
(
thread
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -69,9 +67,6 @@ EXIT:
static
void
*
ThreadFuncTest1
(
void
*
a
)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
ret
=
pthread_mutex_lock
(
&
g_muxLock001
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -96,7 +91,6 @@ EXIT:
static
void
*
ThreadFuncTest0
(
void
*
a
)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
...
...
@@ -136,9 +130,7 @@ static int Testcase(void)
struct
sched_param
param
=
{
0
};
int
ret
;
int
threadCount
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
[
10
],
newPthread1
;
pthread_mutexattr_t
mutex
;
int
index
=
TEST_COUNT
;
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_021.cpp
浏览文件 @
5e701291
...
...
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
ret
=
pthread_detach
(
thread
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -69,9 +67,6 @@ EXIT:
static
void
*
ThreadFuncTest1
(
void
*
a
)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
ret
=
pthread_mutex_lock
(
&
g_muxLock001
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -96,7 +91,6 @@ EXIT:
static
void
*
ThreadFuncTest0
(
void
*
a
)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
...
...
@@ -136,9 +130,7 @@ static int Testcase(void)
struct
sched_param
param
=
{
0
};
int
ret
;
int
threadCount
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
[
10
],
newPthread1
;
pthread_mutexattr_t
mutex
;
int
index
=
TEST_COUNT
;
...
...
testsuites/unittest/process/lock/mutex/smoke/pthread_mutex_test_022.cpp
浏览文件 @
5e701291
...
...
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
ret
=
pthread_detach
(
thread
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -69,9 +67,6 @@ EXIT:
static
void
*
ThreadFuncTest1
(
void
*
a
)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
ret
=
pthread_mutex_lock
(
&
g_muxLock001
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT
);
...
...
@@ -96,7 +91,6 @@ EXIT:
static
void
*
ThreadFuncTest0
(
void
*
a
)
{
int
ret
;
pthread_t
thread
=
pthread_self
();
struct
timespec
time
;
struct
timeval
timeVal
=
{
0
};
...
...
@@ -136,9 +130,7 @@ static int Testcase(void)
struct
sched_param
param
=
{
0
};
int
ret
;
int
threadCount
;
void
*
res
=
nullptr
;
pthread_attr_t
a
=
{
0
};
pthread_t
thread
=
pthread_self
();
pthread_t
newPthread
[
10
],
newPthread1
;
pthread_mutexattr_t
mutex
;
int
index
=
TEST_COUNT
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录