/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/ |
D | try_lock.pass.cpp | 1 //===----------------------------------------------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 9 // UNSUPPORTED: libcpp-has-no-threads 36 bool locked() const {return locked_;} in locked() function in L0 54 bool locked() const {return locked_;} in locked() function in L1 72 bool locked() const {return locked_;} in locked() function in L2 80 assert(std::try_lock(l0, l1) == -1); in main() 81 assert(l0.locked()); in main() 82 assert(l1.locked()); in main() [all …]
|
D | lock.pass.cpp | 1 //===----------------------------------------------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 9 // UNSUPPORTED: libcpp-has-no-threads 46 bool locked() const {return locked_;} in locked() function in L0 69 bool locked() const {return locked_;} in locked() function in L1 92 bool locked() const {return locked_;} in locked() function in L2 101 assert(l0.locked()); in main() 102 assert(l1.locked()); in main() 108 assert(l0.locked()); in main() [all …]
|
/external/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/ |
D | try_lock.pass.cpp | 1 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===// 10 // UNSUPPORTED: libcpp-has-no-threads 37 bool locked() const {return locked_;} in locked() function in L0 55 bool locked() const {return locked_;} in locked() function in L1 73 bool locked() const {return locked_;} in locked() function in L2 81 assert(std::try_lock(l0, l1) == -1); in main() 82 assert(l0.locked()); in main() 83 assert(l1.locked()); in main() 89 assert(!l0.locked()); in main() [all …]
|
D | lock.pass.cpp | 1 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===// 10 // UNSUPPORTED: libcpp-has-no-threads 47 bool locked() const {return locked_;} in locked() function in L0 70 bool locked() const {return locked_;} in locked() function in L1 93 bool locked() const {return locked_;} in locked() function in L2 102 assert(l0.locked()); in main() 103 assert(l1.locked()); in main() 109 assert(l0.locked()); in main() 110 assert(l1.locked()); in main() [all …]
|
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/ |
D | mutex.pass.cpp | 1 //===----------------------------------------------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 9 // UNSUPPORTED: libcpp-has-no-threads 23 bool locked = false; member 25 ~TestMutex() { assert(!locked); } in ~TestMutex() 27 void lock() { assert(!locked); locked = true; } in lock() 28 bool try_lock() { if (locked) return false; locked = true; return true; } in try_lock() 29 void unlock() { assert(locked); locked = false; } in unlock() 37 bool locked = false; member [all …]
|
D | adopt_lock.pass.cpp | 1 //===----------------------------------------------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 9 // UNSUPPORTED: libcpp-has-no-threads 23 bool locked = false; member 26 void lock() { assert(!locked); locked = true; } in lock() 27 bool try_lock() { if (locked) return false; locked = true; return true; } in try_lock() 28 void unlock() { assert(locked); locked = false; } in unlock() 46 assert(m1.locked); in main() 48 assert(!m1.locked); in main() [all …]
|
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/ |
D | mutex.pass.cpp | 1 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===// 10 // UNSUPPORTED: libcpp-has-no-threads 24 bool locked = false; member 26 ~TestMutex() { assert(!locked); } in ~TestMutex() 28 void lock() { assert(!locked); locked = true; } in lock() 29 bool try_lock() { if (locked) return false; locked = true; return true; } in try_lock() 30 void unlock() { assert(locked); locked = false; } in unlock() 38 bool locked = false; member 42 ~TestMutexThrows() { assert(!locked); } in ~TestMutexThrows() [all …]
|
D | adopt_lock.pass.cpp | 1 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===// 10 // UNSUPPORTED: libcpp-has-no-threads 24 bool locked = false; member 27 void lock() { assert(!locked); locked = true; } in lock() 28 bool try_lock() { if (locked) return false; locked = true; return true; } in try_lock() 29 void unlock() { assert(locked); locked = false; } in unlock() 47 assert(m1.locked); in main() 49 assert(!m1.locked); in main() 57 assert(m1.locked && m2.locked); in main() [all …]
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/sync/ |
D | Mutex.kt | 2 …* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 licen… in <lambda>() 21 …* It is **non-reentrant**, that is invoking [lock] even from the same thread/coroutine that curren… in <lambda>() 26 * An unlock on a [Mutex] happens-before every subsequent successful lock on that [Mutex]. in <lambda>() 31 * Returns `true` when this mutex is locked. in <lambda>() 36 * Tries to lock this mutex, returning `false` if this mutex is already locked. in <lambda>() 38 …* @param owner Optional owner token for debugging. When `owner` is specified (non-null value) and … in <lambda>() 39 …* is already locked with the same token (same identity), this function throws [IllegalState… in <lambda>() 44 * Locks this mutex, suspending caller while the mutex is locked. in <lambda>() 49 …ill not resume successfully. See [suspendCancellableCoroutine] documentation for low-level details. in <lambda>() 59 * This function is fair; suspended callers are resumed in first-in-first-out order. in <lambda>() [all …]
|
/external/llvm/include/llvm/Support/ |
D | UniqueLock.h | 1 //===-- Support/UniqueLock.h - Acquire/Release Mutex In Scope ---*- C++ -*-===// 8 //===----------------------------------------------------------------------===// 10 // This file defines a guard for a block of code that ensures a Mutex is locked 13 //===----------------------------------------------------------------------===// 21 /// A pared-down imitation of std::unique_lock from C++11. Contrary to the 23 /// an associated mutex, which is guaranteed to be locked upon creation 25 /// and re-lock it freely during its lifetime. 30 bool locked; variable 35 unique_lock() : M(nullptr), locked(false) {} in unique_lock() 36 explicit unique_lock(MutexT &m) : M(&m), locked(true) { M->lock(); } in unique_lock() [all …]
|
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/ |
D | UniqueLock.h | 1 //===-- Support/UniqueLock.h - Acquire/Release Mutex In Scope ---*- C++ -*-===// 8 //===----------------------------------------------------------------------===// 10 // This file defines a guard for a block of code that ensures a Mutex is locked 13 //===----------------------------------------------------------------------===// 21 /// A pared-down imitation of std::unique_lock from C++11. Contrary to the 23 /// an associated mutex, which is guaranteed to be locked upon creation 25 /// and re-lock it freely during its lifetime. 30 bool locked; variable 35 unique_lock() : M(nullptr), locked(false) {} in unique_lock() 36 explicit unique_lock(MutexT &m) : M(&m), locked(true) { M->lock(); } in unique_lock() [all …]
|
/external/usrsctp/usrsctplib/netinet/ |
D | sctp_process_lock.h | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 4 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 5 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. 6 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. 40 * - atomic_add_int(&foo, val) - add atomically the value 41 * - atomic_fetchadd_int(&foo, val) - does same as atomic_add_int 43 * - atomic_subtract_int(&foo, val) - can be made from atomic_add_int() 45 * - atomic_cmpset_int(&foo, value, newvalue) - Does a set of newvalue 161 InitializeCriticalSection(&(_inp)->inp_rdata_mtx) [all …]
|
/external/llvm-project/compiler-rt/test/tsan/ |
D | real_deadlock_detector_stress_test.cpp | 1 // RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t && %run %t 2>&1 | FileCheck %s 19 const int kStateNotInited = -1; 20 const int kStateLocked = -2; 44 std::vector<int> locked; in Thread() local 47 if (what < 4 && locked.size() < kMaxPerThread) { in Thread() 49 int max_locked = -1; in Thread() 50 if (!locked.empty()) { in Thread() 51 max_locked = *std::max_element(locked.begin(), locked.end()); in Thread() 52 if (max_locked == kMutexes - 1) { in Thread() 53 i--; in Thread() [all …]
|
/external/compiler-rt/test/tsan/ |
D | real_deadlock_detector_stress_test.cc | 1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s 19 const int kStateNotInited = -1; 20 const int kStateLocked = -2; 44 std::vector<int> locked; in Thread() local 47 if (what < 4 && locked.size() < kMaxPerThread) { in Thread() 49 int max_locked = -1; in Thread() 50 if (!locked.empty()) { in Thread() 51 max_locked = *std::max_element(locked.begin(), locked.end()); in Thread() 52 if (max_locked == kMutexes - 1) { in Thread() 53 i--; in Thread() [all …]
|
/external/autotest/server/site_tests/firmware_Cr50BID/ |
D | firmware_Cr50BID.py | 2 # Use of this source code is governed by a BSD-style license that can be 16 """Verify cr50 board id behavior on a board id locked image. 19 board id locked image. 21 Set the board id on a non board id locked image and verify cr50 will 24 @param cr50_dbg_image_path: path to the node locked dev image. 32 # The board id locked can only run on devices with the right chip board id. 35 # - BID support was added in 0.0.21. 36 # - Keeping the rollback state after AP boot was added in 0.3.4. 37 # - Complete support for SPI PLT_RST straps was added in 0.3.18 38 # - 4us INT_AP_L pulse was added in 0.3.25 [all …]
|
/external/autotest/client/site_tests/cellular_SIMLocking/ |
D | cellular_SIMLocking.py | 2 # Use of this source code is governed by a BSD-style license that can be 23 - Attempt to enable SIM lock with incorrect sim-pin. Verify that the 25 - Successfully pin-lock the SIM. 26 - Unlock a pin-locked SIM. 27 - Attempt to unlock a pin-locked SIM with incorrect sim-pin, until it gets 28 puk-locked. 29 - Unblock a puk-locked SIM. 30 - Attempt to unblock a puk-locked SIM with incorrect sim-puk, until the 31 SIM gets blocked. At this point, a sim-pin2 might be expected by some 32 SIMs. This test does not attempt to unlock the SIM using sim-pin2. [all …]
|
/external/swiftshader/third_party/subzero/unittest/AssemblerX8664/ |
D | Locked.cpp | 1 //===- subzero/unittest/AssemblerX8664/Locked.cpp -------------------------===// 8 //===----------------------------------------------------------------------===// 140 static constexpr bool Locked = true; in TEST_F() local 171 TestImplAddrReg(0xa2b34567, Dst1, 0x0507ddee, Locked, Size); \ in TEST_F() 203 static constexpr bool Locked = true; in TEST_F() local 216 __ xadd(IceType_i8, Address::Absolute(0x1FF00), Encoded_GPR_r14(), Locked); in TEST_F() 235 __ xadd(IceType_i16, Address::Absolute(0x1FF00), Encoded_GPR_r14(), Locked); in TEST_F() 254 __ xadd(IceType_i32, Address::Absolute(0x1FF00), Encoded_GPR_r14(), Locked); in TEST_F() 288 static constexpr bool Locked = true; in TEST_F() local 325 TestImpl(0x98987676543210ull, 0x1, 0x98987676543210ull, Locked); in TEST_F() [all …]
|
/external/python/cpython2/Lib/ |
D | mutex.py | 1 """Mutual exclusion -- for use with module sched 3 A mutex has two pieces of state -- a 'locked' bit and a queue. 4 When the mutex is not locked, the queue is empty. 11 Of course, no multi-threading is implied -- hence the funny interface 22 """Create a new mutex -- initially unlocked.""" 23 self.locked = False 27 """Test the locked bit of the mutex.""" 28 return self.locked 31 """Atomic test-and-set -- grab the lock if it is not set, 33 if not self.locked: [all …]
|
/external/libchrome/base/memory/ |
D | discardable_shared_memory.h | 2 // Use of this source code is governed by a BSD-style license that can be 24 // which has the behavior of reliably causing zero-fill-on-demand pages to 29 // platforms but doesn't provide the zero-fill-on-demand pages guarantee. 43 // This class is not thread-safe. Clients are responsible for synchronizing 52 // memory file. Memory must be locked. 58 // Creates and maps a locked DiscardableSharedMemory object with |size|. 62 // Maps the locked discardable memory into the caller's address space. 67 // Unmapping won't unlock previously locked range. 90 // already locked range is undefined. |offset| and |length| must both be 93 // Returns SUCCESS if range was successfully locked and the memory is still [all …]
|
/external/python/cpython3/Python/ |
D | ceval_gil.h | 14 - The GIL is just a boolean variable (locked) whose access is protected 19 - In the GIL-holding thread, the main loop (PyEval_EvalFrameEx) must be 27 sufficient as inter-thread signalling means since Python is run 28 on cache-coherent architectures only.] 30 - A thread wanting to take the GIL will first let pass a given amount of 38 - When a thread releases the GIL and gil_drop_request is set, that thread 39 ensures that another GIL-awaiting thread gets scheduled. 45 This is meant to prohibit the latency-adverse behaviour on multi-core 47 run and end up being the first to re-acquire it, making the "timeslices" 95 _Py_atomic_int uninitialized = {-1}; in _gil_initialize() [all …]
|
/external/python/cpython2/Python/ |
D | thread_pth.h | 4 2000-05-03 Andy Dustman <andy@dustman.net> 7 12 May 1997 -- david arnold <davida@pobox.com> 18 * The pth_lock struct implements a Python lock as a "locked?" bit 25 char locked; /* 0=unlocked, 1=locked */ member 26 /* a <cond, mutex> pair to handle an acquire of a locked lock */ 31 #define CHECK_STATUS(name) if (status == -1) { printf("%d ", status); perror(name); error = 1; } 100 lock->locked = 0; in PyThread_allocate_lock() 101 status = pth_mutex_init(&lock->mut); in PyThread_allocate_lock() 103 status = pth_cond_init(&lock->lock_released); in PyThread_allocate_lock() 110 dprintf(("PyThread_allocate_lock() -> %p\n", lock)); in PyThread_allocate_lock() [all …]
|
/external/python/cpython3/Lib/asyncio/ |
D | locks.py | 27 by a particular coroutine when locked. A primitive lock is in one 28 of two states, 'locked' or 'unlocked'. 32 changes the state to locked and returns immediately. When the 33 state is locked, acquire() blocks until a call to release() in 35 resets it to locked and returns. The release() method should only 36 be called in the locked state; it changes the state to unlocked 69 if not lock.locked(): 90 extra = 'locked' if self._locked else 'unlocked' 93 return f'<{res[1:-1]} [{extra}]>' 95 def locked(self): member in Lock [all …]
|
/external/swiftshader/third_party/subzero/unittest/AssemblerX8632/ |
D | Locked.cpp | 1 //===- subzero/unittest/AssemblerX8632/Locked.cpp -------------------------===// 8 //===----------------------------------------------------------------------===// 140 static constexpr bool Locked = true; in TEST_F() local 173 TestImplAddrReg(0xa2b34567, Dst1, 0x0507ddee, Locked, Size); \ in TEST_F() 199 static constexpr bool Locked = true; in TEST_F() local 212 GPRRegister::Encoded_Reg_esi, Locked); in TEST_F() 230 GPRRegister::Encoded_Reg_esi, Locked); in TEST_F() 248 GPRRegister::Encoded_Reg_esi, Locked); in TEST_F() 259 static constexpr bool Locked = true; in TEST_F() local 298 TestImpl(0x98987676543210ull, 0x1, 0x98987676543210ull, Locked); in TEST_F() [all …]
|
/external/python/cpython3/Lib/test/test_asyncio/ |
D | test_locks.py | 13 r'(set|unset|locked|unlocked)(, value:\d)?(, waiters:\d+)?' 51 self.assertTrue(repr(lock).endswith('[locked]>')) 68 self.assertFalse(lock.locked()) 84 self.assertFalse(lock.locked()) 91 self.assertFalse(lock.locked()) 95 self.assertFalse(primitive.locked()) 163 # - A acquires the lock 164 # - B is blocked in acquire() 165 # - C is blocked in acquire() 168 # - B is cancelled [all …]
|
/external/mockftpserver/tags/2.5/src/main/java/org/mockftpserver/core/command/ |
D | InvocationRecord.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 35 …* type-specific data by its <i>key</i>. The data stored in an {@link InvocationRecord} is CommandH… 37 … The {@link #lock()} method makes an instance of this class immutable. After an instance is locked, 41 * @version $Revision$ - $Date$ 49 private boolean locked = false; field in InvocationRecord 54 * @param command - the Command 55 * @param clientHost - the client host 64 * Lock this instance, making it immutable. After an instance is locked, 69 locked = true; in lock() 73 * Return true if this object has been locked, false otherwise. See {@link #lock()}. [all …]
|