Home
last modified time | relevance | path

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

12345678910>>...24

/frameworks/base/services/core/java/com/android/server/
DLockGuard.java95 private static LockInfo findOrCreateLockInfo(Object lock) { in findOrCreateLockInfo() argument
96 LockInfo info = sKnown.get(lock); in findOrCreateLockInfo()
99 info.label = "0x" + Integer.toHexString(System.identityHashCode(lock)) + " [" in findOrCreateLockInfo()
101 sKnown.put(lock, info); in findOrCreateLockInfo()
111 public static Object guard(Object lock) { in guard() argument
113 if (lock == null || Thread.holdsLock(lock)) return lock; in guard()
117 final LockInfo info = findOrCreateLockInfo(lock); in guard()
123 doLog(lock, "Calling thread " + Thread.currentThread().getName() in guard()
125 + lockToString(lock)); in guard()
135 if (test == null || test == lock) continue; in guard()
[all …]
/frameworks/base/core/java/android/hardware/camera2/legacy/
DCaptureCollector.java322 final ReentrantLock lock = this.mLock; in queueRequest() local
323 lock.lock(); in queueRequest()
361 lock.unlock(); in queueRequest()
375 final ReentrantLock lock = this.mLock; in waitForEmpty() local
376 lock.lock(); in waitForEmpty()
386 lock.unlock(); in waitForEmpty()
400 final ReentrantLock lock = this.mLock; in waitForPreviewsEmpty() local
401 lock.lock(); in waitForPreviewsEmpty()
411 lock.unlock(); in waitForPreviewsEmpty()
434 final ReentrantLock lock = this.mLock; in waitForRequestCompleted() local
[all …]
/frameworks/base/cmds/statsd/tests/utils/
DMultiConditionTrigger_test.cpp39 mutex lock; in TEST() local
44 MultiConditionTrigger trigger(conditionNames, [&lock, &cv, &triggerCalled] { in TEST()
46 lock_guard lg(lock); in TEST()
65 unique_lock<mutex> unique_lk(lock); in TEST()
80 mutex lock; in TEST() local
84 MultiConditionTrigger trigger({}, [&lock, &cv, &triggerCalled] { in TEST()
86 lock_guard lg(lock); in TEST()
92 unique_lock<mutex> unique_lk(lock); in TEST()
102 mutex lock; in TEST() local
106 MultiConditionTrigger trigger(conditionNames, [&lock, &cv, &triggerCalled] { in TEST()
[all …]
/frameworks/base/libs/hwui/thread/
DCommonPool.cpp62 std::unique_lock lock(mLock); in enqueue() local
64 lock.unlock(); in enqueue()
66 lock.lock(); in enqueue()
75 std::unique_lock lock(mLock); in workerLoop() local
79 mCondition.wait(lock); in workerLoop()
86 lock.unlock(); in workerLoop()
88 lock.lock(); in workerLoop()
98 std::unique_lock lock(mLock); in doWaitForIdle() local
100 lock.unlock(); in doWaitForIdle()
102 lock.lock(); in doWaitForIdle()
/frameworks/av/media/libmediaplayerservice/
DMediaRecorderClient.cpp60 Mutex::Autolock lock(mLock); in setInputSurface() local
71 Mutex::Autolock lock(mLock); in querySurfaceMediaSource() local
85 Mutex::Autolock lock(mLock); in setCamera() local
96 Mutex::Autolock lock(mLock); in setPreviewSurface() local
111 Mutex::Autolock lock(mLock); in setVideoSource() local
134 Mutex::Autolock lock(mLock); in setAudioSource() local
145 Mutex::Autolock lock(mLock); in setPrivacySensitive() local
155 Mutex::Autolock lock(mLock); in isPrivacySensitive() local
168 Mutex::Autolock lock(mLock); in setOutputFormat() local
179 Mutex::Autolock lock(mLock); in setVideoEncoder() local
[all …]
/frameworks/base/tools/lock_agent/java/com/android/lock_checker/
DOnThreadLockChecker.java131 public void pre(Object lock) { in pre() argument
132 handlePre(Thread.currentThread(), lock); in pre() local
136 public void post(Object lock) { in post() argument
137 handlePost(Thread.currentThread(), lock); in post() local
140 private void handlePre(Thread self, Object lock) { in handlePre() argument
145 heldLocks.add(lock); in handlePre()
155 LockPair tmp = new LockPair(lock, lock); in handlePre()
160 if (SKIP_RECURSIVE && lock == alreadyHeld) { in handlePre()
165 tmp.set(alreadyHeld, lock); in handlePre()
175 tmp.set(lock, alreadyHeld); in handlePre()
[all …]
/frameworks/native/services/surfaceflinger/
DBufferLayerConsumer.cpp89 Mutex::Autolock lock(mMutex); in setDefaultBufferSize() local
101 Mutex::Autolock lock(mMutex); in setContentsChangedListener() local
110 Mutex::Autolock lock(mMutex); in updateTexImage() local
171 Mutex::Autolock lock(mMutex); in bindTextureImage() local
199 Mutex::Autolock lock(mMutex); in releasePendingBuffer() local
210 Mutex::Autolock lock(mMutex); in getPrevFinalReleaseFence() local
224 std::lock_guard<std::mutex> lock(mImagesMutex); in acquireBufferLocked() local
252 std::lock_guard<std::mutex> lock(mImagesMutex); in updateAndReleaseLocked() local
307 Mutex::Autolock lock(mMutex); in getTransformMatrix() local
312 Mutex::Autolock lock(mMutex); in setFilteringEnabled() local
[all …]
DSurfaceTracing.cpp49 std::scoped_lock lock(mSfLock); in addFirstEntry() local
56 std::unique_lock<std::mutex> lock(mSfLock); in traceWhenNotified() local
57 mCanStartTrace.wait(lock); in traceWhenNotified()
62 lock.unlock(); in traceWhenNotified()
67 std::scoped_lock lock(mTraceLock); in addTraceToBuffer() local
77 std::scoped_lock lock(mSfLock); in notify() local
91 std::scoped_lock lock(mTraceLock); in writeToFileAsync() local
128 std::scoped_lock lock(mTraceLock); in enable() local
143 std::scoped_lock lock(mTraceLock); in writeToFile() local
151 std::scoped_lock lock(mTraceLock); in disable() local
[all …]
/frameworks/native/cmds/surfacereplayer/replayer/
DBufferQueueScheduler.cpp31 std::unique_lock<std::mutex> lock(mMutex); in startScheduling() local
33 mCondition.wait(lock, [&] { return (mSurfaceControl != nullptr); }); in startScheduling()
43 lock.unlock(); in startScheduling()
48 lock.lock(); in startScheduling()
51 mCondition.wait(lock); in startScheduling()
56 std::lock_guard<std::mutex> lock(mMutex); in addEvent() local
62 std::lock_guard<std::mutex> lock(mMutex); in stopScheduling() local
69 std::lock_guard<std::mutex> lock(mMutex); in setSurfaceControl() local
84 status_t status = s->lock(&outBuffer, nullptr); in fillSurface()
/frameworks/av/services/camera/libcameraservice/device3/
DCamera3OutputStreamInterface.cpp35 std::lock_guard<std::mutex> lock(mLock); in add() local
40 std::lock_guard<std::mutex> lock(mLock); in remove() local
45 std::lock_guard<std::mutex> lock(mLock); in get() local
54 std::lock_guard<std::mutex> lock(mLock); in operator []() local
59 std::lock_guard<std::mutex> lock(mLock); in size() local
64 std::lock_guard<std::mutex> lock(mLock); in clear() local
69 std::lock_guard<std::mutex> lock(mLock); in getStreamIds() local
78 std::lock_guard<std::mutex> lock(other.mLock); in StreamSet() local
DBufferUtils.cpp43 std::lock_guard<std::mutex> lock(mInflightLock); in takeInflightBufferMap() local
53 std::lock_guard<std::mutex> lock(mRequestedBuffersLock); in takeRequestedBufferMap() local
63 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in takeBufferCaches() local
75 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in getBufferId() local
90 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in tryCreateBufferCache() local
97 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in removeInactiveBufferCaches() local
110 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in removeOneBufferCache() local
135 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in clearBufferCaches() local
152 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in isStreamCached() local
158 std::lock_guard<std::mutex> lock(mBufferIdMapLock); in verifyBufferIds() local
[all …]
/frameworks/av/drm/libdrmframework/plugins/common/util/include/
DSessionMap.h37 Mutex::Autolock lock(mLock); in ~SessionMap()
51 Mutex::Autolock lock(mLock); in addValue()
67 Mutex::Autolock lock(mLock); in getValue()
77 Mutex::Autolock lock(mLock); in getSize()
90 Mutex::Autolock lock(mLock); in getValueAt()
105 Mutex::Autolock lock(mLock); in removeValue()
118 Mutex::Autolock lock(mLock); in isCreated()
123 Mutex::Autolock lock(mLock);
/frameworks/native/libs/vr/libpdx/
Dservice.cpp27 auto svc = service_.lock();
52 auto svc = service_.lock(); in Destroy()
79 if (auto svc = service_.lock()) { in ReadVector()
89 if (auto svc = service_.lock()) { in ReadVectorAll()
107 if (auto svc = service_.lock()) { in Read()
118 if (auto svc = service_.lock()) { in WriteVector()
128 if (auto svc = service_.lock()) { in WriteVectorAll()
146 if (auto svc = service_.lock()) { in Write()
156 if (auto svc = service_.lock()) { in PushFileHandle()
165 if (auto svc = service_.lock()) { in PushFileHandle()
[all …]
/frameworks/base/cmds/statsd/src/metrics/
DMetricProducer.h151 std::lock_guard<std::mutex> lock(mMutex); in notifyAppUpgrade()
164 std::lock_guard<std::mutex> lock(mMutex); in onStatsdInitCompleted()
169 std::lock_guard<std::mutex> lock(mMutex); in onMatchedLogEvent()
174 std::lock_guard<std::mutex> lock(mMutex); in onConditionChanged()
179 std::lock_guard<std::mutex> lock(mMutex); in onSlicedConditionMayChange()
184 std::lock_guard<std::mutex> lock(mMutex); in isConditionSliced()
200 std::lock_guard<std::mutex> lock(mMutex); in onDumpReport()
206 std::lock_guard<std::mutex> lock(mMutex); in clearPastBuckets()
211 std::lock_guard<std::mutex> lock(mMutex); in prepareFirstBucket()
218 std::lock_guard<std::mutex> lock(mMutex); in byteSize()
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_power_PowerManagerService.cpp148 std::lock_guard<std::mutex> lock(gPowerHalMutex); in getPowerHalHidlV1_0() local
159 std::lock_guard<std::mutex> lock(gPowerHalMutex); in getPowerHalHidlV1_1() local
172 gPowerHalMutex.lock(); in processPowerHalReturn()
217 std::unique_lock<std::mutex> lock(gPowerHalMutex); in setPowerBoost() local
223 lock.unlock(); in setPowerBoost()
256 std::unique_lock<std::mutex> lock(gPowerHalMutex); in setPowerMode() local
262 lock.unlock(); in setPowerMode()
267 std::unique_lock<std::mutex> lock(gPowerHalMutex); in sendPowerHint() local
273 lock.unlock(); in sendPowerHint()
280 lock.unlock(); in sendPowerHint()
[all …]
/frameworks/base/core/java/android/net/
DDnsResolver.java194 final Object lock = new Object(); in rawQuery() local
204 synchronized (lock) { in rawQuery()
205 registerFDListener(executor, queryfd, callback, cancellationSignal, lock); in rawQuery()
207 addCancellationSignal(cancellationSignal, queryfd, lock); in rawQuery()
235 final Object lock = new Object(); in rawQuery() local
244 synchronized (lock) { in rawQuery()
245 registerFDListener(executor, queryfd, callback, cancellationSignal, lock); in rawQuery()
247 addCancellationSignal(cancellationSignal, queryfd, lock); in rawQuery()
343 final Object lock = new Object(); in query() local
400 synchronized (lock) { in query()
[all …]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DBackingStore.java85 return lockBacking(mode, accessFormat).lock(accessFormat); in lockData()
93 lock(backing, mode); in lockBacking()
296 private void lock(Backing backingToLock, int mode) { in lock() method in BackingStore
347 public abstract Object lock(int accessType); in lock() method in BackingStore.Backing
437 mObject = backing.lock(ACCESS_OBJECT); in syncTo()
441 mObject = backing.lock(ACCESS_BITMAP); in syncTo()
451 public Object lock(int accessType) { in lock() method in BackingStore.ObjectBacking
510 mBitmap = (Bitmap) backing.lock(ACCESS_BITMAP); in syncTo()
513 ByteBuffer buffer = (ByteBuffer) backing.lock(ACCESS_BYTES); in syncTo()
518 RenderTarget renderTarget = (RenderTarget) backing.lock(ACCESS_RENDERTARGET); in syncTo()
[all …]
/frameworks/base/libs/hwui/hwui/
DAnimatedImageDrawable.cpp77 std::unique_lock lock{mSwapLock}; in isDirty() local
91 lock.unlock(); in isDirty()
109 std::unique_lock lock{mImageLock}; in decodeNextFrame() local
121 std::unique_lock lock{mImageLock}; in reset() local
157 std::unique_lock lock{mImageLock}; in onDraw() local
173 std::unique_lock lock{mSwapLock}; in onDraw() local
230 std::unique_lock lock{mImageLock}; in drawStaging() local
239 std::unique_lock lock{mImageLock}; in drawStaging() local
244 std::unique_lock lock{mSwapLock}; in drawStaging() local
254 std::unique_lock lock{mSwapLock}; in drawStaging() local
[all …]
/frameworks/base/media/jni/soundpool/
DSoundDecoder.cpp52 std::lock_guard lock(mLock); in quit() local
63 std::unique_lock lock(mLock); in run() local
68 lock, std::chrono::duration<int32_t, std::milli>(kWaitTimeBeforeCloseMs)); in run()
78 lock.unlock(); in run()
86 lock.lock(); in run()
96 std::unique_lock lock(mLock); in loadSound() local
100 mQueueSpaceAvailable.wait(lock); in loadSound()
DStream.cpp34 std::lock_guard lock(mLock); in autoPause() local
47 std::lock_guard lock(mLock); in autoResume() local
62 std::lock_guard lock(mLock); in mute() local
75 std::lock_guard lock(mLock); in pause() local
89 std::lock_guard lock(mLock); in resume() local
104 std::lock_guard lock(mLock); in setRate() local
125 std::lock_guard lock(mLock); in setVolume() local
133 std::lock_guard lock(mLock); in setPriority() local
141 std::lock_guard lock(mLock); in setLoop() local
157 std::lock_guard lock(mLock); in setPlay() local
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DMediaPlayerStateUnitTestTemplate.java52 private final Object lock = new Object(); field in MediaPlayerStateUnitTestTemplate
83 synchronized(lock) { in runTestOnMethod()
85 lock.wait(WAIT_FOR_COMMAND_TO_COMPLETE); in runTestOnMethod()
118 synchronized(lock) { in initializeMessageLooper()
124 lock.notify(); in initializeMessageLooper()
132 synchronized(lock) { in initializeMessageLooper()
136 lock.notify(); in initializeMessageLooper()
140 synchronized(lock) { in initializeMessageLooper()
142 lock.notify(); in initializeMessageLooper()
159 synchronized(lock) { in callMediaPlayerMethodUnderTestInState()
[all …]
/frameworks/av/media/bufferpool/2.0/
DObserver.cpp34 std::unique_lock<std::mutex> lock(mLock); in onMessage() local
37 const std::shared_ptr<BufferPoolClient> client = it->second.lock(); in onMessage()
41 lock.unlock(); in onMessage()
50 std::lock_guard<std::mutex> lock(mLock); in addClient() local
52 if (!it->second.lock() || it->first == connectionId) { in addClient()
63 std::lock_guard<std::mutex> lock(mLock); in delClient() local
/frameworks/base/cmds/statsd/src/guardrail/
DStatsdStats.cpp145 lock_guard<std::mutex> lock(mLock); in noteConfigReceived() local
183 lock_guard<std::mutex> lock(mLock); in noteConfigRemoved() local
195 lock_guard<std::mutex> lock(mLock); in noteConfigReset() local
201 lock_guard<std::mutex> lock(mLock); in noteLogLost() local
213 lock_guard<std::mutex> lock(mLock); in noteBroadcastSent() local
230 lock_guard<std::mutex> lock(mLock); in noteActiveStatusChanged() local
249 lock_guard<std::mutex> lock(mLock); in noteActivationBroadcastGuardrailHit() local
262 lock_guard<std::mutex> lock(mLock); in noteEventQueueOverflow() local
278 lock_guard<std::mutex> lock(mLock); in noteDataDropped() local
298 lock_guard<std::mutex> lock(mLock); in noteMetricsReportSent() local
[all …]
/frameworks/av/camera/ndk/ndk_vendor/tests/
DACameraManagerTest.cpp42 std::lock_guard<std::mutex> lock(thiz->mMutex); in onAvailable() local
54 std::lock_guard<std::mutex> lock(thiz->mMutex); in onUnavailable() local
71 std::lock_guard<std::mutex> lock(thiz->mMutex); in onPhysicalCameraAvailable() local
83 std::lock_guard<std::mutex> lock(thiz->mMutex); in onPhysicalCameraUnavailable() local
89 std::lock_guard<std::mutex> lock(mMutex); in resetCount() local
98 std::lock_guard<std::mutex> lock(mMutex); in getAvailableCount() local
103 std::lock_guard<std::mutex> lock(mMutex); in getUnavailableCount() local
108 std::lock_guard<std::mutex> lock(mMutex); in getPhysicalCameraAvailableCount() local
113 std::lock_guard<std::mutex> lock(mMutex); in getUnavailablePhysicalCameras() local
118 std::lock_guard<std::mutex> lock(mMutex); in isAvailable() local
/frameworks/av/media/utils/
DSchedulingPolicyService.cpp36 sMutex.lock(); in requestPriority()
46 sMutex.lock(); in requestPriority()
55 sMutex.lock(); in requestPriority()
65 sMutex.lock(); in requestCpusetBoost()
74 sMutex.lock(); in requestCpusetBoost()
83 sMutex.lock(); in requestCpusetBoost()

12345678910>>...24