Home
last modified time | relevance | path

Searched refs:rwlock (Results 1 – 25 of 74) sorted by relevance

123

/third_party/mesa3d/src/util/
Drwlock.h44 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/
Dtest-mutexes.c30 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/
Dpthread_rwlock_timedrdlock.c30 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 …]
Dpthread_rwlock_timedwrlock.c30 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 …]
Dpthread_rwlock_tryrdlock.c26 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 …]
Dpthread_rwlock_trywrlock.c26 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/
DRWMutex.cpp44 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/
D1-1.c33 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 …]
D3-1.c47 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 …]
D2-1.c30 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/
Dthreads_win.c44 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/
Dthreads_win.c44 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/
Ddng_pthread.h130 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/
D1-1.c34 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/
D1-1.c32 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/
D5-1.c52 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/
D5-1.c45 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()
D1-1.c46 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()
D3-1.c49 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/
D3-1.c27 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/
D1-1.c31 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()
D3-1.c29 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/
Dthread.c259 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/
Dthread.c259 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/
D1-1.c31 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()

123