/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/ |
D | try_lock.pass.cpp | 35 std::unique_lock<mutex> lk(m, std::defer_lock); in main() local 36 assert(lk.try_lock() == true); in main() 38 assert(lk.owns_lock() == true); in main() 41 lk.try_lock(); in main() 48 lk.unlock(); in main() 49 assert(lk.try_lock() == false); in main() 51 assert(lk.owns_lock() == false); in main() 52 lk.release(); in main() 55 lk.try_lock(); in main()
|
D | try_lock_for.pass.cpp | 40 std::unique_lock<mutex> lk(m, std::defer_lock); in main() local 41 assert(lk.try_lock_for(ms(5)) == true); in main() 43 assert(lk.owns_lock() == true); in main() 46 lk.try_lock_for(ms(5)); in main() 53 lk.unlock(); in main() 54 assert(lk.try_lock_for(ms(5)) == false); in main() 56 assert(lk.owns_lock() == false); in main() 57 lk.release(); in main() 60 lk.try_lock_for(ms(5)); in main()
|
D | try_lock_until.pass.cpp | 40 std::unique_lock<mutex> lk(m, std::defer_lock); in main() local 41 assert(lk.try_lock_until(Clock::now()) == true); in main() 43 assert(lk.owns_lock() == true); in main() 46 lk.try_lock_until(Clock::now()); in main() 53 lk.unlock(); in main() 54 assert(lk.try_lock_until(Clock::now()) == false); in main() 56 assert(lk.owns_lock() == false); in main() 57 lk.release(); in main() 60 lk.try_lock_until(Clock::now()); in main()
|
D | unlock.pass.cpp | 31 std::unique_lock<mutex> lk(m); in main() local 32 lk.unlock(); in main() 34 assert(lk.owns_lock() == false); in main() 37 lk.unlock(); in main() 44 lk.release(); in main() 47 lk.unlock(); in main()
|
D | lock.pass.cpp | 31 std::unique_lock<std::mutex> lk(m, std::defer_lock); in f() local 33 lk.lock(); in f() 35 assert(lk.owns_lock() == true); in f() 40 lk.lock(); in f() 47 lk.unlock(); in f() 48 lk.release(); in f() 51 lk.lock(); in f()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/ |
D | try_lock.pass.cpp | 40 std::shared_lock<mutex> lk(m, std::defer_lock); in main() local 41 assert(lk.try_lock() == true); in main() 43 assert(lk.owns_lock() == true); in main() 46 lk.try_lock(); in main() 53 lk.unlock(); in main() 54 assert(lk.try_lock() == false); in main() 56 assert(lk.owns_lock() == false); in main() 57 lk.release(); in main() 60 lk.try_lock(); in main()
|
D | try_lock_for.pass.cpp | 45 std::shared_lock<mutex> lk(m, std::defer_lock); in main() local 46 assert(lk.try_lock_for(ms(5)) == true); in main() 48 assert(lk.owns_lock() == true); in main() 51 lk.try_lock_for(ms(5)); in main() 58 lk.unlock(); in main() 59 assert(lk.try_lock_for(ms(5)) == false); in main() 61 assert(lk.owns_lock() == false); in main() 62 lk.release(); in main() 65 lk.try_lock_for(ms(5)); in main()
|
D | try_lock_until.pass.cpp | 45 std::shared_lock<mutex> lk(m, std::defer_lock); in main() local 46 assert(lk.try_lock_until(Clock::now()) == true); in main() 48 assert(lk.owns_lock() == true); in main() 51 lk.try_lock_until(Clock::now()); in main() 58 lk.unlock(); in main() 59 assert(lk.try_lock_until(Clock::now()) == false); in main() 61 assert(lk.owns_lock() == false); in main() 62 lk.release(); in main() 65 lk.try_lock_until(Clock::now()); in main()
|
D | unlock.pass.cpp | 36 std::shared_lock<mutex> lk(m); in main() local 37 lk.unlock(); in main() 39 assert(lk.owns_lock() == false); in main() 42 lk.unlock(); in main() 49 lk.release(); in main() 52 lk.unlock(); in main()
|
D | lock.pass.cpp | 34 std::shared_lock<std::shared_timed_mutex> lk(m, std::defer_lock); in f() local 36 lk.lock(); in f() 38 assert(lk.owns_lock() == true); in f() 43 lk.lock(); in f() 50 lk.unlock(); in f() 51 lk.release(); in f() 54 lk.lock(); in f()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/ |
D | release.pass.cpp | 39 std::shared_lock<mutex> lk(m); in main() local 40 assert(lk.mutex() == &m); in main() 41 assert(lk.owns_lock() == true); in main() 44 assert(lk.release() == &m); in main() 45 assert(lk.mutex() == nullptr); in main() 46 assert(lk.owns_lock() == false); in main() 49 static_assert(noexcept(lk.release()), "release must be noexcept"); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/ |
D | mutex_try_to_lock.pass.cpp | 33 std::unique_lock<std::mutex> lk(m, std::try_to_lock); in f() local 34 assert(lk.owns_lock() == false); in f() 37 std::unique_lock<std::mutex> lk(m, std::try_to_lock); in f() local 38 assert(lk.owns_lock() == false); in f() 41 std::unique_lock<std::mutex> lk(m, std::try_to_lock); in f() local 42 assert(lk.owns_lock() == false); in f() 46 std::unique_lock<std::mutex> lk(m, std::try_to_lock); in f() local 47 if (lk.owns_lock()) in f()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/ |
D | release.pass.cpp | 34 std::unique_lock<mutex> lk(m); in main() local 35 assert(lk.mutex() == &m); in main() 36 assert(lk.owns_lock() == true); in main() 39 assert(lk.release() == &m); in main() 40 assert(lk.mutex() == nullptr); in main() 41 assert(lk.owns_lock() == false); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvarany/ |
D | wait_for.pass.cpp | 40 L1 lk(m0); in f() local 46 cv.wait_for(lk, milliseconds(250)) == std::cv_status::no_timeout) in f() 65 L1 lk(m0); in main() local 69 cv.wait(lk); in main() 72 lk.unlock(); in main() 79 L1 lk(m0); in main() local 83 cv.wait(lk); in main() 85 lk.unlock(); in main()
|
D | wait_for_pred.pass.cpp | 50 L1 lk(m0); in f() local 55 bool r = cv.wait_for(lk, milliseconds(250), Pred(test2)); in f() 73 L1 lk(m0); in main() local 77 cv.wait(lk); in main() 80 lk.unlock(); in main() 87 L1 lk(m0); in main() local 91 cv.wait(lk); in main() 93 lk.unlock(); in main()
|
D | notify_one.pass.cpp | 34 L1 lk(m0); in f1() local 37 cv.wait(lk); in f1() 44 L1 lk(m0); in f2() local 47 cv.wait(lk); in f2() 58 L1 lk(m0); in main() local 65 L1 lk(m0); in main() local 82 L1 lk(m0); in main() local
|
D | wait_until.pass.cpp | 55 L1 lk(m0); in f() local 61 while (test2 == 0 && cv.wait_until(lk, t) == std::cv_status::no_timeout) in f() 80 L1 lk(m0); in main() local 84 cv.wait(lk); in main() 87 lk.unlock(); in main() 94 L1 lk(m0); in main() local 98 cv.wait(lk); in main() 100 lk.unlock(); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/ |
D | mutex_try_to_lock.pass.cpp | 36 std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock); in f() local 37 assert(lk.owns_lock() == false); in f() 40 std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock); in f() local 41 assert(lk.owns_lock() == false); in f() 44 std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock); in f() local 45 assert(lk.owns_lock() == false); in f() 49 std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock); in f() local 50 if (lk.owns_lock()) in f()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvar/ |
D | wait_for.pass.cpp | 37 std::unique_lock<std::mutex> lk(mut); in f() local 43 cv.wait_for(lk, milliseconds(250)) == std::cv_status::no_timeout) in f() 62 std::unique_lock<std::mutex>lk(mut); in main() local 66 cv.wait(lk); in main() 69 lk.unlock(); in main() 76 std::unique_lock<std::mutex>lk(mut); in main() local 80 cv.wait(lk); in main() 82 lk.unlock(); in main()
|
D | wait_for_pred.pass.cpp | 47 std::unique_lock<std::mutex> lk(mut); in f() local 52 bool r = cv.wait_for(lk, milliseconds(250), Pred(test2)); in f() 70 std::unique_lock<std::mutex>lk(mut); in main() local 74 cv.wait(lk); in main() 77 lk.unlock(); in main() 84 std::unique_lock<std::mutex>lk(mut); in main() local 88 cv.wait(lk); in main() 90 lk.unlock(); in main()
|
D | destructor.pass.cpp | 30 Lock lk(m); in f() local 38 Lock lk(m); in g() local 42 cv->wait(lk); in g() 49 Lock lk(m); in main() local 51 cv->wait(lk); in main() 52 lk.unlock(); in main()
|
D | notify_one.pass.cpp | 30 std::unique_lock<std::mutex> lk(mut); in f1() local 33 cv.wait(lk); in f1() 40 std::unique_lock<std::mutex> lk(mut); in f2() local 43 cv.wait(lk); in f2() 54 std::unique_lock<std::mutex>lk(mut); in main() local 61 std::unique_lock<std::mutex>lk(mut); in main() local 78 std::unique_lock<std::mutex>lk(mut); in main() local
|
D | wait_until.pass.cpp | 52 std::unique_lock<std::mutex> lk(mut); in f() local 58 while (test2 == 0 && cv.wait_until(lk, t) == std::cv_status::no_timeout) in f() 77 std::unique_lock<std::mutex>lk(mut); in main() local 81 cv.wait(lk); in main() 84 lk.unlock(); in main() 91 std::unique_lock<std::mutex>lk(mut); in main() local 95 cv.wait(lk); in main() 97 lk.unlock(); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/ |
D | condition_variable.cpp | 37 condition_variable::wait(unique_lock<mutex>& lk) _NOEXCEPT in wait() argument 39 if (!lk.owns_lock()) in wait() 42 int ec = pthread_cond_wait(&__cv_, lk.mutex()->native_handle()); in wait() 48 condition_variable::__do_timed_wait(unique_lock<mutex>& lk, in __do_timed_wait() argument 52 if (!lk.owns_lock()) in __do_timed_wait() 72 int ec = pthread_cond_timedwait(&__cv_, lk.mutex()->native_handle(), &ts); in __do_timed_wait() 78 notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk) in notify_all_at_thread_exit() argument 80 __thread_local_data()->notify_all_at_thread_exit(&cond, lk.release()); in notify_all_at_thread_exit()
|
D | shared_mutex.cpp | 27 unique_lock<mutex> lk(__mut_); in lock() local 29 __gate1_.wait(lk); in lock() 32 __gate2_.wait(lk); in lock() 38 unique_lock<mutex> lk(__mut_); in try_lock() local 60 unique_lock<mutex> lk(__mut_); in lock_shared() local 62 __gate1_.wait(lk); in lock_shared() 71 unique_lock<mutex> lk(__mut_); in try_lock_shared() local
|