/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/ |
5-1.c | 43 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable 45 and afer locking the mutex using 89 /* Lock the mutex */ 90 if (pthread_mutex_lock(&mutex) != 0) { 101 ret = pthread_mutex_timedlock(&mutex, &timeout); 104 if (pthread_mutex_unlock(&mutex) != 0) { 109 if (pthread_mutex_destroy(&mutex) != 0) {
|
5-2.c | 43 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable 45 and afer locking the mutex using 89 /* Lock the mutex */ 90 if (pthread_mutex_lock(&mutex) != 0) { 101 ret = pthread_mutex_timedlock(&mutex, &timeout); 104 if (pthread_mutex_unlock(&mutex) != 0) { 109 if (pthread_mutex_destroy(&mutex) != 0) {
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/ |
2-1.c | 9 * If there are threads blocked on the mutex object referenced by 'mutex' when 10 * pthread_mutex_unlock() is called, resulting in the mutex becoming available, 11 * the scheduling policy shall determine which thread shall acquire the mutex. 18 * -- Initialize a mutex to protect a global variable 'value' 19 * -- Create N threads. Each is looped M times to acquire the mutex, 20 increase the value, and then release the mutex. 21 * -- Check if the value has increased properly (M*N); a broken mutex 38 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 39 int value; /* value protected by mutex */ [all...] |
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/ |
1-1.c | 16 * 1. Setup a mutex and lock it in main() 20 * 5. Make the thread block on the locked mutex 24 * 8. If not, main will wait for 10 seconds before it unlocks the mutex, and the thread 40 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable 61 /* Lock the mutex. It should have already been locked in main, so the thread 63 if (pthread_mutex_lock(&mutex) != 0) { 86 /* Lock the mutex */ 87 if (pthread_mutex_lock(&mutex) != 0) { 116 /* Unlock the mutex */ [all...] |
/external/mesa3d/src/gallium/drivers/llvmpipe/ |
lp_fence.h | 46 pipe_mutex mutex; member in struct:lp_fence
|
/external/parameter-framework/asio-1.10.6/include/asio/detail/ |
scoped_lock.hpp | 22 // Helper class to lock and unlock a mutex automatically. 23 template <typename Mutex> 32 scoped_lock(Mutex& m, adopt_lock_t) 39 explicit scoped_lock(Mutex& m) 79 // Get the underlying mutex. 80 Mutex& mutex() function in class:asio::detail::scoped_lock 86 // The underlying mutex. 87 Mutex& mutex_; 89 // Whether the mutex is currently locked or unlocked [all...] |
/external/swiftshader/src/Common/ |
MutexLock.hpp | 21 /* Use an actual mutex on android. Since many processes may use switchshader 32 pthread_mutex_init(&mutex, NULL); 36 pthread_mutex_destroy(&mutex); 41 if (pthread_mutex_trylock(&mutex) == 0) 50 pthread_mutex_lock(&mutex); 55 pthread_mutex_unlock(&mutex); 61 // Ensure that the mutex variable is on its own 64-byte cache line to avoid false sharing 64 pthread_mutex_t mutex; member in struct:sw::BackoffLock::__anon30799 79 mutex = 0; 86 if(atomicExchange(&mutex, 1) == 0 [all...] |
/external/v8/src/base/platform/ |
condition-variable.h | 10 #include "src/base/platform/mutex.h" 28 // on a Mutex first. The |Wait()| and |WaitFor()| operations atomically release 29 // the mutex and suspend the execution of the calling thread. When the condition 30 // variable is notified, the thread is awakened, and the mutex is reacquired. 45 // notified or a spurious wakeup occurs. Atomically releases the mutex, blocks 49 // unblocked, regardless of the reason, the lock on the mutex is reacquired 51 void Wait(Mutex* mutex); 53 // Atomically releases the mutex, blocks the current executing thread, and 57 // spuriously. When unblocked, regardless of the reason, the lock on the mutex 75 Mutex* mutex() { return &mutex_; } function in class:v8::base::final::final [all...] |
/external/valgrind/drd/ |
drd_clientreq.c | 416 const Addr mutex = arg[2]; local 418 DRD_(mutex_unlock)(mutex, mutex_type); 419 DRD_(cond_pre_wait)(cond, mutex); 427 const Addr mutex = arg[2]; local 430 DRD_(mutex_post_lock)(mutex, took_lock, True);
|
/external/valgrind/drd/tests/ |
free_is_write.c | 17 // 'mutex' protects 'count'. 18 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 33 pthread_mutex_lock(&mutex); 36 pthread_mutex_unlock(&mutex); 56 pthread_mutex_lock(&mutex); 57 while (count < THREAD_COUNT && pthread_cond_wait(&cond, &mutex) == 0) 59 pthread_mutex_unlock(&mutex);
|
/hardware/libhardware/modules/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); }
|
/hardware/qcom/media/msm8974/mm-video-legacy/vidc/vdec/inc/ |
message_queue.h | 53 pthread_mutex_t mutex; member in struct:video_queue_context
|
/hardware/qcom/media/msm8974/mm-video-legacy/vidc/venc/inc/ |
queue.h | 53 pthread_mutex_t mutex; member in struct:video_queue_context
|
/hardware/qcom/media/msm8974/mm-video-v4l2/vidc/vdec/inc/ |
message_queue.h | 51 pthread_mutex_t mutex; member in struct:video_queue_context
|
/hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/inc/ |
queue.h | 51 pthread_mutex_t mutex; member in struct:video_queue_context
|
/hardware/qcom/media/msm8996/mm-video-v4l2/vidc/vdec/inc/ |
message_queue.h | 51 pthread_mutex_t mutex; member in struct:video_queue_context
|
/hardware/qcom/media/msm8996/mm-video-v4l2/vidc/venc/inc/ |
queue.h | 51 pthread_mutex_t mutex; member in struct:video_queue_context
|
/hardware/qcom/media/msm8998/mm-video-v4l2/vidc/vdec/inc/ |
message_queue.h | 51 pthread_mutex_t mutex; member in struct:video_queue_context
|
/hardware/qcom/media/msm8998/mm-video-v4l2/vidc/venc/inc/ |
queue.h | 51 pthread_mutex_t mutex; member in struct:video_queue_context
|
/prebuilts/misc/windows/sdl2/test/ |
testlock.c | 13 /* Test the thread and mutex locking functions 25 static SDL_mutex *mutex = NULL; variable 62 SDL_DestroyMutex(mutex); 73 if (SDL_LockMutex(mutex) < 0) { 74 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't lock mutex: %s", SDL_GetError()); 80 if (SDL_UnlockMutex(mutex) < 0) { 81 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't unlock mutex: %s", SDL_GetError()); 110 if ((mutex = SDL_CreateMutex()) == NULL) { 111 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create mutex: %s\n", SDL_GetError());
|
/prebuilts/ndk/r10/platforms/android-12/arch-arm/usr/include/linux/ |
mutex.h | 22 struct mutex { struct 35 #define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0) 36 #define mutex_destroy(mutex) do { } while (0) 42 #define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
|
/prebuilts/ndk/r10/platforms/android-12/arch-mips/usr/include/linux/ |
mutex.h | 22 struct mutex { struct 35 #define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0) 36 #define mutex_destroy(mutex) do { } while (0) 42 #define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
|
/prebuilts/ndk/r10/platforms/android-12/arch-x86/usr/include/linux/ |
mutex.h | 22 struct mutex { struct 35 #define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0) 36 #define mutex_destroy(mutex) do { } while (0) 42 #define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
|
/prebuilts/ndk/r10/platforms/android-13/arch-arm/usr/include/linux/ |
mutex.h | 22 struct mutex { struct 35 #define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0) 36 #define mutex_destroy(mutex) do { } while (0) 42 #define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
|
/prebuilts/ndk/r10/platforms/android-13/arch-mips/usr/include/linux/ |
mutex.h | 22 struct mutex { struct 35 #define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0) 36 #define mutex_destroy(mutex) do { } while (0) 42 #define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
|