/external/valgrind/main/memcheck/tests/darwin/ |
H A D | pth-supp.c | 6 pthread_rwlock_t mutex; local 7 pthread_rwlock_init(&mutex, NULL);
|
/external/v8/test/cctest/ |
H A D | test-lock.cc | 18 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 D | pth_process_shared_mutex.c | 2 * 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);
|
H A D | 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, [all...] |
H A D | 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);
|
H A D | hold_lock.c | 28 pthread_mutex_t mutex; local 45 fprintf(stderr, "Locking mutex ...\n"); 49 pthread_mutex_init(&mutex, &mutexattr); 51 pthread_mutex_lock(&mutex); 53 pthread_mutex_lock(&mutex); 54 pthread_mutex_unlock(&mutex); 55 pthread_mutex_unlock(&mutex); 56 pthread_mutex_destroy(&mutex);
|
/external/qemu/distrib/sdl-1.2.12/src/thread/pth/ |
H A D | SDL_sysmutex.c | 35 /* 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...] |
H A D | SDL_syscond.c | 103 The mutex must be locked before entering this function! 104 The mutex is unlocked during the wait, and locked again after the wait. 122 int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) argument 138 if ( pth_cond_await(&(cond->condpth_p), &(mutex->mutexpth_p), ev) != 0 ) { 149 int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) argument 159 if ( pth_cond_await(&(cond->condpth_p), &(mutex->mutexpth_p), NULL) != 0 ) {
|
/external/qemu/audio/ |
H A D | audio_pt_int.h | 10 pthread_mutex_t mutex; member in struct:audio_pt
|
/external/skia/include/core/ |
H A D | SkThread.h | 41 explicit SkAutoMutexAcquire(SkMutex& mutex) : fMutex(&mutex) argument 44 mutex.acquire(); 46 /** If the mutex has not been release, release it now. 53 /** If the mutex has not been release, release it now.
|
/external/icu4c/common/ |
H A D | mutex.cpp | 8 * file name: mutex.cpp 15 #include "mutex.h" 32 Mutex mutex; local 58 Mutex mutex; local
|
/external/qemu/distrib/sdl-1.2.12/src/thread/dc/ |
H A D | SDL_sysmutex.c | 34 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...] |
H A D | SDL_syscond.c | 138 The mutex must be locked before entering this function! 139 The mutex is unlocked during the wait, and locked again after the wait. 157 int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) argument 166 /* Obtain the protection mutex, and increment the number of waiters. 174 /* Unlock the mutex, as is required by condition variable semantics */ 175 SDL_UnlockMutex(mutex); 186 if we are stopped between the mutex unlock and semaphore wait, 205 /* Lock the mutex, as is required by condition variable semantics */ 206 SDL_LockMutex(mutex); 212 int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) argument [all...] |
/external/qemu/distrib/sdl-1.2.12/src/thread/generic/ |
H A D | SDL_sysmutex.c | 36 /* 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...] |
H A D | SDL_syscond.c | 138 The mutex must be locked before entering this function! 139 The mutex is unlocked during the wait, and locked again after the wait. 157 int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) argument 166 /* Obtain the protection mutex, and increment the number of waiters. 174 /* Unlock the mutex, as is required by condition variable semantics */ 175 SDL_UnlockMutex(mutex); 186 if we are stopped between the mutex unlock and semaphore wait, 205 /* Lock the mutex, as is required by condition variable semantics */ 206 SDL_LockMutex(mutex); 212 int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) argument [all...] |
/external/qemu/distrib/sdl-1.2.12/src/thread/os2/ |
H A D | SDL_sysmutex.c | 37 /* 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.12/src/thread/win32/ |
H A D | SDL_sysmutex.c | 36 /* 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...] |
/external/qemu/distrib/sdl-1.2.12/src/thread/epoc/ |
H A D | SDL_sysmutex.cpp | 52 /* Create a mutex */ 60 SDL_SetError("Couldn't create mutex"); 62 SDL_mutex* mutex = new /*(ELeave)*/ SDL_mutex; local 63 mutex->handle = rmutex.Handle(); 64 return(mutex); 67 /* Free the mutex */ 68 void SDL_DestroyMutex(SDL_mutex *mutex) argument 70 if ( mutex ) 73 rmutex.SetHandle(mutex->handle); 76 delete(mutex); 82 SDL_mutexP(SDL_mutex *mutex) argument 95 SDL_mutexV(SDL_mutex *mutex) argument [all...] |
/external/qemu/distrib/sdl-1.2.12/src/thread/pthread/ |
H A D | SDL_syscond.c | 98 int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) argument 119 retval = pthread_cond_timedwait(&cond->cond, &mutex->id, &abstime); 137 /* Wait on the condition variable, unlocking the provided mutex. 138 The mutex must be locked before entering this function! 140 int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) argument 150 if ( pthread_cond_wait(&cond->cond, &mutex->id) != 0 ) {
|
H A D | SDL_sysmutex.c | 43 SDL_mutex *mutex; local 47 mutex = (SDL_mutex *)SDL_calloc(1, sizeof(*mutex)); 48 if ( mutex ) { 57 if ( pthread_mutex_init(&mutex->id, &attr) != 0 ) { 59 SDL_free(mutex); 60 mutex = NULL; 65 return(mutex); 68 void SDL_DestroyMutex(SDL_mutex *mutex) argument 70 if ( mutex ) { 77 SDL_mutexP(SDL_mutex *mutex) argument 116 SDL_mutexV(SDL_mutex *mutex) argument [all...] |
/external/qemu/distrib/sdl-1.2.12/src/thread/riscos/ |
H A D | SDL_syscond.c | 102 int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) argument 123 retval = pthread_cond_timedwait(&cond->cond, &mutex->id, &abstime); 141 /* Wait on the condition variable, unlocking the provided mutex. 142 The mutex must be locked before entering this function! 144 int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) argument 154 if ( pthread_cond_wait(&cond->cond, &mutex->id) != 0 ) {
|
H A D | SDL_sysmutex.c | 44 SDL_mutex *mutex; local 48 mutex = (SDL_mutex *)SDL_calloc(1, sizeof(*mutex)); 49 if ( mutex ) { 56 if ( pthread_mutex_init(&mutex->id, &attr) != 0 ) { 58 SDL_free(mutex); 59 mutex = NULL; 64 return(mutex); 67 void SDL_DestroyMutex(SDL_mutex *mutex) argument 69 if ( mutex ) { 76 SDL_mutexP(SDL_mutex *mutex) argument 115 SDL_mutexV(SDL_mutex *mutex) argument [all...] |
/external/valgrind/main/drd/ |
H A D | drd_qtcore_intercepts.c | 64 /** Convert a Qt4 mutex type to a DRD mutex type. */ 77 /** Find out the type of a Qt4 mutex (recursive or not). 79 * mutex_type_unknown and let drd_mutex.c look up the real mutex type. 89 void* mutex, 97 mutex, qt_to_drd_mutex_type(mode), 0, 0, 0); 98 CALL_FN_W_WW(ret, fn, mutex, mode); 100 mutex, 0, 0, 0, 0); 105 void* mutex, 113 mutex, qt_to_drd_mutex_typ 88 QT4CORE_FUNC(void, _ZN6QMutexC1ENS_13RecursionModeE, void* mutex, qt_mutex_mode mode) argument 104 QT4CORE_FUNC(void, _ZN6QMutexC2ENS_13RecursionModeE, void* mutex, qt_mutex_mode mode) argument 120 QT4CORE_FUNC(void, _ZN6QMutexD1Ev, void* mutex) argument 135 QT4CORE_FUNC(void, _ZN6QMutexD2Ev, void** mutex) argument 150 QT4CORE_FUNC(void, _ZN6QMutex4lockEv, void* mutex) argument 165 QT4CORE_FUNC(int, _ZN6QMutex7tryLockEv, void* mutex) argument 181 QT4CORE_FUNC(int, _ZN6QMutex7tryLockEi, void* mutex, int timeout_ms) argument 198 QT4CORE_FUNC(void, _ZN6QMutex6unlockEv, void* mutex) argument [all...] |
/external/webrtc/src/system_wrappers/source/ |
H A D | event_linux.h | 53 pthread_mutex_t mutex; member in class:webrtc::EventLinux
|
/external/protobuf/gtest/test/ |
H A D | gtest-port_test.cc | 87 pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data); local 88 pthread_mutex_lock(mutex); 89 pthread_mutex_unlock(mutex); 95 pthread_mutex_t mutex; local 99 // TODO(vladl@google.com): turn mutex into internal::Mutex for automatic 101 pthread_mutex_init(&mutex, NULL); 102 pthread_mutex_lock(&mutex); 106 const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex); 110 pthread_mutex_unlock(&mutex); 128 pthread_mutex_destroy(&mutex); [all...] |