Home
last modified time | relevance | path

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

1234

/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/bt/osi/src/
Dfixed_queue.c34 pthread_mutex_t lock; member
47 pthread_mutex_init(&ret->lock, NULL); in fixed_queue_new()
82 pthread_mutex_destroy(&queue->lock); in fixed_queue_free()
90 pthread_mutex_lock(&queue->lock); in fixed_queue_is_empty()
92 pthread_mutex_unlock(&queue->lock); in fixed_queue_is_empty()
101 pthread_mutex_lock(&queue->lock); in fixed_queue_length()
103 pthread_mutex_unlock(&queue->lock); in fixed_queue_length()
120 pthread_mutex_lock(&queue->lock); in fixed_queue_enqueue()
122 pthread_mutex_unlock(&queue->lock); in fixed_queue_enqueue()
132 pthread_mutex_lock(&queue->lock); in fixed_queue_dequeue()
[all …]
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 …]
Dreactor.c54 pthread_mutex_t lock; // protects the lifetime of this object and all variables. member
147 pthread_mutex_init(&object->lock, NULL); in reactor_register()
159 pthread_mutex_destroy(&object->lock); in reactor_register()
185 pthread_mutex_lock(&object->lock); in reactor_change_registration()
188 pthread_mutex_unlock(&object->lock); in reactor_change_registration()
218 pthread_mutex_lock(&obj->lock); in reactor_unregister()
219 pthread_mutex_unlock(&obj->lock); in reactor_unregister()
220 pthread_mutex_destroy(&obj->lock); in reactor_unregister()
267 pthread_mutex_lock(&object->lock); in run_reactor()
275 pthread_mutex_unlock(&object->lock); in run_reactor()
[all …]
/system/bt/btif/src/
Dbtif_config.c131 static pthread_mutex_t lock; // protects operations on |config|. variable
138 pthread_mutex_init(&lock, NULL); in init()
139 pthread_mutex_lock(&lock); in init()
202 pthread_mutex_unlock(&lock); in init()
208 pthread_mutex_unlock(&lock); in init()
209 pthread_mutex_destroy(&lock); in init()
240 pthread_mutex_destroy(&lock); in clean_up()
261 pthread_mutex_lock(&lock); in btif_config_has_section()
263 pthread_mutex_unlock(&lock); in btif_config_has_section()
273 pthread_mutex_lock(&lock); in btif_config_exist()
[all …]
Dbtif_uid.c38 pthread_mutex_t lock; member
44 pthread_mutex_init(&set->lock, NULL); in uid_set_create()
49 pthread_mutex_lock(&set->lock); in uid_set_destroy()
57 pthread_mutex_unlock(&set->lock); in uid_set_destroy()
58 pthread_mutex_destroy(&set->lock); in uid_set_destroy()
83 pthread_mutex_lock(&set->lock); in uid_set_add_tx()
86 pthread_mutex_unlock(&set->lock); in uid_set_add_tx()
94 pthread_mutex_lock(&set->lock); in uid_set_add_rx()
97 pthread_mutex_unlock(&set->lock); in uid_set_add_rx()
101 pthread_mutex_lock(&set->lock); in uid_set_read_and_clear()
[all …]
Dbtif_sock_sco.c87 static pthread_mutex_t lock; variable
99 pthread_mutex_init(&lock, NULL); in btsock_sco_init()
110 pthread_mutex_destroy(&lock); in btsock_sco_cleanup()
117 pthread_mutex_lock(&lock); in btsock_sco_listen()
125 pthread_mutex_unlock(&lock); in btsock_sco_listen()
134 pthread_mutex_lock(&lock); in btsock_sco_connect()
136 pthread_mutex_unlock(&lock); in btsock_sco_connect()
221 pthread_mutex_lock(&lock); in connection_request_cb()
262 pthread_mutex_unlock(&lock); in connection_request_cb()
266 pthread_mutex_unlock(&lock); in connection_request_cb()
[all …]
/system/bt/service/
Dgatt_server_old.cpp122 std::mutex lock; member
153 std::lock_guard<std::mutex> lock(g_internal->lock); in ServiceAddedCallback() local
164 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestReadCallback() local
214 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestWriteCallback() local
273 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestExecWriteCallback() local
304 std::lock_guard<std::mutex> lock(g_internal->lock); in CharacteristicAddedCallback() local
369 std::lock_guard<std::mutex> lock(g_internal->lock); in ListenCallback() local
378 std::lock_guard<std::mutex> lock(g_internal->lock); in ServiceStoppedCallback() local
385 std::lock_guard<std::mutex> lock(g_internal->lock); in ScanResultCallback() local
549 std::unique_lock<std::mutex> lock(internal_->lock); in Initialize() local
[all …]
Dadapter.cpp91 lock_guard<mutex> lock(observers_lock_); in AddObserver() local
96 lock_guard<mutex> lock(observers_lock_); in RemoveObserver() local
191 lock_guard<mutex> lock(local_le_features_lock_); in IsMultiAdvertisementSupported() local
196 lock_guard<mutex> lock(connected_devices_lock_); in IsDeviceConnected() local
201 lock_guard<mutex> lock(local_le_features_lock_); in GetTotalNumberOfTrackableAdvertisements() local
206 lock_guard<mutex> lock(local_le_features_lock_); in IsOffloadedFilteringSupported() local
211 lock_guard<mutex> lock(local_le_features_lock_); in IsOffloadedScanBatchingSupported() local
278 lock_guard<mutex> lock(local_le_features_lock_); in AdapterPropertiesCallback() local
317 lock_guard<mutex> lock(connected_devices_lock_); in AclStateChangedCallback() local
324 lock_guard<mutex> lock(observers_lock_); in AclStateChangedCallback() local
[all …]
/system/bt/service/hal/
Dbluetooth_gatt_interface.cpp74 shared_lock<shared_timed_mutex> lock(g_instance_lock); in RegisterClientCallback() local
84 shared_lock<shared_timed_mutex> lock(g_instance_lock); in ScanResultCallback() local
96 shared_lock<shared_timed_mutex> lock(g_instance_lock); in ConnectCallback() local
111 shared_lock<shared_timed_mutex> lock(g_instance_lock); in DisconnectCallback() local
124 shared_lock<shared_timed_mutex> lock(g_instance_lock); in SearchCompleteCallback() local
134 shared_lock<shared_timed_mutex> lock(g_instance_lock); in RegisterForNotificationCallback() local
146 shared_lock<shared_timed_mutex> lock(g_instance_lock); in NotifyCallback() local
160 shared_lock<shared_timed_mutex> lock(g_instance_lock); in WriteCharacteristicCallback() local
172 shared_lock<shared_timed_mutex> lock(g_instance_lock); in WriteDescriptorCallback() local
183 shared_lock<shared_timed_mutex> lock(g_instance_lock); in ListenCallback() local
[all …]
Dbluetooth_interface.cpp69 shared_lock<shared_timed_mutex> lock(g_instance_lock); in AdapterStateChangedCallback() local
78 shared_lock<shared_timed_mutex> lock(g_instance_lock); in AdapterPropertiesCallback() local
90 shared_lock<shared_timed_mutex> lock(g_instance_lock); in RemoteDevicePropertiesCallback() local
101 shared_lock<shared_timed_mutex> lock(g_instance_lock); in DiscoveryStateChangedCallback() local
109 shared_lock<shared_timed_mutex> lock(g_instance_lock); in PinRequestCallback() local
121 shared_lock<shared_timed_mutex> lock(g_instance_lock); in SSPRequestCallback() local
136 shared_lock<shared_timed_mutex> lock(g_instance_lock); in BondStateChangedCallback() local
148 shared_lock<shared_timed_mutex> lock(g_instance_lock); in AclStateChangedCallback() local
237 shared_lock<shared_timed_mutex> lock(g_instance_lock); in AddObserver() local
242 shared_lock<shared_timed_mutex> lock(g_instance_lock); in RemoveObserver() local
[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()
/system/weaved/buffet/
Dbinder_command_proxy.cc42 auto command = command_.lock(); in getId()
50 auto command = command_.lock(); in getName()
59 auto command = command_.lock(); in getComponent()
67 auto command = command_.lock(); in getState()
76 auto command = command_.lock(); in getOrigin()
85 auto command = command_.lock(); in getParameters()
94 auto command = command_.lock(); in getProgress()
103 auto command = command_.lock(); in getResults()
112 auto command = command_.lock(); in setProgress()
126 auto command = command_.lock(); in complete()
[all …]
/system/nativepower/daemon/
Dpower_manager.cc61 const sp<IBinder>& lock, in acquireWakeLock() argument
65 return AddWakeLockRequest(lock, tag, packageName, in acquireWakeLock()
72 const sp<IBinder>& lock, in acquireWakeLockWithUid() argument
77 return AddWakeLockRequest(lock, tag, packageName, static_cast<uid_t>(uid)) in acquireWakeLockWithUid()
82 status_t PowerManager::releaseWakeLock(const sp<IBinder>& lock, in releaseWakeLock() argument
85 return wake_lock_manager_->RemoveRequest(lock) ? OK : UNKNOWN_ERROR; in releaseWakeLock()
88 status_t PowerManager::updateWakeLockUids(const sp<IBinder>& lock, in updateWakeLockUids() argument
92 NOTIMPLEMENTED() << "updateWakeLockUids: lock=" << lock.get() in updateWakeLockUids()
165 bool PowerManager::AddWakeLockRequest(const sp<IBinder>& lock, in AddWakeLockRequest() argument
169 return wake_lock_manager_->AddRequest(lock, String8(tag).string(), in AddWakeLockRequest()
DBnPowerManager.cc33 sp<IBinder> lock = data.readStrongBinder(); in onTransact() local
38 return acquireWakeLock(flags, lock, tag, package_name); in onTransact()
42 sp<IBinder> lock = data.readStrongBinder(); in onTransact() local
47 return acquireWakeLockWithUid(flags, lock, tag, package_name, uid); in onTransact()
51 sp<IBinder> lock = data.readStrongBinder(); in onTransact() local
53 return releaseWakeLock(lock, flags); in onTransact()
57 sp<IBinder> lock = data.readStrongBinder(); in onTransact() local
59 return updateWakeLockUids(lock, 0, nullptr); in onTransact()
Dpower_manager_stub.cc75 const sp<IBinder>& lock, in acquireWakeLock() argument
79 CHECK(wake_lock_manager_->AddRequest(lock, String8(tag).string(), in acquireWakeLock()
86 const sp<IBinder>& lock, in acquireWakeLockWithUid() argument
91 CHECK(wake_lock_manager_->AddRequest(lock, String8(tag).string(), in acquireWakeLockWithUid()
97 status_t PowerManagerStub::releaseWakeLock(const sp<IBinder>& lock, in releaseWakeLock() argument
100 CHECK(wake_lock_manager_->RemoveRequest(lock)); in releaseWakeLock()
104 status_t PowerManagerStub::updateWakeLockUids(const sp<IBinder>& lock, in updateWakeLockUids() argument
Dpower_manager.h67 const sp<IBinder>& lock,
72 const sp<IBinder>& lock,
77 status_t releaseWakeLock(const sp<IBinder>& lock,
80 status_t updateWakeLockUids(const sp<IBinder>& lock,
92 bool AddWakeLockRequest(const sp<IBinder>& lock,
/system/extras/tests/tcp_nuke_addr/
Dtcp_nuke_addr_test.cpp70 void killSockets(sockaddr_in listenaddr, int intervalMs, android::RWLock *lock) { in killSockets() argument
80 lock->writeLock(); in killSockets()
84 lock->unlock(); in killSockets()
92 android::RWLock *lock, std::atomic<unsigned int> *attempts) { in connectLoop() argument
100 lock->readLock(); in connectLoop()
102 lock->unlock(); in connectLoop()
137 android::RWLock lock; in main() local
141 std::thread t0(killSockets, sin, KILL_INTERVAL_MS, &lock); in main()
144 connectThreads[i] = new std::thread(connectLoop, sin, listensock, &lock, &attempts); in main()
/system/netd/server/
DNetworkController.cpp145 android::RWLock::AutoRLock lock(mRWLock); in getDefaultNetwork() local
150 android::RWLock::AutoWLock lock(mRWLock); in setDefaultNetwork() local
187 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForDns() local
226 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForUser() local
248 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForConnect() local
299 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForInterface() local
309 android::RWLock::AutoRLock lock(mRWLock); in isVirtualNetwork() local
333 android::RWLock::AutoWLock lock(mRWLock); in createPhysicalNetwork() local
349 android::RWLock::AutoWLock lock(mRWLock); in createVirtualNetwork() local
369 android::RWLock::AutoWLock lock(mRWLock); in destroyNetwork() local
[all …]
/system/bt/service/ipc/binder/
Dbluetooth_gatt_server_binder_server.cpp59 std::lock_guard<std::mutex> lock(*maps_lock()); in BeginServiceDeclaration() local
85 std::lock_guard<std::mutex> lock(*maps_lock()); in AddCharacteristic() local
110 std::lock_guard<std::mutex> lock(*maps_lock()); in AddDescriptor() local
132 std::lock_guard<std::mutex> lock(*maps_lock()); in EndServiceDeclaration() local
152 std::lock_guard<std::mutex> lock(*maps_lock()); in EndServiceDeclaration() local
176 std::lock_guard<std::mutex> lock(*maps_lock()); in SendResponse() local
196 std::lock_guard<std::mutex> lock(*maps_lock()); in SendNotification() local
214 std::lock_guard<std::mutex> lock(*maps_lock()); in SendNotification() local
240 std::lock_guard<std::mutex> lock(*maps_lock()); in OnCharacteristicReadRequest() local
258 std::lock_guard<std::mutex> lock(*maps_lock()); in OnDescriptorReadRequest() local
[all …]
Dbluetooth_low_energy_binder_server.cpp63 std::lock_guard<std::mutex> lock(*maps_lock()); in Connect() local
78 std::lock_guard<std::mutex> lock(*maps_lock()); in Disconnect() local
95 std::lock_guard<std::mutex> lock(*maps_lock()); in SetMtu() local
111 std::lock_guard<std::mutex> lock(*maps_lock()); in StartScan() local
124 std::lock_guard<std::mutex> lock(*maps_lock()); in StopScan() local
141 std::lock_guard<std::mutex> lock(*maps_lock()); in StartMultiAdvertising() local
160 std::lock_guard<std::mutex> lock(*maps_lock()); in StartMultiAdvertising() local
182 std::lock_guard<std::mutex> lock(*maps_lock()); in StopMultiAdvertising() local
207 std::lock_guard<std::mutex> lock(*maps_lock()); in StopMultiAdvertising() local
255 std::lock_guard<std::mutex> lock(*maps_lock()); in OnScanResult() local
/system/nativepower/client/
Dwake_lock_unittest.cc55 std::unique_ptr<WakeLock> lock(client_.CreateWakeLock("foo", "bar")); in TEST_F() local
62 lock.reset(); in TEST_F()
67 std::unique_ptr<WakeLock> lock(client_.CreateWakeLock("foo", "bar")); in TEST_F() local
72 lock.reset(); in TEST_F()
/system/core/adb/sysdeps/
Dmutex.h46 void lock() { in lock() function
72 void lock() { in lock() function
73 mutex_.lock(); in lock()
/system/sepolicy/
Dglobal_macros22 define(`r_file_perms', `{ getattr open read ioctl lock }')
23 define(`w_file_perms', `{ open append write lock }')
30 define(`r_dir_perms', `{ open getattr read search ioctl lock }')
31 define(`w_dir_perms', `{ open search write add_name remove_name lock }')
43 define(`rw_socket_perms', `{ ioctl read getattr write setattr lock append bind connect getopt setop…
/system/core/include/utils/
DMutex.h60 status_t lock();
80 inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); } in Autolock()
81 inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); } in Autolock()
126 inline status_t Mutex::lock() { in lock() function

1234