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

1 23 4 5 6 7 8 91011>>

  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/
4-1.c 26 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
34 rc = pthread_mutex_lock(&mutex);
40 rc = pthread_cond_wait(&cond, &mutex);
46 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
39 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
41 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.
34 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
36 and afer locking the mutex using
82 /* This should not block since the mutex is not owned by anyone right now.
84 ret = pthread_mutex_timedlock(&mutex, &timeout);
87 if (pthread_mutex_unlock(&mutex) != 0) {
92 if (pthread_mutex_destroy(&mutex) != 0) {
5-1.c 42 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
44 and afer locking the mutex using
88 /* Lock the mutex */
89 if (pthread_mutex_lock(&mutex) != 0) {
100 ret = pthread_mutex_timedlock(&mutex, &timeout);
103 if (pthread_mutex_unlock(&mutex) != 0) {
108 if (pthread_mutex_destroy(&mutex) != 0) {
5-2.c 42 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
44 and afer locking the mutex using
88 /* Lock the mutex */
89 if (pthread_mutex_lock(&mutex) != 0) {
100 ret = pthread_mutex_timedlock(&mutex, &timeout);
103 if (pthread_mutex_unlock(&mutex) != 0) {
108 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.
38 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable
40 and afer locking the mutex using
51 /* Lock the mutex before creating the thread. */
52 if (pthread_mutex_lock(&mutex) != 0) {
70 if (pthread_mutex_unlock(&mutex) != 0) {
75 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/swiftshader/src/Reactor/
MutexLock.hpp 21 // Use a pthread mutex on Linux. Since many processes may use Reactor
32 pthread_mutex_init(&mutex, NULL);
37 pthread_mutex_destroy(&mutex);
42 return pthread_mutex_trylock(&mutex) == 0;
47 pthread_mutex_lock(&mutex);
52 pthread_mutex_unlock(&mutex);
56 pthread_mutex_t mutex; member in class:rr::MutexLock
71 mutex = 0;
78 if(mutex.exchange(true) == false)
153 mutex.store(false, std::memory_order_release)
    [all...]
  /device/generic/goldfish/gralloc/
gr.h 46 pthread_mutex_t mutex; member in class:Locker
54 inline Locker() { pthread_mutex_init(&mutex, 0); }
55 inline ~Locker() { pthread_mutex_destroy(&mutex); }
56 inline void lock() { pthread_mutex_lock(&mutex); }
57 inline void unlock() { pthread_mutex_unlock(&mutex); }
  /device/google/marlin/camera/QCamera2/stack/common/
cam_semaphore.h 42 /* Implement semaphore with mutex and conditional variable.
49 pthread_mutex_t mutex; member in struct:__anon3124
55 pthread_mutex_init(&(s->mutex), NULL);
62 pthread_mutex_lock(&(s->mutex));
65 pthread_mutex_unlock(&(s->mutex));
71 pthread_mutex_lock(&(s->mutex));
73 rc = pthread_cond_wait(&(s->cond), &(s->mutex));
75 pthread_mutex_unlock(&(s->mutex));
82 pthread_mutex_lock(&(s->mutex));
84 rc = pthread_cond_timedwait(&(s->cond), &(s->mutex), abs_timeout)
    [all...]
  /external/brotli/java/org/brotli/wrapper/dec/
BrotliDecoderChannel.java 21 private final Object mutex = new Object(); field in class:BrotliDecoderChannel
40 synchronized (mutex) {
47 synchronized (mutex) {
54 synchronized (mutex) {
  /external/compiler-rt/test/lsan/TestCases/
guard-page.c 12 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
23 pthread_mutex_lock(&mutex);
26 pthread_mutex_unlock(&mutex);
53 pthread_mutex_lock(&mutex);
57 while (!ctxfunc_started) pthread_cond_wait(&cond, &mutex);
58 pthread_mutex_unlock(&mutex);
  /external/deqp-deps/glslang/StandAlone/
Worklist.h 40 #include <mutex>
62 std::lock_guard<std::mutex> guard(mutex);
68 std::lock_guard<std::mutex> guard(mutex);
89 std::mutex mutex; member in class:glslang::TWorklist
  /external/google-fruit/include/fruit/impl/injector/
injector_storage.h 27 #include <mutex>
136 // This mutex is used to synchronize concurrent accesses to this InjectorStorage object.
137 std::recursive_mutex mutex; member in class:fruit::impl::InjectorStorage
  /external/jemalloc_new/include/jemalloc/internal/
mutex_pool.h 5 #include "jemalloc/internal/mutex.h"
34 * Note that a mutex pool doesn't work exactly the way an embdedded mutex would.
44 malloc_mutex_t *mutex = mutex_pool_mutex(pool, key); local
45 malloc_mutex_lock(tsdn, mutex);
50 malloc_mutex_t *mutex = mutex_pool_mutex(pool, key); local
51 malloc_mutex_unlock(tsdn, mutex);
  /external/libvpx/libvpx/vp9/common/
vp9_thread_common.h 27 pthread_mutex_t *mutex; member in struct:VP9LfSyncData
55 // Deallocate loopfilter synchronization related mutex and data.
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/
2-1.c 40 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
59 pthread_mutex_lock(&mutex);
61 pthread_mutex_unlock(&mutex);
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/
1-1.c 23 pthread_mutex_t mutex; member in struct:testdata
35 if (pthread_mutex_lock(&td.mutex) != 0) {
36 fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
41 fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
46 rc = pthread_cond_wait(&td.cond, &td.mutex);
52 fprintf(stderr, "[Thread 0x%p] was wakened and acquired the mutex "
55 if (pthread_mutex_unlock(&td.mutex) != 0) {
56 fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
60 fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
69 if (pthread_mutex_init(&td.mutex, NULL) != 0)
    [all...]
2-1.c 11 * own the mutex with which it called pthread_cond_wait().
24 pthread_mutex_t mutex; member in struct:testdata
36 if (pthread_mutex_lock(&td.mutex) != 0) {
37 fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
41 fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
47 rc = pthread_cond_wait(&td.cond, &td.mutex);
53 if (pthread_mutex_trylock(&td.mutex) == 0) {
55 "mutex again\n", (void *)self);
60 "mutex again\n", (void *)self);
63 if (pthread_mutex_unlock(&td.mutex) != 0)
    [all...]
2-2.c 11 * own the mutex with which it called pthread_cond_timedwait().
27 pthread_mutex_t mutex; member in struct:testdata
41 if (pthread_mutex_lock(&td.mutex) != 0) {
42 fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
46 fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
59 rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
66 if (pthread_mutex_trylock(&td.mutex) == 0) {
68 "mutex again\n", (void *)self);
73 "mutex again\n", (void *)self);
76 if (pthread_mutex_unlock(&td.mutex) != 0)
    [all...]
4-1.c 23 pthread_mutex_t mutex; member in struct:testdata
35 if (pthread_mutex_lock(&td.mutex) != 0) {
36 fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
40 fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
46 rc = pthread_cond_wait(&td.cond, &td.mutex);
54 if (pthread_mutex_unlock(&td.mutex) != 0) {
55 fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
67 if (pthread_mutex_init(&td.mutex, NULL) != 0) {
68 fprintf(stderr, "Fail to initialize mutex\n");
85 /* Acquire the mutex to make sure that all waiters are currentl
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/
1-1.c 24 pthread_mutex_t mutex; member in struct:testdata
50 if (pthread_mutex_lock(&td.mutex) != 0) {
51 fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
56 fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
61 rc = pthread_cond_wait(&td.cond, &td.mutex);
68 "[Thread 0x%p] was wakened and acquired the mutex again\n",
71 if (pthread_mutex_unlock(&td.mutex) != 0) {
72 fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
76 fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
85 if (pthread_mutex_init(&td.mutex, NULL) != 0)
    [all...]

Completed in 2190 milliseconds

1 23 4 5 6 7 8 91011>>