HomeSort by relevance Sort by last modified time
    Searched defs:mutex (Results 51 - 75 of 511) sorted by null

1 23 4 5 6 7 8 91011>>

  /external/python/cpython2/Lib/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")
  /external/valgrind/drd/tests/
trylock.c 22 pthread_mutex_t mutex; local
63 r = pthread_mutex_init(&mutex, NULL); assert(r == 0);
64 fprintf(stderr, "Locking mutex via pthread_mutex_trylock().\n");
65 r = pthread_mutex_trylock(&mutex); assert(r == 0);
66 r = pthread_mutex_unlock(&mutex); assert(r == 0);
67 fprintf(stderr, "Locking mutex via pthread_mutex_lock().\n");
68 r = pthread_mutex_lock(&mutex); assert(r == 0);
69 r = pthread_mutex_unlock(&mutex); assert(r == 0);
70 fprintf(stderr, "Locking mutex via pthread_mutex_timedlock().\n");
72 r = pthread_mutex_timedlock(&mutex, &abs_timeout); assert(r == 0)
    [all...]
  /external/valgrind/helgrind/tests/
pth_destroy_cond.c 8 pthread_mutex_t mutex; variable
15 pthread_mutex_lock(&mutex);
19 pthread_mutex_unlock(&mutex);
25 pthread_mutex_init(&mutex, NULL);
28 pthread_mutex_lock(&mutex);
31 pthread_cond_wait(&cond, &mutex);
33 pthread_mutex_unlock(&mutex);
36 pthread_mutex_destroy(&mutex);
  /prebuilts/gdb/darwin-x86/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/gdb/darwin-x86/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/gdb/linux-x86/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/gdb/linux-x86/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/ndk/r16/sources/cxx-stl/llvm-libc++/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/
try_lock.pass.cpp 15 // template <class Mutex> class shared_lock;
26 struct mutex struct
36 mutex m;
40 std::shared_lock<mutex> lk(m, std::defer_lock);
try_lock_for.pass.cpp 15 // template <class Mutex> class shared_lock;
29 struct mutex struct
41 mutex m;
45 std::shared_lock<mutex> lk(m, std::defer_lock);
unlock.pass.cpp 15 // template <class Mutex> class shared_lock;
26 struct mutex struct
32 mutex m;
36 std::shared_lock<mutex> lk(m);
  /prebuilts/ndk/r16/sources/cxx-stl/llvm-libc++/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/
member_swap.pass.cpp 15 // template <class Mutex> class shared_lock;
22 struct mutex struct
28 mutex m;
32 std::shared_lock<mutex> lk1(m);
33 std::shared_lock<mutex> lk2;
35 assert(lk1.mutex() == nullptr);
37 assert(lk2.mutex() == &m);
nonmember_swap.pass.cpp 15 // template <class Mutex> class shared_lock;
17 // template <class Mutex>
18 // void swap(shared_lock<Mutex>& x, shared_lock<Mutex>& y) noexcept;
23 struct mutex struct
29 mutex m;
33 std::shared_lock<mutex> lk1(m);
34 std::shared_lock<mutex> lk2;
36 assert(lk1.mutex() == nullptr);
38 assert(lk2.mutex() == &m)
    [all...]
release.pass.cpp 15 // template <class Mutex> class shared_lock;
22 struct mutex struct
30 int mutex::lock_count = 0;
31 int mutex::unlock_count = 0;
33 mutex m;
37 std::shared_lock<mutex> lk(m);
38 assert(lk.mutex() == &m);
40 assert(mutex::lock_count == 1);
41 assert(mutex::unlock_count == 0);
43 assert(lk.mutex() == nullptr)
    [all...]
  /prebuilts/ndk/r16/sources/cxx-stl/llvm-libc++/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/
try_lock.pass.cpp 12 // <mutex>
14 // template <class Mutex> class unique_lock;
18 #include <mutex>
25 struct mutex struct
35 mutex m;
39 std::unique_lock<mutex> lk(m, std::defer_lock);
try_lock_for.pass.cpp 12 // <mutex>
14 // template <class Mutex> class unique_lock;
19 #include <mutex>
28 struct mutex struct
40 mutex m;
44 std::unique_lock<mutex> lk(m, std::defer_lock);
unlock.pass.cpp 12 // <mutex>
14 // template <class Mutex> class unique_lock;
18 #include <mutex>
25 struct mutex struct
31 mutex m;
35 std::unique_lock<mutex> lk(m);
  /prebuilts/ndk/r16/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/
conditional_lock_guard_test.cc 44 MockMutex mutex; local
45 ASSERT_EQ(mutex.getLockCount(), 0);
48 ConditionalLockGuard<MockMutex> lock(mutex, true);
49 EXPECT_EQ(mutex.getLockCount(), 1);
52 EXPECT_EQ(mutex.getLockCount(), 0);
56 MockMutex mutex; local
57 ASSERT_EQ(mutex.getLockCount(), 0);
60 ConditionalLockGuard<MockMutex> lock(mutex, false);
61 EXPECT_EQ(mutex.getLockCount(), 0);
64 EXPECT_EQ(mutex.getLockCount(), 0)
    [all...]
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);

Completed in 298 milliseconds

1 23 4 5 6 7 8 91011>>