/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...] |
/external/valgrind/main/helgrind/tests/ |
H A D | cond_timedwait_invalid.c | 10 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 D | 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);
|
/external/qemu/distrib/sdl-1.2.15/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/bluetooth/bluedroid/btif/include/ |
H A D | btif_sock_util.h | 37 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/libusb_aah/libusb/os/ |
H A D | threads_posix.c | 33 int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) argument 48 err = pthread_mutex_init(mutex, attr);
|
/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 | 36 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/skia/legacy/include/core/ |
H A D | SkThread.h | 34 explicit SkAutoMutexAcquire(SkBaseMutex& mutex) : fMutex(&mutex) argument 37 mutex.acquire(); 39 /** If the mutex has not been release, release it now. 46 /** 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" 41 Mutex mutex; local 102 Mutex mutex; local
|
/external/qemu/distrib/sdl-1.2.15/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...] |
/external/qemu/distrib/sdl-1.2.15/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...] |
/external/qemu/distrib/sdl-1.2.15/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.15/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/libnfc-nci/halimpl/bcm2079x/adaptation/ |
H A D | CondVar.cpp | 78 void CondVar::wait (Mutex& mutex) argument 80 int const res = pthread_cond_wait (&mCondition, mutex.nativeHandle()); 98 bool CondVar::wait (Mutex& mutex, long millisec) argument 124 int waitResult = pthread_cond_timedwait_monotonic_np (&mCondition, mutex.nativeHandle(), &absoluteTime);
|
/external/qemu/distrib/sdl-1.2.15/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.15/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/qemu/distrib/sdl-1.2.15/src/thread/symbian/ |
H A D | SDL_sysmutex.cpp | 72 /* Create a mutex */ 80 SDL_SetError("Couldn't create mutex"); 82 SDL_mutex* mutex = new /*(ELeave)*/ SDL_mutex; local 83 mutex->handle = rmutex.Handle(); 84 EpocSdlEnv::AppendCleanupItem(TSdlCleanupItem(DeleteMutex, mutex)); 85 return(mutex); 88 /* Free the mutex */ 89 void SDL_DestroyMutex(SDL_mutex *mutex) argument 91 if ( mutex ) 94 rmutex.SetHandle(mutex 107 SDL_mutexP(SDL_mutex *mutex) argument 120 SDL_mutexV(SDL_mutex *mutex) argument [all...] |
/external/valgrind/main/drd/ |
H A D | drd_qtcore_intercepts.c | 62 /** Convert a Qt4 mutex type to a DRD mutex type. */ 75 /** Find out the type of a Qt4 mutex (recursive or not). 77 * mutex_type_unknown and let drd_mutex.c look up the real mutex type. 87 void* mutex, 94 mutex, qt_to_drd_mutex_type(mode), 0, 0, 0); 95 CALL_FN_W_WW(ret, fn, mutex, mode); 97 mutex, 0, 0, 0, 0); 102 void* mutex, 109 mutex, qt_to_drd_mutex_typ 86 QT4CORE_FUNC(void, _ZN6QMutexC1ENS_13RecursionModeE, void* mutex, qt_mutex_mode mode) argument 101 QT4CORE_FUNC(void, _ZN6QMutexC2ENS_13RecursionModeE, void* mutex, qt_mutex_mode mode) argument 116 QT4CORE_FUNC(void, _ZN6QMutexD1Ev, void* mutex) argument 130 QT4CORE_FUNC(void, _ZN6QMutexD2Ev, void** mutex) argument 144 QT4CORE_FUNC(void, _ZN6QMutex4lockEv, void* mutex) argument 158 QT4CORE_FUNC(int, _ZN6QMutex7tryLockEv, void* mutex) argument 173 QT4CORE_FUNC(int, _ZN6QMutex7tryLockEi, void* mutex, int timeout_ms) argument 189 QT4CORE_FUNC(void, _ZN6QMutex6unlockEv, void* mutex) argument [all...] |