Home
last modified time | relevance | path

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

12345678910>>...28

/frameworks/base/services/core/java/com/android/server/
DLockGuard.java94 private static LockInfo findOrCreateLockInfo(Object lock) { in findOrCreateLockInfo() argument
95 LockInfo info = sKnown.get(lock); in findOrCreateLockInfo()
98 info.label = "0x" + Integer.toHexString(System.identityHashCode(lock)) + " [" in findOrCreateLockInfo()
100 sKnown.put(lock, info); in findOrCreateLockInfo()
110 public static Object guard(Object lock) { in guard() argument
112 if (lock == null || Thread.holdsLock(lock)) return lock; in guard()
116 final LockInfo info = findOrCreateLockInfo(lock); in guard()
122 doLog(lock, "Calling thread " + Thread.currentThread().getName() in guard()
124 + lockToString(lock)); in guard()
134 if (test == null || test == lock) continue; in guard()
[all …]
/frameworks/base/libs/hwui/thread/
DCommonPool.cpp45 std::unique_lock lock(mLock); in CommonPool() local
60 std::unique_lock lock(mLock); in CommonPool() local
63 tidConditionVars[i].wait(lock); in CommonPool()
84 std::unique_lock lock(mLock); in enqueue() local
86 lock.unlock(); in enqueue()
88 lock.lock(); in enqueue()
97 std::unique_lock lock(mLock); in workerLoop() local
101 mCondition.wait(lock); in workerLoop()
108 lock.unlock(); in workerLoop()
110 lock.lock(); in workerLoop()
[all …]
/frameworks/av/media/libmediatranscoding/transcoder/tests/
DTranscoderTestUtils.h88 std::unique_lock<std::mutex> lock(mMutex); in onTrackFormatAvailable()
94 std::unique_lock<std::mutex> lock(mMutex); in onTrackFinished()
100 std::unique_lock<std::mutex> lock(mMutex); in onTrackStopped()
107 std::unique_lock<std::mutex> lock(mMutex); in onTrackError()
115 std::unique_lock<std::mutex> lock(mMutex); in waitUntilFinished()
117 mTranscodingFinishedCondition.wait(lock); in waitUntilFinished()
123 std::unique_lock<std::mutex> lock(mMutex); in waitUntilTrackFormatAvailable()
125 mTrackFormatAvailableCondition.wait(lock); in waitUntilTrackFormatAvailable()
147 std::unique_lock<std::mutex> lock(mMutex); in onFinished()
155 std::unique_lock<std::mutex> lock(mMutex); in onError()
[all …]
/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/native/libs/renderengine/skia/debug/
DCommonPool.cpp63 std::unique_lock lock(mLock); in enqueue() local
65 lock.unlock(); in enqueue()
68 lock.lock(); in enqueue()
77 std::unique_lock lock(mLock); in workerLoop() local
81 mCondition.wait(lock); in workerLoop()
89 lock.unlock(); in workerLoop()
91 lock.lock(); in workerLoop()
/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.cpp88 Mutex::Autolock lock(mMutex); in setDefaultBufferSize() local
100 Mutex::Autolock lock(mMutex); in setContentsChangedListener() local
109 Mutex::Autolock lock(mMutex); in updateTexImage() local
182 Mutex::Autolock lock(mMutex); in releasePendingBuffer() local
193 Mutex::Autolock lock(mMutex); in getPrevFinalReleaseFence() local
207 std::lock_guard<std::mutex> lock(mImagesMutex); in acquireBufferLocked() local
237 std::lock_guard<std::mutex> lock(mImagesMutex); in updateAndReleaseLocked() local
281 Mutex::Autolock lock(mMutex); in getTransformMatrix() local
286 Mutex::Autolock lock(mMutex); in setFilteringEnabled() local
319 Mutex::Autolock lock(mMutex); in getTimestamp() local
[all …]
/frameworks/av/services/mediatranscoding/
DSimulatedTranscoder.cpp64 auto lock = std::scoped_lock(mLock); in start() local
76 auto callback = mCallback.lock(); in start()
85 auto callback = mCallback.lock(); in pause()
97 auto callback = mCallback.lock(); in resume()
117 auto lock = std::scoped_lock(mLock); in queueEvent() local
137 std::unique_lock<std::mutex> lock(mLock); in threadLoop() local
144 mCondition.wait(lock); in threadLoop()
150 std::cv_status status = mCondition.wait_for(lock, mRemainingTimeMap[key]); in threadLoop()
154 auto callback = mCallback.lock(); in threadLoop()
158 lock.unlock(); in threadLoop()
[all …]
/frameworks/libs/net/common/testutils/hostdevice/com/android/net/module/util/
DTrackRecord.kt56 private val lock = ReentrantLock() constant
57 private val condition = lock.newCondition()
79 override val size get() = lock.withLock { elements.size } in hasNext()
80 override fun contains(element: E) = lock.withLock { elements.contains(element) } in <lambda>()
81 override fun containsAll(elements: Collection<E>) = lock.withLock { in <lambda>()
84 override operator fun get(index: Int) = lock.withLock { elements[index] } in <lambda>()
85 override fun indexOf(element: E): Int = lock.withLock { elements.indexOf(element) } in <lambda>()
86 override fun lastIndexOf(element: E): Int = lock.withLock { elements.lastIndexOf(element) } in <lambda>()
87 override fun isEmpty() = lock.withLock { elements.isEmpty() } in <lambda>()
91 override fun subList(fromIndex: Int, toIndex: Int): List<E> = lock.withLock { in listIterator()
[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/native/libs/renderengine/threaded/
DRenderEngineThreaded.cpp98 std::scoped_lock lock(mInitializedMutex); in threadMain() local
105 std::scoped_lock lock(mThreadMutex); in threadMain() local
120 std::unique_lock<std::mutex> lock(mThreadMutex); in threadMain() local
121 mCondition.wait(lock, [this]() REQUIRES(mThreadMutex) { in threadMain()
131 std::unique_lock<std::mutex> lock(mInitializedMutex); in waitUntilInitialized() local
132 mInitializedCondition.wait(lock, [=] { return mIsInitialized; }); in waitUntilInitialized()
142 std::lock_guard lock(mThreadMutex); in primeCache() local
166 std::lock_guard lock(mThreadMutex); in dump() local
184 std::lock_guard lock(mThreadMutex); in genTextures() local
200 std::lock_guard lock(mThreadMutex); in deleteTextures() local
[all …]
/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/base/libs/input/
DPointerController.cpp67 std::scoped_lock lock(mLock); in PointerController() local
89 std::scoped_lock lock(mLock); in setPosition() local
102 std::scoped_lock lock(mLock); in fade() local
107 std::scoped_lock lock(mLock); in unfade() local
112 std::scoped_lock lock(mLock); in setPresentation() local
132 std::scoped_lock lock(mLock); in setSpots() local
141 std::scoped_lock lock(mLock); in clearSpots() local
156 std::scoped_lock lock(mLock); in reloadPointerResources() local
172 std::scoped_lock lock(mLock); in setDisplayViewport() local
182 std::scoped_lock lock(mLock); in updatePointerIcon() local
[all …]
/frameworks/av/media/libstagefright/renderfright/threaded/
DRenderEngineThreaded.cpp49 std::lock_guard lock(mThreadMutex); in ~RenderEngineThreaded() local
71 std::unique_lock<std::mutex> lock(mThreadMutex); in threadMain() local
80 mCondition.wait(lock, [this]() REQUIRES(mThreadMutex) { in threadMain()
90 std::lock_guard lock(mThreadMutex); in primeCache() local
105 std::lock_guard lock(mThreadMutex); in dump() local
122 std::lock_guard lock(mThreadMutex); in useNativeFenceSync() local
137 std::lock_guard lock(mThreadMutex); in useWaitSync() local
152 std::lock_guard lock(mThreadMutex); in genTextures() local
167 std::lock_guard lock(mThreadMutex); in deleteTextures() local
182 std::lock_guard lock(mThreadMutex); in bindExternalTextureImage() local
[all …]
/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/av/media/libmediatranscoding/
DTranscodingThermalPolicy.cpp49 std::scoped_lock lock{mRegisteredLock}; in registerSelf() local
79 std::scoped_lock lock{mRegisteredLock}; in unregisterSelf() local
103 std::scoped_lock lock{mCallbackLock}; in setCallback() local
108 std::scoped_lock lock{mRegisteredLock}; in getThrottlingStatus() local
116 std::scoped_lock lock{mRegisteredLock}; in onStatusChange() local
124 std::scoped_lock lock{mCallbackLock}; in onStatusChange() local
126 if ((cb = mThermalPolicyCallback.lock()) != nullptr) { in onStatusChange()
/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()
/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/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/native/services/surfaceflinger/Scheduler/
DDispSyncSource.cpp49 std::lock_guard lock(mMutex); in ~CallbackRepeater() local
54 std::lock_guard lock(mMutex); in start() local
67 std::lock_guard lock(mMutex); in stop() local
74 std::lock_guard lock(mMutex); in dump() local
87 std::lock_guard lock(mMutex); in callback() local
94 std::lock_guard lock(mMutex); in callback() local
140 std::lock_guard lock(mVsyncMutex); in setVSyncEnabled() local
152 std::lock_guard lock(mCallbackMutex); in setCallback() local
158 std::lock_guard lock(mVsyncMutex); in setDuration() local
174 std::lock_guard lock(mCallbackMutex); in onVsyncCallback() 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/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()
/frameworks/native/services/vibratorservice/
DVibratorCallbackScheduler.cpp52 std::lock_guard<std::mutex> lock(mMutex); in ~CallbackScheduler() local
63 std::lock_guard<std::mutex> lock(mMutex); in schedule() local
74 std::unique_lock<std::mutex> lock(mMutex); in loop() local
82 lock.unlock(); in loop()
84 lock.lock(); in loop()

12345678910>>...28