Searched defs:mutex (Results 1 - 25 of 236) sorted by relevance

12345678910

/external/valgrind/main/memcheck/tests/darwin/
H A Dpth-supp.c6 pthread_rwlock_t mutex; local
7 pthread_rwlock_init(&mutex, NULL);
/external/chromium_org/v8/test/cctest/
H A Dtest-lock.cc43 Mutex* mutex = OS::CreateMutex(); local
44 CHECK_EQ(0, mutex->Lock()); // acquire the lock with the right token
45 CHECK_EQ(0, mutex->Unlock()); // can unlock with the right token
46 delete mutex;
51 Mutex* mutex = OS::CreateMutex(); local
52 CHECK_EQ(0, mutex->Lock());
53 CHECK_EQ(0, mutex->Unlock());
54 delete mutex;
59 Mutex* mutex = OS::CreateMutex(); local
60 CHECK_EQ(0, mutex
[all...]
/external/v8/test/cctest/
H A Dtest-lock.cc18 Mutex* mutex = OS::CreateMutex(); local
19 CHECK_EQ(0, mutex->Lock()); // acquire the lock with the right token
20 CHECK_EQ(0, mutex->Unlock()); // can unlock with the right token
21 delete mutex;
26 Mutex* mutex = OS::CreateMutex(); local
27 CHECK_EQ(0, mutex->Lock());
28 CHECK_EQ(0, mutex->Unlock());
29 delete mutex;
34 Mutex* mutex = OS::CreateMutex(); local
35 CHECK_EQ(0, mutex
[all...]
/external/valgrind/main/drd/tests/
H A Dpth_process_shared_mutex.c2 * Test program that locks and unlocks a process-shared mutex.
15 pthread_mutex_t mutex; local
20 pthread_mutex_init(&mutex, &attr);
23 pthread_mutex_lock(&mutex);
24 pthread_mutex_unlock(&mutex);
25 pthread_mutex_destroy(&mutex);
/external/valgrind/main/helgrind/tests/
H A Dcond_timedwait_invalid.c10 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; local
21 assert(pthread_mutex_lock(&mutex)==0);
22 assert(pthread_cond_timedwait(&cond, &mutex, &abstime)==EINVAL);
23 assert(pthread_mutex_unlock(&mutex)==0);
H A Dpth_destroy_cond.c8 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);
/external/chromium_org/native_client_sdk/src/libraries/third_party/pthreads-win32/
H A Dpthread_mutex_destroy.c5 * This translation unit implements mutual exclusion (mutex) primitives.
42 pthread_mutex_destroy (pthread_mutex_t * mutex) argument
54 if (*mutex < PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
56 mx = *mutex;
61 * If trylock succeeded and the mutex is not recursively locked it
70 * The mutex isn't held by another thread but we could still
71 * be too late invalidating the mutex below since another thread
73 * *mutex != NULL.
75 *mutex = NULL;
87 *mutex
[all...]
H A Dpthread_mutex_init.c5 * This translation unit implements mutual exclusion (mutex) primitives.
42 pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr) argument
47 if (mutex == NULL)
57 * Creating mutex that can be shared between
127 *mutex = mx;
H A Dpthread_mutex_lock.c5 * This translation unit implements mutual exclusion (mutex) primitives.
44 pthread_mutex_lock (pthread_mutex_t * mutex) argument
53 if (*mutex == NULL)
60 * to initialise a static mutex. We check
64 if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
66 if ((result = ptw32_mutex_check_need_init (mutex)) != 0)
72 mx = *mutex;
148 * The mutex is added to a per thread list when ownership is acquired.
170 while (0 == (result = ptw32_robust_mutex_inherit(mutex))
195 * Add mutex t
[all...]
H A Dpthread_mutex_trylock.c5 * This translation unit implements mutual exclusion (mutex) primitives.
42 pthread_mutex_trylock (pthread_mutex_t * mutex) argument
54 * to initialise a static mutex. We check
58 if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
60 if ((result = ptw32_mutex_check_need_init (mutex)) != 0)
66 mx = *mutex;
101 * The mutex is added to a per thread list when ownership is acquired.
126 ptw32_robust_mutex_add(mutex, self);
137 if (EOWNERDEAD == (result = ptw32_robust_mutex_inherit(mutex)))
140 ptw32_robust_mutex_add(mutex, sel
[all...]
H A Dpthread_mutex_unlock.c5 * This translation unit implements mutual exclusion (mutex) primitives.
42 pthread_mutex_unlock (pthread_mutex_t * mutex) argument
52 mx = *mutex;
55 * If the thread calling us holds the mutex then there is no
76 * Someone may be waiting on that mutex.
97 /* Someone may be waiting on that mutex */
118 * The thread must own the lock regardless of type if the mutex
128 ptw32_robust_mutex_remove(mutex, NULL);
134 * Someone may be waiting on that mutex.
147 ptw32_robust_mutex_remove(mutex, NUL
[all...]
H A Dptw32_mutex_check_need_init.c5 * This translation unit implements mutual exclusion (mutex) primitives.
49 ptw32_mutex_check_need_init (pthread_mutex_t * mutex) argument
60 * and only initialise if the mutex is valid (not been destroyed).
61 * If a static mutex has been destroyed, the application can
65 mtx = *mutex;
69 result = pthread_mutex_init (mutex, NULL);
73 result = pthread_mutex_init (mutex, &ptw32_recursive_mutexattr);
77 result = pthread_mutex_init (mutex, &ptw32_errorcheck_mutexattr);
82 * The mutex has been destroyed while we were waiting to
/external/qemu/distrib/sdl-1.2.15/src/thread/pth/
H A DSDL_sysmutex.c35 /* Create a mutex */
38 SDL_mutex *mutex; local
40 /* Allocate mutex memory */
41 mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex));
42 if ( mutex ) {
43 /* Create the mutex, with initial value signaled */
44 if (!pth_mutex_init(&(mutex->mutexpth_p))) {
45 SDL_SetError("Couldn't create mutex");
46 SDL_free(mutex);
56 SDL_DestroyMutex(SDL_mutex *mutex) argument
64 SDL_mutexP(SDL_mutex *mutex) argument
77 SDL_mutexV(SDL_mutex *mutex) argument
[all...]
/external/bluetooth/bluedroid/btif/include/
H A Dbtif_sock_util.h37 static inline void init_slot_lock( pthread_mutex_t* mutex) argument
42 pthread_mutex_init(mutex, &attr);
45 static inline void lock_slot(pthread_mutex_t* mutex) argument
47 if(mutex->value)
48 pthread_mutex_lock(mutex);
49 else ALOGE("mutex: %p is not initialized", mutex);
52 static inline void unlock_slot(pthread_mutex_t* mutex) argument
54 if(mutex->value)
55 pthread_mutex_unlock(mutex);
[all...]
/external/chromium_org/third_party/libusb/src/libusb/os/
H A Dthreads_posix.c33 int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) argument
49 err = pthread_mutex_init(mutex, attr);
/external/chromium_org/third_party/skia/include/core/
H A DSkThread.h36 explicit SkAutoMutexAcquire(SkBaseMutex& mutex) : fMutex(&mutex) { argument
38 mutex.acquire();
41 SkAutoMutexAcquire(SkBaseMutex* mutex) : fMutex(mutex) { argument
42 if (mutex) {
43 mutex->acquire();
47 /** If the mutex has not been release, release it now.
55 /** If the mutex has not been release, release it now.
/external/qemu/audio/
H A Daudio_pt_int.h10 pthread_mutex_t mutex; member in struct:audio_pt
/external/skia/include/core/
H A DSkThread.h36 explicit SkAutoMutexAcquire(SkBaseMutex& mutex) : fMutex(&mutex) { argument
38 mutex.acquire();
41 SkAutoMutexAcquire(SkBaseMutex* mutex) : fMutex(mutex) { argument
42 if (mutex) {
43 mutex->acquire();
47 /** If the mutex has not been release, release it now.
55 /** If the mutex has not been release, release it now.
/external/chromium_org/native_client_sdk/src/libraries/sdk_util/
H A Dsimple_lock.h16 * A pthread mutex object, with automatic initialization and destruction.
29 pthread_mutex_t* mutex() const { return &lock_; } function in class:sdk_util::SimpleLock
/external/chromium_org/third_party/icu/source/common/
H A Dmutex.cpp8 * file name: mutex.cpp
15 #include "mutex.h"
32 Mutex mutex; local
58 Mutex mutex; local
/external/icu4c/common/
H A Dmutex.cpp8 * file name: mutex.cpp
15 #include "mutex.h"
41 Mutex mutex; local
102 Mutex mutex; local
/external/qemu/distrib/sdl-1.2.15/src/thread/dc/
H A DSDL_sysmutex.c34 spinlock_t mutex; member in struct:SDL_mutex
37 /* Create a mutex */
40 SDL_mutex *mutex; local
42 /* Allocate mutex memory */
43 mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex));
44 if ( mutex ) {
45 spinlock_init(&mutex->mutex);
46 mutex
55 SDL_DestroyMutex(SDL_mutex *mutex) argument
63 SDL_mutexP(SDL_mutex *mutex) argument
93 SDL_mutexV(SDL_mutex *mutex) argument
[all...]
/external/qemu/distrib/sdl-1.2.15/src/thread/generic/
H A DSDL_sysmutex.c36 /* Create a mutex */
39 SDL_mutex *mutex; local
41 /* Allocate mutex memory */
42 mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex));
43 if ( mutex ) {
44 /* Create the mutex semaphore, with initial value 1 */
45 mutex->sem = SDL_CreateSemaphore(1);
46 mutex->recursive = 0;
47 mutex
59 SDL_DestroyMutex(SDL_mutex *mutex) argument
70 SDL_mutexP(SDL_mutex *mutex) argument
100 SDL_mutexV(SDL_mutex *mutex) argument
[all...]
/external/qemu/distrib/sdl-1.2.15/src/thread/os2/
H A DSDL_sysmutex.c37 /* Create a mutex */
40 SDL_mutex *mutex; local
43 /* Allocate mutex memory */
44 mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex));
45 if (mutex)
47 /* Create the mutex, with initial value signaled */
49 &(mutex->hmtxID), // Pointer to handle
54 SDL_SetError("Couldn't create mutex");
55 SDL_free(mutex);
65 SDL_DestroyMutex(SDL_mutex *mutex) argument
79 SDL_mutexP(SDL_mutex *mutex) argument
95 SDL_mutexV(SDL_mutex *mutex) argument
[all...]
/external/qemu/distrib/sdl-1.2.15/src/thread/win32/
H A DSDL_sysmutex.c36 /* Create a mutex */
39 SDL_mutex *mutex; local
41 /* Allocate mutex memory */
42 mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex));
43 if ( mutex ) {
44 /* Create the mutex, with initial value signaled */
45 mutex->id = CreateMutex(NULL, FALSE, NULL);
46 if ( ! mutex->id ) {
47 SDL_SetError("Couldn't create mutex");
58 SDL_DestroyMutex(SDL_mutex *mutex) argument
70 SDL_mutexP(SDL_mutex *mutex) argument
84 SDL_mutexV(SDL_mutex *mutex) argument
[all...]

Completed in 606 milliseconds

12345678910