提交 5fc4c9cb 编写于 作者: L limeng

创建的线程太多了,系统放不下

Signed-off-by: Nlimeng <limeng151@huawei.com>
Change-Id: I980c41f8fe3fdda26b4d2aba98095189629f4e17
上级 8ab85f52
...@@ -50,7 +50,7 @@ void *ThreadMutex(void *arg) ...@@ -50,7 +50,7 @@ void *ThreadMutex(void *arg)
HWTEST_F(FutexTest, testPthreadMutex, Function | MediumTest | Level3) HWTEST_F(FutexTest, testPthreadMutex, Function | MediumTest | Level3)
{ {
pthread_mutex_t mtx; pthread_mutex_t mtx;
const int loopNum = 10; const int loopNum = 5;
pthread_t tid[loopNum]; pthread_t tid[loopNum];
EXPECT_EQ(pthread_mutex_init(&mtx, nullptr), 0) << "> return errno"; EXPECT_EQ(pthread_mutex_init(&mtx, nullptr), 0) << "> return errno";
...@@ -504,7 +504,7 @@ void *ThreadSpinlock(void *arg) ...@@ -504,7 +504,7 @@ void *ThreadSpinlock(void *arg)
HWTEST_F(FutexTest, testPthreadSpinlock, Function | MediumTest | Level3) HWTEST_F(FutexTest, testPthreadSpinlock, Function | MediumTest | Level3)
{ {
pthread_spinlock_t spinLock; pthread_spinlock_t spinLock;
const int loopNum = 30; const int loopNum = 5;
pthread_t tid[loopNum]; pthread_t tid[loopNum];
EXPECT_EQ(pthread_spin_init(&spinLock, 0), 0); EXPECT_EQ(pthread_spin_init(&spinLock, 0), 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册