/ndk/sources/cxx-stl/llvm-libc++/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++/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++/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++/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()
|
D | notify_all.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
|
D | wait_until_pred.pass.cpp | 66 L1 lk(m0); in f() local 72 bool r = cv.wait_until(lk, t, Pred(test2)); in f() 92 L1 lk(m0); in main() local 96 cv.wait(lk); in main() 99 lk.unlock(); in main() 106 L1 lk(m0); in main() local 110 cv.wait(lk); in main() 112 lk.unlock(); in main()
|
D | wait.pass.cpp | 34 L1 lk(m0); in f() local 39 cv.wait(lk); in f() 45 L1 lk(m0); in main() local 49 cv.wait(lk); in main() 52 lk.unlock(); in main()
|
D | wait_pred.pass.cpp | 44 L1 lk(m0); in f() local 48 cv.wait(lk, Pred(test2)); in f() 54 L1 lk(m0); in main() local 58 cv.wait(lk); in main() 61 lk.unlock(); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/test/thread/thread.condition/thread.condition.condvar/ |
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 | 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 | 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()
|
D | wait_until_pred.pass.cpp | 62 std::unique_lock<std::mutex> lk(mut); in f() local 68 bool r = cv.wait_until(lk, t, Pred(test2)); in f() 88 std::unique_lock<std::mutex>lk(mut); in main() local 92 cv.wait(lk); in main() 95 lk.unlock(); in main() 102 std::unique_lock<std::mutex>lk(mut); in main() local 106 cv.wait(lk); in main() 108 lk.unlock(); in main()
|
D | wait.pass.cpp | 29 std::unique_lock<std::mutex> lk(mut); in f() local 34 cv.wait(lk); in f() 40 std::unique_lock<std::mutex>lk(mut); in main() local 44 cv.wait(lk); in main() 47 lk.unlock(); in main()
|
D | notify_all.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
|
D | wait_pred.pass.cpp | 40 std::unique_lock<std::mutex> lk(mut); in f() local 44 cv.wait(lk, Pred(test2)); in f() 50 std::unique_lock<std::mutex>lk(mut); in main() local 54 cv.wait(lk); in main() 57 lk.unlock(); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/src/ |
D | condition_variable.cpp | 35 condition_variable::wait(unique_lock<mutex>& lk) in wait() argument 37 if (!lk.owns_lock()) in wait() 40 int ec = pthread_cond_wait(&__cv_, lk.mutex()->native_handle()); in wait() 46 condition_variable::__do_timed_wait(unique_lock<mutex>& lk, in __do_timed_wait() argument 50 if (!lk.owns_lock()) in __do_timed_wait() 70 int ec = pthread_cond_timedwait(&__cv_, lk.mutex()->native_handle(), &ts); in __do_timed_wait() 76 notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk) in notify_all_at_thread_exit() argument 78 __thread_local_data()->notify_all_at_thread_exit(&cond, lk.release()); in notify_all_at_thread_exit()
|