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

12 3 4 5 6 7 8 91011>>

  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/
1-1.c 5 * the mutex with PTHREAD_PRIO_PROTECT.
32 pthread_mutex_t mutex; local
53 /* Initialize a mutex object */
54 error = pthread_mutex_init(&mutex, &mutex_attr);
60 /* Get the prioceiling of the mutex. */
61 error = pthread_mutex_getprioceiling(&mutex, &prioceiling);
69 (void)pthread_mutex_destroy(&mutex);
3-2.c 7 * The protocol attribute of mutex is PTHREAD_PRIO_NONE.
36 pthread_mutex_t mutex; local
56 /* Initialize a mutex object */
57 error = pthread_mutex_init(&mutex, &mutex_attr);
63 /* Get the prioceiling of the mutex. */
64 error = pthread_mutex_getprioceiling(&mutex, &prioceiling);
77 (void)pthread_mutex_destroy(&mutex);
3-3.c 7 * The protocol attribute of mutex is PTHREAD_PRIO_NONE.
37 pthread_mutex_t mutex; local
58 /* Initialize a mutex object */
59 error = pthread_mutex_init(&mutex, &mutex_attr);
65 /* Get the prioceiling of the mutex. */
66 error = pthread_mutex_getprioceiling(&mutex, &prioceiling);
79 (void)pthread_mutex_destroy(&mutex);
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_setprioceiling/
1-1.c 6 * returns the current prioceiling of the mutex.
32 pthread_mutex_t mutex; local
53 /* Initialize a mutex object */
54 error = pthread_mutex_init(&mutex, &mutex_attr);
60 /* Get the prioceiling of the mutex. */
61 error = pthread_mutex_getprioceiling(&mutex, &prioceiling);
69 (void)pthread_mutex_destroy(&mutex);
  /system/bt/service/common/bluetooth/util/
atomic_string.cc 24 std::mutex* mutex = const_cast<std::mutex*>(&lock_); local
25 std::lock_guard<std::mutex> lock(*mutex);
30 std::lock_guard<std::mutex> lock(lock_);
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/
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 next
    [all...]
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/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/compiler-rt/test/tsan/
signal_cond.cc 12 pthread_mutex_t mutex; variable
22 pthread_mutex_lock(&mutex);
24 pthread_cond_wait(&cond, &mutex);
25 pthread_mutex_unlock(&mutex);
32 pthread_mutex_init(&mutex, 0);
43 pthread_mutex_lock(&mutex);
46 pthread_mutex_unlock(&mutex);
  /external/libcxx/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);
  /external/libcxx/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...]
  /external/libcxx/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);
  /external/libcxx/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...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/speculative/
4-2.c 9 * locked mutex, it fails and returns EBUSY
12 * 1. Create a mutex
13 * 2. Lock the mutex
14 * 3. Try to destroy the mutex
31 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; local
34 /* Lock the mutex */
35 rc = pthread_mutex_lock(&mutex);
41 /* Try to destroy the locked mutex */
42 rc = pthread_mutex_destroy(&mutex);
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/
3-1.c 19 pthread_mutex_t mutex; /* Protects access to value */ member in struct:my_data
20 int value; /* Access protected by mutex */
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/
2-1.c 12 * This type of mutex doesn't detect deadlock. So a thread attempting to relock this mutex
13 * without unlocking it first will not return an error. Attempting to unlock a mutex locked
14 * by a different thread results in undefined behavior. Attemping to unlock an unlocked mutex
20 * 3. Create a mutex with that mutexattr object.
21 * 4. Lock the mutex, then relock it. Expect dead lock. Timer will be use
44 pthread_mutex_t mutex; local
48 /* Initialize a mutex attributes object */
60 /* Initialize the mutex with that attribute obj. */
61 if (pthread_mutex_init(&mutex, &mta) != 0)
    [all...]
3-2.c 12 * Provides errorchecking. A thread attempting to relock this mutex without unlocking it
13 * first will return with an error. A thread attempting to unlock a mutex which another
15 * mutex will return with an error.
20 * 3. Create a mutex with that mutexattr object.
21 * 4. Lock the mutex.
22 * 5. Create a thread, and in that thread, attempt to unlock the mutex. It should return an
35 pthread_mutex_t mutex; variable
38 int ret; /* Return value of the thread unlocking the mutex. */
42 /* Try to unlock the mutex that main already locked. */
43 ret = pthread_mutex_unlock(&mutex);
    [all...]
  /external/python/cpython2/Lib/
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...]

Completed in 659 milliseconds

12 3 4 5 6 7 8 91011>>