Searched refs:lk (Results 1 - 25 of 90) sorted by relevance

1234

/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/
H A Dtry_lock.pass.cpp42 std::shared_lock<mutex> lk(m, std::defer_lock);
43 assert(lk.try_lock() == true);
45 assert(lk.owns_lock() == true);
48 lk.try_lock();
55 lk.unlock();
56 assert(lk.try_lock() == false);
58 assert(lk.owns_lock() == false);
59 lk.release();
62 lk.try_lock();
H A Dunlock.pass.cpp38 std::shared_lock<mutex> lk(m);
39 lk.unlock();
41 assert(lk.owns_lock() == false);
44 lk.unlock();
51 lk.release();
54 lk.unlock();
H A Dtry_lock_for.pass.cpp47 std::shared_lock<mutex> lk(m, std::defer_lock);
48 assert(lk.try_lock_for(ms(5)) == true);
50 assert(lk.owns_lock() == true);
53 lk.try_lock_for(ms(5));
60 lk.unlock();
61 assert(lk.try_lock_for(ms(5)) == false);
63 assert(lk.owns_lock() == false);
64 lk.release();
67 lk.try_lock_for(ms(5));
H A Dtry_lock_until.pass.cpp47 std::shared_lock<mutex> lk(m, std::defer_lock);
48 assert(lk.try_lock_until(Clock::now()) == true);
50 assert(lk.owns_lock() == true);
53 lk.try_lock_until(Clock::now());
60 lk.unlock();
61 assert(lk.try_lock_until(Clock::now()) == false);
63 assert(lk.owns_lock() == false);
64 lk.release();
67 lk.try_lock_until(Clock::now());
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/
H A Dtry_lock.pass.cpp37 std::unique_lock<mutex> lk(m, std::defer_lock);
38 assert(lk.try_lock() == true);
40 assert(lk.owns_lock() == true);
43 lk.try_lock();
50 lk.unlock();
51 assert(lk.try_lock() == false);
53 assert(lk.owns_lock() == false);
54 lk.release();
57 lk.try_lock();
H A Dtry_lock_for.pass.cpp42 std::unique_lock<mutex> lk(m, std::defer_lock);
43 assert(lk.try_lock_for(ms(5)) == true);
45 assert(lk.owns_lock() == true);
48 lk.try_lock_for(ms(5));
55 lk.unlock();
56 assert(lk.try_lock_for(ms(5)) == false);
58 assert(lk.owns_lock() == false);
59 lk.release();
62 lk.try_lock_for(ms(5));
H A Dunlock.pass.cpp33 std::unique_lock<mutex> lk(m);
34 lk.unlock();
36 assert(lk.owns_lock() == false);
39 lk.unlock();
46 lk.release();
49 lk.unlock();
H A Dtry_lock_until.pass.cpp42 std::unique_lock<mutex> lk(m, std::defer_lock);
43 assert(lk.try_lock_until(Clock::now()) == true);
45 assert(lk.owns_lock() == true);
48 lk.try_lock_until(Clock::now());
55 lk.unlock();
56 assert(lk.try_lock_until(Clock::now()) == false);
58 assert(lk.owns_lock() == false);
59 lk.release();
62 lk.try_lock_until(Clock::now());
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/
H A Drelease.pass.cpp36 std::unique_lock<mutex> lk(m);
37 assert(lk.mutex() == &m);
38 assert(lk.owns_lock() == true);
41 assert(lk.release() == &m);
42 assert(lk.mutex() == nullptr);
43 assert(lk.owns_lock() == false);
/external/libxml2/
H A Dlist.c54 * @lk: a link
56 * Unlink and deallocate @lk from list @l
59 xmlLinkDeallocator(xmlListPtr l, xmlLinkPtr lk) argument
61 (lk->prev)->next = lk->next;
62 (lk->next)->prev = lk->prev;
64 l->linkDeallocator(lk);
65 xmlFree(lk);
100 xmlLinkPtr lk; local
120 xmlLinkPtr lk; local
140 xmlLinkPtr lk; local
165 xmlLinkPtr lk; local
233 xmlLinkPtr lk; local
254 xmlLinkPtr lk; local
355 xmlLinkPtr lk; local
380 xmlLinkPtr lk; local
424 xmlLinkPtr lk; local
496 xmlLinkPtr lk; local
604 xmlLinkGetData(xmlLinkPtr lk) argument
620 xmlLinkPtr lk; local
677 xmlLinkPtr lk; local
698 xmlLinkPtr lk; local
764 xmlLinkPtr lk; local
[all...]
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/
H A Dmutex_adopt_lock.pass.cpp26 std::shared_lock<std::shared_timed_mutex> lk(m, std::adopt_lock);
27 assert(lk.mutex() == &m);
28 assert(lk.owns_lock() == true);
H A Dmutex_defer_lock.pass.cpp25 std::shared_lock<std::shared_timed_mutex> lk(m, std::defer_lock);
26 assert(lk.mutex() == &m);
27 assert(lk.owns_lock() == false);
H A Dmove_ctor.pass.cpp29 std::shared_lock<std::shared_timed_mutex> lk = std::move(lk0); local
30 assert(lk.mutex() == &m);
31 assert(lk.owns_lock() == true);
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/
H A Dcopy_ctor.fail.cpp24 std::unique_lock<std::mutex> lk = lk0; local
25 assert(lk.mutex() == &m);
26 assert(lk.owns_lock() == true);
H A Dmutex_adopt_lock.pass.cpp25 std::unique_lock<std::mutex> lk(m, std::adopt_lock);
26 assert(lk.mutex() == &m);
27 assert(lk.owns_lock() == true);
H A Dmutex_defer_lock.pass.cpp24 std::unique_lock<std::mutex> lk(m, std::defer_lock);
25 assert(lk.mutex() == &m);
26 assert(lk.owns_lock() == false);
H A Dmove_ctor.pass.cpp27 std::unique_lock<std::mutex> lk = std::move(lk0); local
28 assert(lk.mutex() == &m);
29 assert(lk.owns_lock() == true);
/external/libcxx/test/std/thread/thread.condition/thread.condition.condvar/
H A Dwait.pass.cpp31 std::unique_lock<std::mutex> lk(mut);
36 cv.wait(lk);
42 std::unique_lock<std::mutex>lk(mut);
46 cv.wait(lk);
49 lk.unlock();
H A Ddestructor.pass.cpp32 Lock lk(m);
40 Lock lk(m);
44 cv->wait(lk);
51 Lock lk(m);
53 cv->wait(lk);
54 lk.unlock();
H A Dwait_for.pass.cpp39 std::unique_lock<std::mutex> lk(mut);
45 cv.wait_for(lk, milliseconds(250)) == std::cv_status::no_timeout)
64 std::unique_lock<std::mutex>lk(mut);
68 cv.wait(lk);
71 lk.unlock();
78 std::unique_lock<std::mutex>lk(mut);
82 cv.wait(lk);
84 lk.unlock();
H A Dwait_for_pred.pass.cpp49 std::unique_lock<std::mutex> lk(mut);
54 bool r = cv.wait_for(lk, milliseconds(250), Pred(test2));
72 std::unique_lock<std::mutex>lk(mut);
76 cv.wait(lk);
79 lk.unlock();
86 std::unique_lock<std::mutex>lk(mut);
90 cv.wait(lk);
92 lk.unlock();
/external/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/
H A Dwait.pass.cpp36 L1 lk(m0);
41 cv.wait(lk);
47 L1 lk(m0);
51 cv.wait(lk);
54 lk.unlock();
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/
H A Drelease.pass.cpp41 std::shared_lock<mutex> lk(m);
42 assert(lk.mutex() == &m);
43 assert(lk.owns_lock() == true);
46 assert(lk.release() == &m);
47 assert(lk.mutex() == nullptr);
48 assert(lk.owns_lock() == false);
51 static_assert(noexcept(lk.release()), "release must be noexcept");
/external/clang/test/CodeGen/
H A Dunsigned-overflow.c5 unsigned long li, lj, lk; variable
15 // CHECK-NEXT: [[T2:%.*]] = load i64, i64* @lk
20 li = lj + lk;
27 // CHECK-NEXT: [[T2:%.*]] = load i64, i64* @lk
32 li = lj - lk;
39 // CHECK-NEXT: [[T2:%.*]] = load i64, i64* @lk
44 li = lj * lk;
/external/libcxx/src/
H A Dcondition_variable.cpp39 condition_variable::wait(unique_lock<mutex>& lk) _NOEXCEPT
41 if (!lk.owns_lock())
44 int ec = pthread_cond_wait(&__cv_, lk.mutex()->native_handle());
50 condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
54 if (!lk.owns_lock())
74 int ec = pthread_cond_timedwait(&__cv_, lk.mutex()->native_handle(), &ts);
80 notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk) argument
82 __thread_local_data()->notify_all_at_thread_exit(&cond, lk.release());

Completed in 261 milliseconds

1234