HomeSort by relevance Sort by last modified time
    Searched defs:mutex (Results 76 - 100 of 556) sorted by null

1 2 34 5 6 7 8 91011>>

  /prebuilts/ndk/r13/sources/cxx-stl/llvm-libc++/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/
try_lock.pass.cpp 13 // <mutex>
15 // template <class Mutex> class unique_lock;
19 #include <mutex>
24 struct mutex struct
34 mutex m;
38 std::unique_lock<mutex> lk(m, std::defer_lock);
try_lock_for.pass.cpp 13 // <mutex>
15 // template <class Mutex> class unique_lock;
20 #include <mutex>
27 struct mutex struct
39 mutex m;
43 std::unique_lock<mutex> lk(m, std::defer_lock);
unlock.pass.cpp 13 // <mutex>
15 // template <class Mutex> class unique_lock;
19 #include <mutex>
24 struct mutex struct
30 mutex m;
34 std::unique_lock<mutex> lk(m);
  /prebuilts/ndk/r13/sources/cxx-stl/llvm-libc++/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/
member_swap.pass.cpp 12 // <mutex>
14 // template <class Mutex> class unique_lock;
18 #include <mutex>
21 struct mutex struct
27 mutex m;
31 std::unique_lock<mutex> lk1(m);
32 std::unique_lock<mutex> lk2;
34 assert(lk1.mutex() == nullptr);
36 assert(lk2.mutex() == &m);
nonmember_swap.pass.cpp 12 // <mutex>
14 // template <class Mutex> class unique_lock;
16 // template <class Mutex>
17 // void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y);
19 #include <mutex>
22 struct mutex struct
28 mutex m;
32 std::unique_lock<mutex> lk1(m);
33 std::unique_lock<mutex> lk2
    [all...]
release.pass.cpp 12 // <mutex>
14 // template <class Mutex> class unique_lock;
18 #include <mutex>
21 struct mutex struct
29 int mutex::lock_count = 0;
30 int mutex::unlock_count = 0;
32 mutex m;
36 std::unique_lock<mutex> lk(m);
37 assert(lk.mutex() == &m);
39 assert(mutex::lock_count == 1)
    [all...]
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/
mutex.py 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.
7 When the mutex is unlocked while the queue is not empty,
15 warnpy3k("the mutex module has been removed in Python 3.0", stacklevel=2)
20 class mutex: class in inherits:
22 """Create a new mutex -- initially unlocked."""
27 """Test the locked bit of the mutex."""
40 """Lock a mutex, call the function with supplied argument
41 when it is acquired. If the mutex is already locked, place
49 """Unlock a mutex. If the queue is not empty, call the nex
    [all...]
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/
test_mutex.py 4 mutex = test.test_support.import_module("mutex", deprecated=True) variable
12 self.assertTrue(m.test(), "mutex not held")
18 self.assertTrue(m.test(), "mutex not held")
22 m = mutex.mutex()
29 self.assertFalse(m.test(), "mutex still held")
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/
mutex.py 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.
7 When the mutex is unlocked while the queue is not empty,
15 warnpy3k("the mutex module has been removed in Python 3.0", stacklevel=2)
20 class mutex: class in inherits:
22 """Create a new mutex -- initially unlocked."""
27 """Test the locked bit of the mutex."""
40 """Lock a mutex, call the function with supplied argument
41 when it is acquired. If the mutex is already locked, place
49 """Unlock a mutex. If the queue is not empty, call the nex
    [all...]
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/
test_mutex.py 4 mutex = test.test_support.import_module("mutex", deprecated=True) variable
12 self.assertTrue(m.test(), "mutex not held")
18 self.assertTrue(m.test(), "mutex not held")
22 m = mutex.mutex()
29 self.assertFalse(m.test(), "mutex still held")
  /system/chre/util/tests/
lock_guard_test.cc 44 MockMutex mutex; local
45 EXPECT_EQ(mutex.getLockCount(), 0);
48 LockGuard<MockMutex> lock(mutex);
49 EXPECT_EQ(mutex.getLockCount(), 1);
52 EXPECT_EQ(mutex.getLockCount(), 0);
  /external/compiler-rt/test/lsan/TestCases/
high_allocator_contention.cc 17 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
21 pthread_mutex_lock(&mutex);
22 while (!go) pthread_cond_wait(&cond, &mutex);
23 pthread_mutex_unlock(&mutex);
43 pthread_mutex_lock(&mutex);
46 pthread_mutex_unlock(&mutex);
leak_check_before_thread_started.cc 11 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
15 // This mutex will never be grabbed.
17 pthread_mutex_lock(&mutex);
19 pthread_mutex_unlock(&mutex);
32 // This mutex is never unlocked by the main thread.
33 pthread_mutex_lock(&mutex);
  /external/deqp/framework/delibs/dethread/unix/
deMutexUnix.c 21 * \brief Unix implementation of mutex.
32 /* \todo [2009-11-12 pyry] It is quite nasty to allocate mutex structs from heap. */
40 pthread_mutex_t* mutex = deMalloc(sizeof(pthread_mutex_t)); local
42 if (!mutex)
47 deFree(mutex);
58 deFree(mutex);
69 deFree(mutex);
75 ret = pthread_mutex_init(mutex, &attr);
79 deFree(mutex);
85 return (deMutex)mutex;
    [all...]
  /external/google-breakpad/src/common/android/testing/
pthread_fixes.h 48 pthread_mutex_t mutex; member in struct:__anon19361::__anon19362
57 pthread_mutex_init(&barrier->mutex, NULL);
63 // Lock the mutex
64 pthread_mutex_lock(&barrier->mutex);
66 // waiters, unlock the mutex, then return PTHREAD_BARRIER_SERIAL_THREAD.
70 pthread_mutex_unlock(&barrier->mutex);
76 pthread_cond_wait(&barrier->cond, &barrier->mutex);
79 pthread_mutex_unlock(&barrier->mutex);
86 pthread_mutex_destroy(&barrier->mutex);
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/
1-3.c 16 * 1. Setup a mutex and lock it in main()
21 * 5. Make the thread block on the locked mutex
22 * 6. Send out a thread cancel request to the new thread, and unlock the mutex allowing the
44 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable
65 /* Lock the mutex. It should have already been locked in main, so the thread
67 if (pthread_mutex_lock(&mutex) != 0) {
95 /* Lock the mutex */
96 if (pthread_mutex_lock(&mutex) != 0) {
118 /* Cancel request has been sent, unlock the mutex */
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/
4-1.c 34 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
40 /* acquire the mutex */
41 rc = pthread_mutex_lock(&mutex);
48 rc = pthread_cond_wait(&cond, &mutex);
54 rc = pthread_mutex_unlock(&mutex);
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/
1-1.c 9 * locks the mutex object referenced by 'mutex'. If the mutex is
10 * already locked, the calling thread shall block until the mutex becomes
18 * 1. Create a mutex in the main() thread and lock it.
21 * 3. Save the time before and after the thread tried to lock the mutex.
22 * 4. After the thread has ended, main() will compare the times before and after the mutex
40 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
42 and after locking the mutex usin
    [all...]
4-1.c 15 * and should return 0 since it will be the only one owning the mutex.
35 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
37 and afer locking the mutex using
83 /* This should not block since the mutex is not owned by anyone right now.
85 ret = pthread_mutex_timedlock(&mutex, &timeout);
88 if (pthread_mutex_unlock(&mutex) != 0) {
93 if (pthread_mutex_destroy(&mutex) != 0) {
5-3.c 12 * [ETIMEDOUT] - The timeout expried and the mutex could not be locked.
16 * 1. In main(), lock the mutex then create a thread.
19 * 3. Save the return value of pthread_mutex_timedlock() and cleanup mutex stuff.
39 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
41 and afer locking the mutex using
52 /* Lock the mutex before creating the thread. */
53 if (pthread_mutex_lock(&mutex) != 0) {
71 if (pthread_mutex_unlock(&mutex) != 0) {
76 if (pthread_mutex_destroy(&mutex) != 0)
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/
1-1.c 9 * is equivalent to pthread_mutex_lock() except that if the mutex object
10 * referenced by 'mutex' is currently locked (by any thread, including the
14 * -- Initilize a mutex object
15 * -- Create a secondary thread and have it lock the mutex
16 * -- Within the main thread, try to lock the mutex using
18 * -- Have the secondary thread unlock the mutex
19 * -- Within the main thread, try to lock the mutex again
32 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
41 /* Create a secondary thread and wait until it has locked the mutex */
46 /* Trylock the mutex and expect it returns EBUSY *
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/
1-2.c 16 * 1. Setup a mutex and lock it in main()
20 * 5. Make the thread block on the locked mutex
21 * 6. Send out a thread cancel request to the new thread, and unlock the mutex allowing the
43 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable
64 /* Lock the mutex. It should have already been locked in main, so the thread
66 if (pthread_mutex_lock(&mutex) != 0) {
94 /* Lock the mutex */
95 if (pthread_mutex_lock(&mutex) != 0) {
117 /* Cancel request has been sent, unlock the mutex */
    [all...]
2-1.c 12 * 1. Setup a mutex and lock it in main()
16 * 4. Make the thread block on the locked mutex
17 * 5. Send out a thread cancel request to the new thread, and unlock the mutex allowing the
39 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable
59 /* Lock the mutex. It should have already been locked in main, so the thread
61 if (pthread_mutex_lock(&mutex) != 0) {
89 /* Lock the mutex */
90 if (pthread_mutex_lock(&mutex) != 0) {
112 /* Cancel request has been sent, unlock the mutex */
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/
1-1.c 16 * 1. Setup a mutex and lock it in main()
20 * 5. Make the thread block on the locked mutex
21 * 6. Send out a thread cancel request to the new thread, and unlock the mutex allowing the
43 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable
64 /* Lock the mutex. It should have already been locked in main, so the thread
66 if (pthread_mutex_lock(&mutex) != 0) {
94 /* Lock the mutex */
95 if (pthread_mutex_lock(&mutex) != 0) {
117 /* Cancel request has been sent, unlock the mutex */
    [all...]
  /external/valgrind/drd/tests/
bug-235681.c 13 pthread_mutex_t mutex; variable
25 rc = pthread_mutex_lock(&mutex);
31 rc = pthread_cond_wait(&cond_var, &mutex);
39 rc = pthread_mutex_unlock(&mutex);
56 rc = pthread_mutex_init(&mutex, NULL);
71 rc = pthread_mutex_lock(&mutex);
82 rc = pthread_mutex_unlock(&mutex);

Completed in 496 milliseconds

1 2 34 5 6 7 8 91011>>