Home
last modified time | relevance | path

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

12

/tools/netsim/rust/daemon/src/
Dsession.rs92 let mut lock = info.write().expect("Could not acquire session lock"); in start() localVariable
96 update_session_duration(&mut lock); in start()
101 lock.current_device_count -= 1; in start()
106 lock.current_device_count += 1; in start()
107 let current_device_count = lock.current_device_count; in start()
109 let device_count = lock.stats_proto.device_count(); in start()
110 lock.stats_proto.set_device_count(device_count + 1); in start()
112 if current_device_count > lock.stats_proto.peak_concurrent_devices() in start()
114 lock.stats_proto in start()
128 lock.stats_proto.radio_stats.push(r); in start()
[all …]
Devents.rs29 get_events().lock().expect("Failed to acquire lock on events").publish(event); in publish()
34 get_events().lock().expect("Failed to acquire locks on events").subscribe() in subscribe()
152 s.lock().unwrap().publish(msg); in publish()
156 s.lock().unwrap().subscribe() in subscribe()
172 let rx = events_clone.lock().unwrap().subscribe(); in test_subscribe_and_publish()
181 events.lock().unwrap().publish(Event::DeviceAdded(DeviceAdded { in test_subscribe_and_publish()
199 let rx = events_clone.lock().unwrap().subscribe(); in test_publish_to_multiple_subscribers()
210 events.lock().unwrap().publish(Event::DeviceAdded(DeviceAdded { in test_publish_to_multiple_subscribers()
228 let rx = events.lock().unwrap().subscribe(); in test_publish_to_dropped_subscriber()
229 assert_eq!(events.lock().unwrap().subscribers.len(), 1); in test_publish_to_dropped_subscriber()
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/cluster/
DClusterEventUploaderFuncTest.java45 final Lock lock = new ReentrantLock(); in testPostCommandEvent_multipleThread() local
52 lock.lock(); in testPostCommandEvent_multipleThread()
54 lock.unlock(); in testPostCommandEvent_multipleThread()
79 lock.lock(); in testPostCommandEvent_multipleThread()
86 lock.unlock(); in testPostCommandEvent_multipleThread()
/tools/external_updater/
Dregen_bp.sh36 [ ! -f Cargo.lock ] || mv Cargo.lock Cargo.lock.saved
46 rm -rf target.tmp cargo.metadata cargo.out Cargo.lock
48 [ ! -f Cargo.lock.saved ] || mv Cargo.lock.saved Cargo.lock
/tools/netsim/src/util/
Dblocking_queue.h56 std::unique_lock<std::mutex> lock(this->mutex); in Stop()
69 std::unique_lock<std::mutex> lock(this->mutex); in Push()
82 std::unique_lock<std::mutex> lock(this->mutex); in Push()
96 std::unique_lock<std::mutex> lock(this->mutex); in WaitAndPop()
97 this->condition.wait(lock, in WaitAndPop()
/tools/asuite/adevice/src/
Dprogress.rs26 while !*is_complete.lock().unwrap() { in start()
30 format!(" {:01}:{:02} {}", minutes, seconds, message_ref.lock().unwrap()); in start()
40 let mut complete = PROGRESS.is_complete.lock().unwrap(); in start()
46 let mut is_complete = self.is_complete.lock().unwrap(); in stop()
55 let mut new_message = PROGRESS.message.lock().unwrap(); in update()
/tools/tradefederation/core/src/com/android/tradefed/device/
DManagedDeviceList.java116 mListLock.lock(); in getCopy()
130 mListLock.lock(); in size()
154 mListLock.lock();
201 mListLock.lock();
237 mListLock.lock();
272 mListLock.lock();
303 mListLock.lock();
329 mListLock.lock();
351 mListLock.lock();
365 mListLock.lock();
[all …]
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DConditionPriorityBlockingQueue.java135 mLock.lock(); in poll()
287 mLock.lock(); in add()
308 mLock.lock(); in clear()
328 mLock.lock(); in getCopy()
346 mLock.lock(); in contains()
358 mLock.lock(); in size()
374 mLock.lock(); in remove()
390 mLock.lock(); in addUnique()
/tools/netsim/rust/daemon/src/wireless/
Dbluetooth.rs72 let _guard = WIRELESS_BT_MUTEX.lock().expect("Failed to lock WIRELESS_BT_MUTEX"); in patch_state()
85 let _guard = WIRELESS_BT_MUTEX.lock().expect("Failed to acquire lock on WIRELESS_BT_MUTEX"); in drop()
87 BLUETOOTH_INVALID_PACKETS.lock().expect("invalid packets").remove(&self.rootcanal_id); in drop()
94 let _guard = WIRELESS_BT_MUTEX.lock().expect("Failed to acquire lock on WIRELESS_BT_MUTEX"); in handle_request()
99 let _guard = WIRELESS_BT_MUTEX.lock().expect("Failed to acquire lock on WIRELESS_BT_MUTEX"); in reset()
145 .lock() in get_stats()
176 let _guard = WIRELESS_BT_MUTEX.lock().expect("Failed to acquire lock on WIRELESS_BT_MUTEX"); in new()
189 BLUETOOTH_INVALID_PACKETS.lock().expect("invalid packets").insert(rootcanal_id, Vec::new()); in new()
213 match BLUETOOTH_INVALID_PACKETS.lock().unwrap().get_mut(&rootcanal_id) { in report_invalid_packet()
/tools/netsim/rust/daemon/src/uwb/
Dranging_estimator.rs38 fn lock(&self) -> MutexGuard<State> { in lock() method
39 self.0.lock().expect("Poisoned SharedState lock") in lock()
43 self.lock().get(pica_id).ok_or(anyhow::anyhow!("pica_id: {pica_id} not in State")).cloned() in get_chip_id()
47 self.lock().insert(pica_id, chip_id); in insert()
51 self.lock().remove(pica_id); in remove()
/tools/tradefederation/core/src/com/android/tradefed/build/
DFileDownloadCache.java124 mCacheMapLock.lock(); in FileDownloadCache()
197 fLock = FileChannel.open(f.toPath(), StandardOpenOption.WRITE).lock(); in lockFile()
214 fileLock.lock(); in lockFile()
294 mCacheMapLock.lock(); in setMaxCacheSize()
343 mCacheMapLock.lock(); in internalfetchRemoteFile()
461 mCacheMapLock.lock(); in incrementAndAdjustCache()
508 mCacheMapLock.lock(); in getCachedFile()
537 mCacheMapLock.lock(); in getOldestEntry()
566 mCacheMapLock.lock(); in deleteCacheEntry()
/tools/repohooks/rh/
Dutils.py229 lock = getattr(self, '_waitpid_lock', None)
230 if lock is not None and lock.locked():
232 lock.release()
235 if not lock.locked():
236 lock.acquire()
/tools/netsim/src/backend/
Dgrpc_client.cc66 std::unique_lock<std::mutex> lock(mutex_); in StreamPackets() local
95 std::unique_lock<std::mutex> lock(mutex_); in ReadPacketResponseLoop() local
123 std::unique_lock<std::mutex> lock(mutex_); in WritePacketRequest() local
/tools/acloud/internal/lib/
Dlocal_instance_lock_test.py69 lock = local_instance_lock.LocalInstanceLock(self._lock_path)
70 self.assertTrue(lock.Lock(timeout_secs=0))
75 lock.Unlock()
/tools/test/openhst/
Dstress_test.py187 def ScanForEvent(self, line, lock=None): argument
193 if lock: lock.acquire()
195 if lock: lock.release()
222 self.lock = threading.Lock()
241 self.lock.acquire()
245 self.lock.release()
253 self.lock.acquire()
256 self.lock.release()
297 event.ScanForEvent(line, lock=self.lock)
310 self.lock.acquire()
[all …]
/tools/netsim/rust/common/src/system/
Dmod.rs70 let _locked = ENV_MUTEX.lock(); in test_forge()
79 let _locked = ENV_MUTEX.lock(); in test_non_forge()
/tools/netsim/rust/daemon/src/transport/
Dwebsocket.rs81 .lock() in response()
168 .lock() in run_websocket_transport()
177 .lock() in run_websocket_transport()
/tools/netsim/rust/daemon/src/captures/
Dcaptures_handler.rs85 .lock() in handle_capture_get()
130 capture.lock().expect("Failed to acquire lock on CaptureInfo").get_capture_proto(), in handle_capture_list()
152 .map(|arc_capture| arc_capture.lock().expect("Failed to acquire lock on CaptureInfo")) in handle_capture_patch()
250 .map(|arc_capture| arc_capture.lock().expect("Failed to acquire lock on CaptureInfo")) in handle_packet()
/tools/netsim/
D.gitignore11 **/Cargo.lock
/tools/acloud/delete/
Ddelete.py174 lock = instance.GetLock()
175 if not lock.Lock():
182 lock.SetInUse(False)
193 lock.Unlock()
/tools/test/connectivity/acts/framework/acts/controllers/
Darduino_wifi_dongle.py140 self.lock = threading.Lock()
254 with self.lock:
273 with self.lock:
/tools/asuite/
D.gitignore10 adevice/Cargo.lock
/tools/netsim/rust/
DCMakeLists.txt3 # Delete any old Cargo.lock files
4 file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/Cargo.lock)
/tools/netsim/scripts/
Dproto_update.sh82 rm rust/Cargo.lock
/tools/netsim/rust/daemon/src/bluetooth/
Dbeacon.rs139 .lock() in send_link_layer_le_packet()
163 let mut beacon = beacon.unwrap().lock().expect("Failed to acquire lock on BeaconChip"); in tick()
211 let beacon = beacon.unwrap().lock().expect("Failed to acquire lock on BeaconChip"); in receive_link_layer_packet()
357 .lock() in ble_beacon_get()

12