Lines Matching refs:mtx
36 pthread_mutex_t *mtx = (pthread_mutex_t *)arg; in ThreadMutex() local
37 EXPECT_EQ(pthread_mutex_lock(mtx), 0) << "> return errno"; in ThreadMutex()
41 EXPECT_EQ(pthread_mutex_unlock(mtx), 0) << "> return errno"; in ThreadMutex()
52 pthread_mutex_t mtx; variable
56 EXPECT_EQ(pthread_mutex_init(&mtx, nullptr), 0) << "> return errno";
59 … EXPECT_EQ(pthread_create(&tid[i], nullptr, ThreadMutex, (void*)&mtx), 0) << "> return errno";
64 EXPECT_EQ(pthread_mutex_destroy(&mtx), 0) << "> return errno";
71 pthread_mutex_t *mtx = (pthread_mutex_t *)arg; in ThreadMtrylock1() local
72 EXPECT_EQ(pthread_mutex_trylock(mtx), 0) << "> return errno"; in ThreadMtrylock1()
76 EXPECT_EQ(pthread_mutex_unlock(mtx), 0) << "> return errno"; in ThreadMtrylock1()
84 pthread_mutex_t *mtx = (pthread_mutex_t *)arg; in ThreadMtrylock2() local
86 EXPECT_EQ(pthread_mutex_trylock(mtx), EBUSY) << "> should return errno"; in ThreadMtrylock2()
99 pthread_mutex_t mtx; variable
101 EXPECT_EQ(pthread_mutex_init(&mtx, nullptr), 0) << "> return errno";
102 … EXPECT_EQ(pthread_create(&tid[0], nullptr, ThreadMtrylock1, (void*)&mtx), 0) << "> return errno";
103 … EXPECT_EQ(pthread_create(&tid[1], nullptr, ThreadMtrylock2, (void*)&mtx), 0) << "> return errno";
108 EXPECT_EQ(pthread_mutex_destroy(&mtx), 0) << "> return errno";
186 pthread_mutex_t *mtx = (pthread_mutex_t*)arg; in ThreadPthreadMtimedlockOut() local
193 EXPECT_EQ(pthread_mutex_timedlock(mtx, &ts), ETIMEDOUT) << "> return should errno"; in ThreadPthreadMtimedlockOut()
210 pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable
212 …EXPECT_EQ(pthread_create(&tid, nullptr, ThreadPthreadMtimedlockOut, (void*)&mtx), 0) << "> return …
214 EXPECT_EQ(pthread_mutex_lock(&mtx), 0) << "> return errno";
219 EXPECT_EQ(pthread_mutex_unlock(&mtx), 0) << "> return errno";
229 pthread_mutex_t *mtx = (pthread_mutex_t*)arg; in ThreadPthreadMtimedlockNoOut() local
235 EXPECT_EQ(pthread_mutex_timedlock(mtx, &ts), 0) << "> return errno"; in ThreadPthreadMtimedlockNoOut()
247 pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable
249 …EXPECT_EQ(pthread_create(&tid, nullptr, ThreadPthreadMtimedlockNoOut, (void*)&mtx), 0) << "> retur…
251 EXPECT_EQ(pthread_mutex_lock(&mtx), 0) << "> return errno";
254 EXPECT_EQ(pthread_mutex_unlock(&mtx), 0) << "> return errno";
300 pthread_mutex_t *mtx = (pthread_mutex_t *)arg; in ThreadMattrTypeRecursive1() local
301 ChildAssertEQ(pthread_mutex_lock(mtx), 0); in ThreadMattrTypeRecursive1()
303 ChildAssertEQ(pthread_mutex_unlock(mtx), 0); in ThreadMattrTypeRecursive1()
320 pthread_mutex_t mtx; variable
327 ChildAssertEQ(pthread_mutex_init(&mtx, &mtxTypeAttr), 0);
328 ChildAssertEQ(pthread_create(&tid, nullptr, ThreadMattrTypeRecursive1, (void*)&mtx), 0);
330 exitCode = ChildExpectEQ(pthread_mutex_unlock(&mtx), EPERM);
353 pthread_mutex_t mtx; variable
360 ChildAssertEQ(pthread_mutex_init(&mtx, &mtxTypeAttr), 0);
362 ChildAssertEQ(pthread_mutex_lock(&mtx), 0);
363 exitCode = ChildExpectEQ(pthread_mutex_lock(&mtx), 0);
364 ChildAssertEQ(pthread_mutex_unlock(&mtx), 0);
377 pthread_mutex_t *mtx = (pthread_mutex_t *)arg; in ThreadMattrTypeRecursive3() local
378 ChildAssertEQ(pthread_mutex_lock(mtx), 0); in ThreadMattrTypeRecursive3()
380 ChildAssertEQ(pthread_mutex_unlock(mtx), 0); in ThreadMattrTypeRecursive3()
397 pthread_mutex_t mtx; variable
404 ChildAssertEQ(pthread_mutex_init(&mtx, &mtxTypeAttr), 0);
405 ChildAssertEQ(pthread_create(&tid, nullptr, ThreadMattrTypeRecursive3, (void*)&mtx), 0);
407 exitCode = ChildExpectEQ(pthread_mutex_unlock(&mtx), EPERM);
430 pthread_mutex_t mtx; variable
437 ChildAssertEQ(pthread_mutex_init(&mtx, &mtxTypeAttr), 0);
439 ChildAssertEQ(pthread_mutex_lock(&mtx), 0);
440 exitCode = ChildExpectEQ(pthread_mutex_lock(&mtx), EDEADLK);
441 ChildAssertEQ(pthread_mutex_unlock(&mtx), 0);
463 pthread_mutex_t mtx; variable
471 ChildAssertEQ(pthread_mutex_init(&mtx, &mtxTypeAttr), 0);
473 ChildAssertEQ(pthread_mutex_lock(&mtx), 0);
477 ChildAssertEQ(pthread_mutex_unlock(&mtx), 0);