Home
last modified time | relevance | path

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

1234

/external/llvm/lib/Support/
DRWMutex.cpp50 pthread_rwlock_t* rwlock = in RWMutexImpl() local
55 bzero(rwlock, sizeof(pthread_rwlock_t)); in RWMutexImpl()
59 int errorcode = pthread_rwlock_init(rwlock, nullptr); in RWMutexImpl()
64 data_ = rwlock; in RWMutexImpl()
70 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in ~RWMutexImpl() local
71 assert(rwlock != nullptr); in ~RWMutexImpl()
72 pthread_rwlock_destroy(rwlock); in ~RWMutexImpl()
73 free(rwlock); in ~RWMutexImpl()
79 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in reader_acquire() local
80 assert(rwlock != nullptr); in reader_acquire()
[all …]
/external/swiftshader/third_party/LLVM/lib/Support/
DRWMutex.cpp66 pthread_rwlock_t* rwlock = in RWMutexImpl() local
71 bzero(rwlock, sizeof(pthread_rwlock_t)); in RWMutexImpl()
75 int errorcode = pthread_rwlock_init(rwlock, NULL); in RWMutexImpl()
80 data_ = rwlock; in RWMutexImpl()
89 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in ~RWMutexImpl() local
90 assert(rwlock != 0); in ~RWMutexImpl()
91 pthread_rwlock_destroy(rwlock); in ~RWMutexImpl()
92 free(rwlock); in ~RWMutexImpl()
101 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in reader_acquire() local
102 assert(rwlock != 0); in reader_acquire()
[all …]
/external/valgrind/drd/tests/
Dtrylock.c23 pthread_rwlock_t rwlock; in main() local
30 r = pthread_rwlock_init(&rwlock, NULL); assert(r == 0); in main()
32 r = pthread_rwlock_wrlock(&rwlock); assert(r == 0); in main()
33 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
35 r = pthread_rwlock_trywrlock(&rwlock); assert(r == 0); in main()
36 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
39 r = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); assert(r == 0); in main()
40 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
43 r = pthread_rwlock_rdlock(&rwlock); assert(r == 0); in main()
44 r = pthread_rwlock_rdlock(&rwlock); assert(r == 0); in main()
[all …]
Dhold_lock.c30 pthread_rwlock_t rwlock; in main() local
60 pthread_rwlock_init(&rwlock, 0); in main()
61 pthread_rwlock_wrlock(&rwlock); in main()
63 pthread_rwlock_unlock(&rwlock); in main()
64 pthread_rwlock_destroy(&rwlock); in main()
68 pthread_rwlock_init(&rwlock, 0); in main()
69 pthread_rwlock_rdlock(&rwlock); in main()
71 pthread_rwlock_rdlock(&rwlock); in main()
72 pthread_rwlock_unlock(&rwlock); in main()
73 pthread_rwlock_unlock(&rwlock); in main()
[all …]
Dtrylock.stderr.exp2 Locking rwlock via pthread_rwlock_wrlock().
3 Locking rwlock via pthread_rwlock_trywrlock().
4 Locking rwlock via pthread_rwlock_timedwrlock().
5 Locking rwlock via pthread_rwlock_rdlock().
6 Locking rwlock via pthread_rwlock_tryrdlock().
7 Locking rwlock via pthread_rwlock_timedrdlock().
9 Recursive writer locking not allowed: rwlock 0x.........
12 rwlock 0x........ was first observed at:
/external/libcups/cups/
Dthread.c115 _cupsRWInit(_cups_rwlock_t *rwlock) /* I - Reader/writer lock */ in _cupsRWInit() argument
117 pthread_rwlock_init(rwlock, NULL); in _cupsRWInit()
126 _cupsRWLockRead(_cups_rwlock_t *rwlock) /* I - Reader/writer lock */ in _cupsRWLockRead() argument
128 pthread_rwlock_rdlock(rwlock); in _cupsRWLockRead()
137 _cupsRWLockWrite(_cups_rwlock_t *rwlock)/* I - Reader/writer lock */ in _cupsRWLockWrite() argument
139 pthread_rwlock_wrlock(rwlock); in _cupsRWLockWrite()
148 _cupsRWUnlock(_cups_rwlock_t *rwlock) /* I - Reader/writer lock */ in _cupsRWUnlock() argument
150 pthread_rwlock_unlock(rwlock); in _cupsRWUnlock()
302 _cupsRWInit(_cups_rwlock_t *rwlock) /* I - Reader/writer lock */ in _cupsRWInit() argument
304 _cupsMutexInit((_cups_mutex_t *)rwlock); in _cupsRWInit()
[all …]
/external/valgrind/drd/
Ddrd_rwlock.c222 void DRD_(rwlock_initialize)(struct rwlock_info* const p, const Addr rwlock, in DRD_()
225 tl_assert(rwlock != 0); in DRD_()
226 tl_assert(p->a1 == rwlock); in DRD_()
272 DRD_(rwlock_get_or_allocate)(const Addr rwlock, const RwLockT rwlock_type) in DRD_()
276 tl_assert(offsetof(DrdClientobj, rwlock) == 0); in DRD_()
277 p = &(DRD_(clientobj_get)(rwlock, ClientRwlock)->rwlock); in DRD_()
284 if (DRD_(clientobj_present)(rwlock, rwlock + 1)) in DRD_()
288 .addr = rwlock, in DRD_()
298 p = &(DRD_(clientobj_add)(rwlock, ClientRwlock)->rwlock); in DRD_()
299 DRD_(rwlock_initialize)(p, rwlock, rwlock_type); in DRD_()
[all …]
Ddrd_pthread_intercepts.c1508 int pthread_rwlock_init_intercept(pthread_rwlock_t* rwlock, in pthread_rwlock_init_intercept() argument
1515 rwlock, 0, 0, 0, 0); in pthread_rwlock_init_intercept()
1516 CALL_FN_W_WW(ret, fn, rwlock, attr); in pthread_rwlock_init_intercept()
1518 rwlock, 0, 0, 0, 0); in pthread_rwlock_init_intercept()
1524 (pthread_rwlock_t* rwlock, const pthread_rwlockattr_t* attr),
1525 (rwlock, attr));
1529 int rwlock_init_intercept(rwlock_t *rwlock, int type, void *arg) in rwlock_init_intercept() argument
1535 rwlock, 0, 0, 0, 0); in rwlock_init_intercept()
1536 CALL_FN_W_WWW(ret, fn, rwlock, type, arg); in rwlock_init_intercept()
1538 rwlock, 0, 0, 0, 0); in rwlock_init_intercept()
[all …]
Ddrd.h219 #define ANNOTATE_RWLOCK_CREATE(rwlock) \ argument
221 rwlock, 0, 0, 0, 0);
224 #define ANNOTATE_RWLOCK_DESTROY(rwlock) \ argument
226 rwlock, 0, 0, 0, 0);
233 #define ANNOTATE_RWLOCK_ACQUIRED(rwlock, is_w) \ argument
235 rwlock, is_w, 0, 0, 0)
243 #define ANNOTATE_READERLOCK_ACQUIRED(rwlock) ANNOTATE_RWLOCK_ACQUIRED(rwlock, 0) argument
249 #define ANNOTATE_WRITERLOCK_ACQUIRED(rwlock) ANNOTATE_RWLOCK_ACQUIRED(rwlock, 1) argument
258 #define ANNOTATE_RWLOCK_RELEASED(rwlock, is_w) \ argument
260 rwlock, is_w, 0, 0, 0);
[all …]
Ddrd_rwlock.h43 struct rwlock_info* DRD_(rwlock_pre_init)(const Addr rwlock,
45 void DRD_(rwlock_post_destroy)(const Addr rwlock, const RwLockT rwlock_type);
46 void DRD_(rwlock_pre_rdlock)(const Addr rwlock, const RwLockT rwlock_type);
47 void DRD_(rwlock_post_rdlock)(const Addr rwlock, const RwLockT rwlock_type,
49 void DRD_(rwlock_pre_wrlock)(const Addr rwlock, const RwLockT rwlock_type);
50 void DRD_(rwlock_post_wrlock)(const Addr rwlock, const RwLockT rwlock_type,
52 void DRD_(rwlock_pre_unlock)(const Addr rwlock, const RwLockT rwlock_type);
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/
D1-1.c34 static pthread_rwlock_t rwlock; variable
57 if (pthread_rwlock_rdlock(&rwlock) != 0) { in fn_rd()
63 rc = pthread_rwlock_unlock(&rwlock); in fn_rd()
73 if (pthread_rwlock_rdlock(&rwlock) != 0) { in fn_rd()
79 rc = pthread_rwlock_unlock(&rwlock); in fn_rd()
90 if (pthread_rwlock_wrlock(&rwlock) != 0) { in fn_rd()
96 rc = pthread_rwlock_unlock(&rwlock); in fn_rd()
114 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
122 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
155 rc = pthread_rwlock_unlock(&rwlock); in main()
[all …]
D3-1.c48 static pthread_rwlock_t rwlock; variable
86 rc = pthread_rwlock_rdlock(&rwlock); in fn_rd()
103 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
121 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr_1()
139 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_1()
158 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr_2()
175 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_2()
199 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
206 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
295 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
[all …]
/external/ltp/utils/ffsb-6.0-rc2/
Drwlock.h27 struct rwlock { struct
38 void init_rwlock(struct rwlock *rw); argument
40 void rw_lock_read(struct rwlock *rw);
41 void rw_lock_write(struct rwlock *rw);
43 void rw_unlock_read(struct rwlock *rw);
44 void rw_unlock_write(struct rwlock *rw);
46 int rw_trylock_read(struct rwlock *rw);
47 int rw_trylock_write(struct rwlock *rw);
/external/dng_sdk/source/
Ddng_pthread.h140 int dng_pthread_rwlock_destroy(dng_pthread_rwlock_t * rwlock);
141 int dng_pthread_rwlock_init(dng_pthread_rwlock_t * rwlock, const pthread_rwlockattr_t * attrs);
142 int dng_pthread_rwlock_rdlock(dng_pthread_rwlock_t * rwlock);
143 int dng_pthread_rwlock_tryrdlock(dng_pthread_rwlock_t * rwlock);
144 int dng_pthread_rwlock_trywrlock(dng_pthread_rwlock_t * rwlock);
145 int dng_pthread_rwlock_unlock(dng_pthread_rwlock_t * rwlock);
146 int dng_pthread_rwlock_wrlock(dng_pthread_rwlock_t * rwlock);
151 int dng_pthread_rwlock_destroy(dng_pthread_rwlock_t * rwlock);
152 int dng_pthread_rwlock_init(dng_pthread_rwlock_t * rwlock, const pthread_rwlockattr_t * attrs);
153 int dng_pthread_rwlock_rdlock(dng_pthread_rwlock_t * rwlock);
[all …]
/external/valgrind/helgrind/
Dhg_intercepts.c2060 rwlock_t *rwlock, in PTH_FUNC() argument
2068 fprintf(stderr, "<< rwl_init %p", rwlock); fflush(stderr); in PTH_FUNC()
2071 CALL_FN_W_WWW(ret, fn, rwlock, type, arg); in PTH_FUNC()
2075 rwlock_t *, rwlock); in PTH_FUNC()
2145 static int pthread_rwlock_wrlock_WRK(pthread_rwlock_t* rwlock) in pthread_rwlock_wrlock_WRK() argument
2151 fprintf(stderr, "<< pthread_rwl_wlk %p", rwlock); fflush(stderr); in pthread_rwlock_wrlock_WRK()
2155 pthread_rwlock_t*,rwlock, in pthread_rwlock_wrlock_WRK()
2158 CALL_FN_W_W(ret, fn, rwlock); in pthread_rwlock_wrlock_WRK()
2161 pthread_rwlock_t*,rwlock, long,1/*isW*/, in pthread_rwlock_wrlock_WRK()
2174 pthread_rwlock_t* rwlock) { in PTH_FUNC() argument
[all …]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_tryrdlock/
D1-1.c35 static pthread_rwlock_t rwlock; variable
54 rc = pthread_rwlock_tryrdlock(&rwlock); in fn_rd_1()
63 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd_1()
76 ret = pthread_rwlock_tryrdlock(&rwlock); in fn_rd_2()
94 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
101 rc = pthread_rwlock_tryrdlock(&rwlock); in main()
139 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
150 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
181 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
186 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/compiler-rt/test/tsan/
Dwrite_in_reader_lock.cc4 pthread_rwlock_t rwlock; variable
9 pthread_rwlock_rdlock(&rwlock); in Thread1()
13 pthread_rwlock_unlock(&rwlock); in Thread1()
19 pthread_rwlock_init(&rwlock, NULL); in main()
20 pthread_rwlock_rdlock(&rwlock); in main()
25 pthread_rwlock_unlock(&rwlock); in main()
28 pthread_rwlock_destroy(&rwlock); in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/
D1-1.c33 static pthread_rwlock_t rwlock; variable
51 rc = pthread_rwlock_rdlock(&rwlock); in fn_rd()
63 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
77 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
85 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
118 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
131 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
160 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
180 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/
D5-1.c46 pthread_rwlock_t rwlock; in fn_rd_1() local
48 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_rd_1()
60 rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); in fn_rd_1()
68 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd_1()
77 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_rd_1()
91 pthread_rwlock_t rwlock; in fn_rd_2() local
93 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_rd_2()
105 rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); in fn_rd_2()
113 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd_2()
122 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_rd_2()
D1-1.c47 static pthread_rwlock_t rwlock; variable
65 rc = pthread_rwlock_timedrdlock(&rwlock, &timeout); in fn_rd()
71 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
93 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
99 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
138 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
144 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
190 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
195 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
D3-1.c50 static pthread_rwlock_t rwlock; variable
73 rc = pthread_rwlock_timedrdlock(&rwlock, &timeout); in fn_rd()
79 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
107 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
113 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
152 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
158 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
206 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
211 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/
D5-1.c53 pthread_rwlock_t rwlock; in fn_wr_1() local
55 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_wr_1()
67 rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); in fn_wr_1()
75 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_1()
84 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_wr_1()
98 pthread_rwlock_t rwlock; in fn_wr_2() local
100 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in fn_wr_2()
111 rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); in fn_wr_2()
119 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr_2()
128 if (pthread_rwlock_destroy(&rwlock) != 0) { in fn_wr_2()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/
D3-1.c28 static pthread_rwlock_t rwlock; variable
40 if (pthread_rwlock_init(&rwlock, &rwlockattr) != 0) { in main()
46 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
53 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
60 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
67 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
75 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/
D1-1.c32 static pthread_rwlock_t rwlock; variable
52 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr()
56 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr()
77 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
84 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
115 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
144 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
174 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
184 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/
D1-1.c32 static pthread_rwlock_t rwlock; variable
52 rc = pthread_rwlock_trywrlock(&rwlock); in fn_wr()
72 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
79 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
117 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
129 rc = pthread_rwlock_trywrlock(&rwlock); in main()
169 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
179 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()

1234