/third_party/mesa3d/src/util/ |
D | rwlock.h | 44 SRWLOCK rwlock; member 46 pthread_rwlock_t rwlock; 50 static inline int u_rwlock_init(struct u_rwlock *rwlock) in u_rwlock_init() argument 53 InitializeSRWLock(&rwlock->rwlock); in u_rwlock_init() 56 return pthread_rwlock_init(&rwlock->rwlock, NULL); in u_rwlock_init() 60 static inline int u_rwlock_destroy(struct u_rwlock *rwlock) in u_rwlock_destroy() argument 65 return pthread_rwlock_destroy(&rwlock->rwlock); in u_rwlock_destroy() 69 static inline int u_rwlock_rdlock(struct u_rwlock *rwlock) in u_rwlock_rdlock() argument 72 AcquireSRWLockShared(&rwlock->rwlock); in u_rwlock_rdlock() 75 return pthread_rwlock_rdlock(&rwlock->rwlock); in u_rwlock_rdlock() [all …]
|
/third_party/libuv/test/ |
D | test-mutexes.c | 30 static uv_rwlock_t rwlock; variable 74 uv_rwlock_t rwlock; in TEST_IMPL() local 77 r = uv_rwlock_init(&rwlock); in TEST_IMPL() 80 uv_rwlock_rdlock(&rwlock); in TEST_IMPL() 81 uv_rwlock_rdunlock(&rwlock); in TEST_IMPL() 82 uv_rwlock_wrlock(&rwlock); in TEST_IMPL() 83 uv_rwlock_wrunlock(&rwlock); in TEST_IMPL() 84 uv_rwlock_destroy(&rwlock); in TEST_IMPL() 114 ASSERT(UV_EBUSY == uv_rwlock_tryrdlock(&rwlock)); in thread_rwlock_trylock_peer() 115 ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); in thread_rwlock_trylock_peer() [all …]
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/ |
D | pthread_rwlock_timedrdlock.c | 30 pthread_rwlock_t rwlock; in pthread_rwlock_timedrdlock_0100() local 31 pthread_rwlock_init(&rwlock, NULL); in pthread_rwlock_timedrdlock_0100() 37 rev = pthread_rwlock_timedrdlock(&rwlock, &ts); in pthread_rwlock_timedrdlock_0100() 41 pthread_rwlock_unlock(&rwlock); in pthread_rwlock_timedrdlock_0100() 43 pthread_rwlock_destroy(&rwlock); in pthread_rwlock_timedrdlock_0100() 54 pthread_rwlock_t rwlock; in pthread_rwlock_timedrdlock_0200() local 55 pthread_rwlock_init(&rwlock, NULL); in pthread_rwlock_timedrdlock_0200() 56 int rev = pthread_rwlock_timedrdlock(&rwlock, NULL); in pthread_rwlock_timedrdlock_0200() 63 rev = pthread_rwlock_timedrdlock(&rwlock, &ts); in pthread_rwlock_timedrdlock_0200() 66 pthread_rwlock_unlock(&rwlock); in pthread_rwlock_timedrdlock_0200() [all …]
|
D | pthread_rwlock_timedwrlock.c | 30 pthread_rwlock_t rwlock; in pthread_rwlock_timedwrlock_0100() local 31 pthread_rwlock_init(&rwlock, NULL); in pthread_rwlock_timedwrlock_0100() 37 rev = pthread_rwlock_timedwrlock(&rwlock, &ts); in pthread_rwlock_timedwrlock_0100() 41 pthread_rwlock_unlock(&rwlock); in pthread_rwlock_timedwrlock_0100() 43 pthread_rwlock_destroy(&rwlock); in pthread_rwlock_timedwrlock_0100() 54 pthread_rwlock_t rwlock; in pthread_rwlock_timedwrlock_0200() local 55 pthread_rwlock_init(&rwlock, NULL); in pthread_rwlock_timedwrlock_0200() 56 int rev = pthread_rwlock_timedrdlock(&rwlock, NULL); in pthread_rwlock_timedwrlock_0200() 63 rev = pthread_rwlock_timedwrlock(&rwlock, &ts); in pthread_rwlock_timedwrlock_0200() 66 pthread_rwlock_unlock(&rwlock); in pthread_rwlock_timedwrlock_0200() [all …]
|
D | pthread_rwlock_tryrdlock.c | 26 pthread_rwlock_t rwlock; in pthread_rwlock_tryrdlock_0100() local 29 pthread_rwlock_init(&rwlock, &rwlockattr); in pthread_rwlock_tryrdlock_0100() 31 int ret = pthread_rwlock_tryrdlock(&rwlock); in pthread_rwlock_tryrdlock_0100() 33 ret = pthread_rwlock_unlock(&rwlock); in pthread_rwlock_tryrdlock_0100() 36 pthread_rwlock_destroy(&rwlock); in pthread_rwlock_tryrdlock_0100() 47 pthread_rwlock_t rwlock; in pthread_rwlock_tryrdlock_0200() local 50 pthread_rwlock_init(&rwlock, &rwlockattr); in pthread_rwlock_tryrdlock_0200() 52 int ret = pthread_rwlock_wrlock(&rwlock); in pthread_rwlock_tryrdlock_0200() 55 ret = pthread_rwlock_tryrdlock(&rwlock); in pthread_rwlock_tryrdlock_0200() 58 ret = pthread_rwlock_unlock(&rwlock); in pthread_rwlock_tryrdlock_0200() [all …]
|
D | pthread_rwlock_trywrlock.c | 26 pthread_rwlock_t rwlock; in pthread_rwlock_trywrlock_0100() local 29 pthread_rwlock_init(&rwlock, &rwlockattr); in pthread_rwlock_trywrlock_0100() 31 int ret = pthread_rwlock_trywrlock(&rwlock); in pthread_rwlock_trywrlock_0100() 33 ret = pthread_rwlock_unlock(&rwlock); in pthread_rwlock_trywrlock_0100() 36 pthread_rwlock_destroy(&rwlock); in pthread_rwlock_trywrlock_0100() 47 pthread_rwlock_t rwlock; in pthread_rwlock_trywrlock_0200() local 50 pthread_rwlock_init(&rwlock, &rwlockattr); in pthread_rwlock_trywrlock_0200() 52 int ret = pthread_rwlock_wrlock(&rwlock); in pthread_rwlock_trywrlock_0200() 55 ret = pthread_rwlock_trywrlock(&rwlock); in pthread_rwlock_trywrlock_0200() 58 ret = pthread_rwlock_unlock(&rwlock); in pthread_rwlock_trywrlock_0200() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/ |
D | RWMutex.cpp | 44 pthread_rwlock_t* rwlock = in RWMutexImpl() local 49 bzero(rwlock, sizeof(pthread_rwlock_t)); in RWMutexImpl() 53 int errorcode = pthread_rwlock_init(rwlock, nullptr); in RWMutexImpl() 58 data_ = rwlock; in RWMutexImpl() 64 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in ~RWMutexImpl() local 65 assert(rwlock != nullptr); in ~RWMutexImpl() 66 pthread_rwlock_destroy(rwlock); in ~RWMutexImpl() 67 free(rwlock); in ~RWMutexImpl() 73 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in lock_shared() local 74 assert(rwlock != nullptr); in lock_shared() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/ |
D | 1-1.c | 33 static pthread_rwlock_t rwlock; variable 56 if (pthread_rwlock_rdlock(&rwlock) != 0) { in fn_rd() 62 rc = pthread_rwlock_unlock(&rwlock); in fn_rd() 72 if (pthread_rwlock_rdlock(&rwlock) != 0) { in fn_rd() 78 rc = pthread_rwlock_unlock(&rwlock); in fn_rd() 89 if (pthread_rwlock_wrlock(&rwlock) != 0) { in fn_rd() 95 rc = pthread_rwlock_unlock(&rwlock); in fn_rd() 113 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 121 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main() 154 rc = pthread_rwlock_unlock(&rwlock); in main() [all …]
|
D | 3-1.c | 47 static pthread_rwlock_t rwlock; variable 85 rc = pthread_rwlock_rdlock(&rwlock); in fn_rd() 102 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd() 120 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr_1() 138 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_1() 157 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr_2() 174 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_2() 198 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 205 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 294 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() [all …]
|
D | 2-1.c | 30 static pthread_rwlock_t rwlock; variable 50 if (pthread_rwlock_wrlock(&rwlock) != 0) { in fn_wr() 56 rc = pthread_rwlock_unlock(&rwlock); in fn_wr() 74 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 81 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 110 rc = pthread_rwlock_unlock(&rwlock); in main() 132 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
/third_party/openssl/crypto/ |
D | threads_win.c | 44 CRYPTO_win_rwlock *rwlock; in CRYPTO_THREAD_lock_new() local 48 rwlock = lock; in CRYPTO_THREAD_lock_new() 49 InitializeSRWLock(&rwlock->lock); in CRYPTO_THREAD_lock_new() 74 CRYPTO_win_rwlock *rwlock = lock; in CRYPTO_THREAD_read_lock() local 76 AcquireSRWLockShared(&rwlock->lock); in CRYPTO_THREAD_read_lock() 86 CRYPTO_win_rwlock *rwlock = lock; in CRYPTO_THREAD_write_lock() local 88 AcquireSRWLockExclusive(&rwlock->lock); in CRYPTO_THREAD_write_lock() 89 rwlock->exclusive = 1; in CRYPTO_THREAD_write_lock() 99 CRYPTO_win_rwlock *rwlock = lock; in CRYPTO_THREAD_unlock() local 101 if (rwlock->exclusive) { in CRYPTO_THREAD_unlock() [all …]
|
/third_party/node/deps/openssl/openssl/crypto/ |
D | threads_win.c | 44 CRYPTO_win_rwlock *rwlock; in CRYPTO_THREAD_lock_new() local 48 rwlock = lock; in CRYPTO_THREAD_lock_new() 49 InitializeSRWLock(&rwlock->lock); in CRYPTO_THREAD_lock_new() 74 CRYPTO_win_rwlock *rwlock = lock; in CRYPTO_THREAD_read_lock() local 76 AcquireSRWLockShared(&rwlock->lock); in CRYPTO_THREAD_read_lock() 86 CRYPTO_win_rwlock *rwlock = lock; in CRYPTO_THREAD_write_lock() local 88 AcquireSRWLockExclusive(&rwlock->lock); in CRYPTO_THREAD_write_lock() 89 rwlock->exclusive = 1; in CRYPTO_THREAD_write_lock() 99 CRYPTO_win_rwlock *rwlock = lock; in CRYPTO_THREAD_unlock() local 101 if (rwlock->exclusive) { in CRYPTO_THREAD_unlock() [all …]
|
/third_party/skia/third_party/externals/dng_sdk/source/ |
D | dng_pthread.h | 130 int dng_pthread_rwlock_destroy(dng_pthread_rwlock_t * rwlock); 131 int dng_pthread_rwlock_init(dng_pthread_rwlock_t * rwlock, const pthread_rwlockattr_t * attrs); 132 int dng_pthread_rwlock_rdlock(dng_pthread_rwlock_t * rwlock); 133 int dng_pthread_rwlock_tryrdlock(dng_pthread_rwlock_t * rwlock); 134 int dng_pthread_rwlock_trywrlock(dng_pthread_rwlock_t * rwlock); 135 int dng_pthread_rwlock_unlock(dng_pthread_rwlock_t * rwlock); 136 int dng_pthread_rwlock_wrlock(dng_pthread_rwlock_t * rwlock); 141 int dng_pthread_rwlock_destroy(dng_pthread_rwlock_t * rwlock); 142 int dng_pthread_rwlock_init(dng_pthread_rwlock_t * rwlock, const pthread_rwlockattr_t * attrs); 143 int dng_pthread_rwlock_rdlock(dng_pthread_rwlock_t * rwlock); [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_tryrdlock/ |
D | 1-1.c | 34 static pthread_rwlock_t rwlock; variable 53 rc = pthread_rwlock_tryrdlock(&rwlock); in fn_rd_1() 62 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd_1() 75 ret = pthread_rwlock_tryrdlock(&rwlock); in fn_rd_2() 93 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 100 rc = pthread_rwlock_tryrdlock(&rwlock); in main() 138 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 149 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 180 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 185 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/ |
D | 1-1.c | 32 static pthread_rwlock_t rwlock; variable 50 rc = pthread_rwlock_rdlock(&rwlock); in fn_rd() 62 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd() 76 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 84 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main() 117 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 130 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 159 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 179 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/ |
D | 5-1.c | 52 pthread_rwlock_t rwlock; in fn_wr_1() local 54 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_wr_1() 66 rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); in fn_wr_1() 74 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_1() 83 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_wr_1() 97 pthread_rwlock_t rwlock; in fn_wr_2() local 99 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_wr_2() 110 rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); in fn_wr_2() 118 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_2() 127 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_wr_2()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/ |
D | 5-1.c | 45 pthread_rwlock_t rwlock; in fn_rd_1() local 47 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_rd_1() 59 rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); in fn_rd_1() 67 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd_1() 76 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_rd_1() 90 pthread_rwlock_t rwlock; in fn_rd_2() local 92 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_rd_2() 104 rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); in fn_rd_2() 112 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd_2() 121 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_rd_2()
|
D | 1-1.c | 46 static pthread_rwlock_t rwlock; variable 64 rc = pthread_rwlock_timedrdlock(&rwlock, &timeout); in fn_rd() 70 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd() 92 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 98 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main() 137 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 143 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 189 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 194 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
D | 3-1.c | 49 static pthread_rwlock_t rwlock; variable 72 rc = pthread_rwlock_timedrdlock(&rwlock, &timeout); in fn_rd() 78 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd() 106 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 112 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main() 151 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 157 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 205 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 210 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/ |
D | 3-1.c | 27 static pthread_rwlock_t rwlock; variable 39 if (pthread_rwlock_init(&rwlock, &rwlockattr) != 0) { in main() 45 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main() 52 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 59 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 66 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 74 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/ |
D | 1-1.c | 31 static pthread_rwlock_t rwlock; variable 51 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr() 55 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr() 76 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 83 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main() 114 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 143 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 173 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 183 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
D | 3-1.c | 29 static pthread_rwlock_t rwlock; in main() local 32 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 40 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main() 50 rc = pthread_rwlock_wrlock(&rwlock); in main() 53 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 58 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|
/third_party/node/deps/uv/src/win/ |
D | thread.c | 259 int uv_rwlock_init(uv_rwlock_t* rwlock) { in uv_rwlock_init() argument 260 memset(rwlock, 0, sizeof(*rwlock)); in uv_rwlock_init() 261 InitializeSRWLock(&rwlock->read_write_lock_); in uv_rwlock_init() 267 void uv_rwlock_destroy(uv_rwlock_t* rwlock) { in uv_rwlock_destroy() argument 273 void uv_rwlock_rdlock(uv_rwlock_t* rwlock) { in uv_rwlock_rdlock() argument 274 AcquireSRWLockShared(&rwlock->read_write_lock_); in uv_rwlock_rdlock() 278 int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) { in uv_rwlock_tryrdlock() argument 279 if (!TryAcquireSRWLockShared(&rwlock->read_write_lock_)) in uv_rwlock_tryrdlock() 286 void uv_rwlock_rdunlock(uv_rwlock_t* rwlock) { in uv_rwlock_rdunlock() argument 287 ReleaseSRWLockShared(&rwlock->read_write_lock_); in uv_rwlock_rdunlock() [all …]
|
/third_party/libuv/src/win/ |
D | thread.c | 259 int uv_rwlock_init(uv_rwlock_t* rwlock) { in uv_rwlock_init() argument 260 memset(rwlock, 0, sizeof(*rwlock)); in uv_rwlock_init() 261 InitializeSRWLock(&rwlock->read_write_lock_); in uv_rwlock_init() 267 void uv_rwlock_destroy(uv_rwlock_t* rwlock) { in uv_rwlock_destroy() argument 273 void uv_rwlock_rdlock(uv_rwlock_t* rwlock) { in uv_rwlock_rdlock() argument 274 AcquireSRWLockShared(&rwlock->read_write_lock_); in uv_rwlock_rdlock() 278 int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) { in uv_rwlock_tryrdlock() argument 279 if (!TryAcquireSRWLockShared(&rwlock->read_write_lock_)) in uv_rwlock_tryrdlock() 286 void uv_rwlock_rdunlock(uv_rwlock_t* rwlock) { in uv_rwlock_rdunlock() argument 287 ReleaseSRWLockShared(&rwlock->read_write_lock_); in uv_rwlock_rdunlock() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/ |
D | 1-1.c | 31 static pthread_rwlock_t rwlock; variable 51 rc = pthread_rwlock_trywrlock(&rwlock); in fn_wr() 71 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main() 78 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main() 116 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 128 rc = pthread_rwlock_trywrlock(&rwlock); in main() 168 if (pthread_rwlock_unlock(&rwlock) != 0) { in main() 178 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
|