Home
last modified time | relevance | path

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

123

/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-7.0/llvm/lib/Support/
DRWMutex.cpp52 pthread_rwlock_t* rwlock = in RWMutexImpl() local
57 bzero(rwlock, sizeof(pthread_rwlock_t)); in RWMutexImpl()
61 int errorcode = pthread_rwlock_init(rwlock, nullptr); in RWMutexImpl()
66 data_ = rwlock; in RWMutexImpl()
72 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in ~RWMutexImpl() local
73 assert(rwlock != nullptr); in ~RWMutexImpl()
74 pthread_rwlock_destroy(rwlock); in ~RWMutexImpl()
75 free(rwlock); in ~RWMutexImpl()
81 pthread_rwlock_t* rwlock = static_cast<pthread_rwlock_t*>(data_); in reader_acquire() local
82 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/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/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()
/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.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 …]
/external/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()
/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.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()
D2-3.c48 static pthread_rwlock_t rwlock; variable
84 rc = pthread_rwlock_rdlock(&rwlock); in fn_rd()
96 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
115 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr()
127 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr()
152 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
159 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
217 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
247 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
D2-1.c48 static pthread_rwlock_t rwlock; variable
84 rc = pthread_rwlock_rdlock(&rwlock); in fn_rd()
96 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
115 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr()
127 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr()
152 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
159 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
218 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
262 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
D2-2.c48 static pthread_rwlock_t rwlock; variable
84 rc = pthread_rwlock_rdlock(&rwlock); in fn_rd()
96 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
115 rc = pthread_rwlock_wrlock(&rwlock); in fn_wr()
127 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_wr()
151 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
158 if (pthread_rwlock_rdlock(&rwlock) != 0) { in main()
217 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
261 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/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()
D2-1.c35 static pthread_rwlock_t rwlock; variable
67 rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); in fn()
76 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn()
97 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
104 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
146 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
156 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/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()
D2-1.c43 static pthread_rwlock_t rwlock; variable
61 rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); in fn_rd()
69 if (pthread_rwlock_unlock(&rwlock) != 0) { in fn_rd()
94 if (pthread_rwlock_init(&rwlock, NULL) != 0) { in main()
100 if (pthread_rwlock_wrlock(&rwlock) != 0) { in main()
138 if (pthread_rwlock_unlock(&rwlock) != 0) { in main()
148 if (pthread_rwlock_destroy(&rwlock) != 0) { in main()
/external/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()
/external/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()
/external/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