Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 43) sorted by relevance

12

/system/core/include/cutils/
Dthreads.h45 pthread_mutex_t lock; member
58 CRITICAL_SECTION lock; member
87 static __inline__ void mutex_lock(mutex_t* lock) in mutex_lock() argument
89 pthread_mutex_lock(lock); in mutex_lock()
91 static __inline__ void mutex_unlock(mutex_t* lock) in mutex_unlock() argument
93 pthread_mutex_unlock(lock); in mutex_unlock()
95 static __inline__ int mutex_init(mutex_t* lock) in mutex_init() argument
97 return pthread_mutex_init(lock, NULL); in mutex_init()
99 static __inline__ void mutex_destroy(mutex_t* lock) in mutex_destroy() argument
101 pthread_mutex_destroy(lock); in mutex_destroy()
[all …]
/system/extras/tests/bionic/libc/common/
Dtest_pthread_rwlock.c113 pthread_rwlock_t lock[1]; in do_test_rwlock_rd1() local
115 TZERO(pthread_rwlock_init(lock, attr)); in do_test_rwlock_rd1()
116 TZERO(pthread_rwlock_rdlock(lock)); in do_test_rwlock_rd1()
117 TZERO(pthread_rwlock_unlock(lock)); in do_test_rwlock_rd1()
118 TZERO(pthread_rwlock_destroy(lock)); in do_test_rwlock_rd1()
124 pthread_rwlock_t lock[1]; in do_test_rwlock_wr1() local
126 TZERO(pthread_rwlock_init(lock, attr)); in do_test_rwlock_wr1()
127 TZERO(pthread_rwlock_wrlock(lock)); in do_test_rwlock_wr1()
128 TZERO(pthread_rwlock_unlock(lock)); in do_test_rwlock_wr1()
129 TZERO(pthread_rwlock_destroy(lock)); in do_test_rwlock_wr1()
[all …]
Dtest_pthread_mutex.c114 pthread_mutex_t lock[1]; in do_test_mutex_1() local
116 TZERO(pthread_mutex_init(lock, attr)); in do_test_mutex_1()
117 TZERO(pthread_mutex_lock(lock)); in do_test_mutex_1()
118 TZERO(pthread_mutex_unlock(lock)); in do_test_mutex_1()
119 TZERO(pthread_mutex_destroy(lock)); in do_test_mutex_1()
173 pthread_mutex_t lock[1]; in do_test_mutex_2() local
175 TZERO(pthread_mutex_init(lock, attr)); in do_test_mutex_2()
176 TZERO(pthread_mutex_trylock(lock)); in do_test_mutex_2()
177 TZERO(pthread_mutex_unlock(lock)); in do_test_mutex_2()
178 TZERO(pthread_mutex_destroy(lock)); in do_test_mutex_2()
[all …]
/system/bt/btif/src/
Dbtif_config.c85 static pthread_mutex_t lock; // protects operations on |config|. variable
92 pthread_mutex_init(&lock, NULL); in init()
124 pthread_mutex_destroy(&lock); in init()
140 pthread_mutex_destroy(&lock); in clean_up()
161 pthread_mutex_lock(&lock); in btif_config_has_section()
163 pthread_mutex_unlock(&lock); in btif_config_has_section()
173 pthread_mutex_lock(&lock); in btif_config_exist()
175 pthread_mutex_unlock(&lock); in btif_config_exist()
186 pthread_mutex_lock(&lock); in btif_config_get_int()
190 pthread_mutex_unlock(&lock); in btif_config_get_int()
[all …]
Dbtif_sock_sco.c84 static pthread_mutex_t lock; variable
96 pthread_mutex_init(&lock, NULL); in btsock_sco_init()
107 pthread_mutex_destroy(&lock); in btsock_sco_cleanup()
114 pthread_mutex_lock(&lock); in btsock_sco_listen()
122 pthread_mutex_unlock(&lock); in btsock_sco_listen()
131 pthread_mutex_lock(&lock); in btsock_sco_connect()
133 pthread_mutex_unlock(&lock); in btsock_sco_connect()
219 pthread_mutex_lock(&lock); in connection_request_cb()
260 pthread_mutex_unlock(&lock); in connection_request_cb()
264 pthread_mutex_unlock(&lock); in connection_request_cb()
[all …]
/system/bt/osi/src/
Dallocation_tracker.c63 static pthread_mutex_t lock; variable
71 pthread_mutex_init(&lock, NULL); in allocation_tracker_init()
73 pthread_mutex_lock(&lock); in allocation_tracker_init()
81 pthread_mutex_unlock(&lock); in allocation_tracker_init()
89 pthread_mutex_lock(&lock); in allocation_tracker_uninit()
92 pthread_mutex_unlock(&lock); in allocation_tracker_uninit()
99 pthread_mutex_lock(&lock); in allocation_tracker_reset()
101 pthread_mutex_unlock(&lock); in allocation_tracker_reset()
108 pthread_mutex_lock(&lock); in allocation_tracker_expect_no_allocations()
113 pthread_mutex_unlock(&lock); in allocation_tracker_expect_no_allocations()
[all …]
Dfixed_queue.c34 pthread_mutex_t lock; member
49 pthread_mutex_init(&ret->lock, NULL); in fixed_queue_new()
84 pthread_mutex_destroy(&queue->lock); in fixed_queue_free()
91 pthread_mutex_lock(&queue->lock); in fixed_queue_is_empty()
93 pthread_mutex_unlock(&queue->lock); in fixed_queue_is_empty()
110 pthread_mutex_lock(&queue->lock); in fixed_queue_enqueue()
112 pthread_mutex_unlock(&queue->lock); in fixed_queue_enqueue()
122 pthread_mutex_lock(&queue->lock); in fixed_queue_dequeue()
125 pthread_mutex_unlock(&queue->lock); in fixed_queue_dequeue()
139 pthread_mutex_lock(&queue->lock); in fixed_queue_try_enqueue()
[all …]
Dreactor.c52 pthread_mutex_t lock; // protects the lifetime of this object and all variables. member
150 pthread_mutex_init(&object->lock, NULL); in reactor_register()
162 pthread_mutex_destroy(&object->lock); in reactor_register()
188 pthread_mutex_lock(&object->lock); in reactor_change_registration()
191 pthread_mutex_unlock(&object->lock); in reactor_change_registration()
221 pthread_mutex_lock(&obj->lock); in reactor_unregister()
222 pthread_mutex_unlock(&obj->lock); in reactor_unregister()
223 pthread_mutex_destroy(&obj->lock); in reactor_unregister()
273 pthread_mutex_lock(&object->lock); in run_reactor()
281 pthread_mutex_unlock(&object->lock); in run_reactor()
[all …]
/system/core/libcutils/
Dthreads.c61 pthread_mutex_lock( &store->lock ); in thread_store_set()
64 pthread_mutex_unlock(&store->lock); in thread_store_set()
69 pthread_mutex_unlock( &store->lock ); in thread_store_set()
90 InitializeCriticalSection( &store->lock ); in thread_store_set()
96 EnterCriticalSection( &store->lock ); in thread_store_set()
100 LeaveCriticalSection( &store->lock ); in thread_store_set()
105 LeaveCriticalSection( &store->lock ); in thread_store_set()
Dhashmap.c39 mutex_t lock; member
72 mutex_init(&map->lock); in hashmapCreate()
133 mutex_lock(&map->lock); in hashmapLock()
137 mutex_unlock(&map->lock); in hashmapUnlock()
151 mutex_destroy(&map->lock); in hashmapFree()
/system/extras/tests/bionic/libc/bionic/
Dtest_cond.c36 static pthread_mutex_t lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; variable
42 pthread_mutex_lock(&lock); in _thread1()
44 pthread_cond_wait(&wait, &lock); in _thread1()
46 pthread_mutex_unlock(&lock); in _thread1()
56 pthread_mutex_lock(&lock); in _thread2()
60 pthread_mutex_unlock(&lock); in _thread2()
/system/netd/server/
DNetworkController.cpp141 android::RWLock::AutoRLock lock(mRWLock); in getDefaultNetwork() local
146 android::RWLock::AutoWLock lock(mRWLock); in setDefaultNetwork() local
183 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForDns() local
210 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForUser() local
232 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForConnect() local
265 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForInterface() local
275 android::RWLock::AutoRLock lock(mRWLock); in isVirtualNetwork() local
299 android::RWLock::AutoWLock lock(mRWLock); in createPhysicalNetwork() local
315 android::RWLock::AutoWLock lock(mRWLock); in createVirtualNetwork() local
335 android::RWLock::AutoWLock lock(mRWLock); in destroyNetwork() local
[all …]
/system/bt/gki/ulinux/
Dgki_ulinux.c40 pthread_mutex_init(&gki_cb.lock, &attr); in init()
49 pthread_mutex_destroy(&gki_cb.lock); in clean_up()
84 pthread_mutex_unlock(&gki_cb.lock); in GKI_enable()
88 pthread_mutex_lock(&gki_cb.lock); in GKI_disable()
Dgki_int.h27 pthread_mutex_t lock; member
/system/core/adb/
Dusb_linux_client.cpp46 adb_mutex_t lock; member
169 adb_mutex_lock(&usb->lock); in usb_adb_open_thread()
171 adb_cond_wait(&usb->notify, &usb->lock); in usb_adb_open_thread()
172 adb_mutex_unlock(&usb->lock); in usb_adb_open_thread()
232 adb_mutex_lock(&h->lock); in usb_adb_kick()
238 adb_mutex_unlock(&h->lock); in usb_adb_kick()
252 adb_mutex_init(&h->lock, 0); in usb_adb_init()
355 adb_mutex_lock(&usb->lock); in usb_ffs_open_thread()
357 adb_cond_wait(&usb->notify, &usb->lock); in usb_ffs_open_thread()
358 adb_mutex_unlock(&usb->lock); in usb_ffs_open_thread()
[all …]
Dusb_linux.cpp69 adb_mutex_t lock; member
333 adb_mutex_lock(&h->lock); in usb_bulk_write()
353 res = pthread_cond_timedwait(&h->notify, &h->lock, &ts); in usb_bulk_write()
365 adb_mutex_unlock(&h->lock); in usb_bulk_write()
385 adb_mutex_lock(&h->lock); in usb_bulk_read()
402 adb_mutex_unlock(&h->lock); in usb_bulk_read()
405 adb_mutex_lock(&h->lock); in usb_bulk_read()
438 adb_mutex_unlock(&h->lock); in usb_bulk_read()
521 adb_mutex_lock(&h->lock); in usb_kick()
550 adb_mutex_unlock(&h->lock); in usb_kick()
[all …]
/system/core/include/utils/
DMutex.h56 status_t lock();
76 inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); } in Autolock()
77 inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); } in Autolock()
122 inline status_t Mutex::lock() { in lock() function
/system/core/sdcard/
Dsdcard.c188 pthread_mutex_t lock; member
714 pthread_mutex_lock(&fuse->global->lock); in fuse_reply_entry()
717 pthread_mutex_unlock(&fuse->global->lock); in fuse_reply_entry()
726 pthread_mutex_unlock(&fuse->global->lock); in fuse_reply_entry()
786 pthread_mutex_lock(&fuse->global->lock); in handle_lookup()
791 pthread_mutex_unlock(&fuse->global->lock); in handle_lookup()
809 pthread_mutex_lock(&fuse->global->lock); in handle_forget()
819 pthread_mutex_unlock(&fuse->global->lock); in handle_forget()
829 pthread_mutex_lock(&fuse->global->lock); in handle_getattr()
833 pthread_mutex_unlock(&fuse->global->lock); in handle_getattr()
[all …]
/system/core/logd/
DLogTimes.cpp74 lock(); in threadStop()
129 lock(); in threadStart()
142 lock(); in threadStart()
168 LogTimeEntry::lock(); in FilterFirstPass()
196 LogTimeEntry::lock(); in FilterSecondPass()
DLogTimes.h59 static void lock(void) { pthread_mutex_lock(&timesLock); } in lock() function
87 void error(void) { lock(); error_Locked(); unlock(); } in error()
DLogReader.cpp101 LogTimeEntry::lock(); in onDataAvailable()
170 LogTimeEntry::lock(); in doSocketDelete()
/system/core/liblog/
Dlog_is_loggable.c52 static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
89 pthread_mutex_lock(&lock); in __android_log_level()
159 pthread_mutex_unlock(&lock); in __android_log_level()
Dfake_log_device.c100 static void lock() in lock() function
110 #define lock() ((void)0) macro
158 lock(); in deleteFakeFd()
556 lock(); in logWritev()
625 lock(); in logOpen()
/system/bt/audio_a2dp_hw/
Daudio_a2dp_hw.c99 pthread_mutex_t lock; member
434 pthread_mutex_init(&common->lock, &lock_attr); in a2dp_stream_common_init()
557 pthread_mutex_lock(&out->common.lock); in out_write()
562 pthread_mutex_unlock(&out->common.lock); in out_write()
580 pthread_mutex_unlock(&out->common.lock); in out_write()
587 pthread_mutex_unlock(&out->common.lock); in out_write()
591 pthread_mutex_unlock(&out->common.lock); in out_write()
675 pthread_mutex_lock(&out->common.lock); in out_standby()
679 pthread_mutex_unlock (&out->common.lock); in out_standby()
714 pthread_mutex_lock(&out->common.lock); in out_set_parameters()
[all …]
/system/media/audio_utils/
Decho_reference.c63 pthread_mutex_t lock; // mutex protecting read/write concurrency member
143 pthread_mutex_lock(&er->lock); in echo_reference_write()
283 pthread_mutex_unlock(&er->lock); in echo_reference_write()
304 pthread_mutex_lock(&er->lock); in echo_reference_read()
347 pthread_cond_timedwait_relative_np(&er->cond, &er->lock, &ts); in echo_reference_read()
349 pthread_cond_timedwait(&er->cond, &er->lock, &ts); in echo_reference_read()
486 pthread_mutex_unlock(&er->lock); in echo_reference_read()

12