Home
last modified time | relevance | path

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

12345678910>>...30

/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
139 Mutex::Autolock lock(mLock); in setAudioSource() local
150 Mutex::Autolock lock(mLock); in setPrivacySensitive() local
160 Mutex::Autolock lock(mLock); in isPrivacySensitive() local
173 Mutex::Autolock lock(mLock); in setOutputFormat() local
184 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/
DMutexUtils.h25 ConditionalLock(Mutex& mutex, bool lock) ACQUIRE(mutex) : mutex(mutex), lock(lock) { in ConditionalLock()
26 if (lock) mutex.lock(); in ConditionalLock()
30 if (lock) mutex.unlock(); in RELEASE()
34 const bool lock; member
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
183 Mutex::Autolock lock(mMutex); in releasePendingBuffer() local
194 Mutex::Autolock lock(mMutex); in getPrevFinalReleaseFence() local
208 std::lock_guard<std::mutex> lock(mImagesMutex); in acquireBufferLocked() local
239 std::lock_guard<std::mutex> lock(mImagesMutex); in updateAndReleaseLocked() local
283 Mutex::Autolock lock(mMutex); in getTransformMatrix() local
288 Mutex::Autolock lock(mMutex); in setFilteringEnabled() local
321 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/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
/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/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
188 std::lock_guard lock(mThreadMutex); in genTextures() local
208 std::lock_guard lock(mThreadMutex); in deleteTextures() 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/native/services/surfaceflinger/Tracing/
DLayerTracing.cpp39 std::scoped_lock lock(mTraceLock); in enable() local
49 std::scoped_lock lock(mTraceLock); in disable() local
61 std::scoped_lock lock(mTraceLock); in isEnabled() local
66 std::scoped_lock lock(mTraceLock); in writeToFile() local
75 std::scoped_lock lock(mTraceLock); in setTraceFlags() local
80 std::scoped_lock lock(mTraceLock); in setBufferSize() local
96 std::scoped_lock lock(mTraceLock); in dump() local
102 std::scoped_lock lock(mTraceLock); in notify() local
/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/core/java/android/os/
DIPowerManager.aidl30 void acquireWakeLock(IBinder lock, int flags, String tag, String packageName, in WorkSource ws, in acquireWakeLock() argument
32 void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName, in acquireWakeLockWithUid() argument
35 void releaseWakeLock(IBinder lock, int flags); in releaseWakeLock() argument
36 void updateWakeLockUids(IBinder lock, in int[] uids); in updateWakeLockUids() argument
43 void updateWakeLockWorkSource(IBinder lock, in WorkSource ws, String historyTag); in updateWakeLockWorkSource() argument
44 void updateWakeLockCallback(IBinder lock, IWakeLockCallback callback); in updateWakeLockCallback() argument
88 oneway void acquireWakeLockAsync(IBinder lock, int flags, String tag, String packageName, in acquireWakeLockAsync() argument
90 oneway void releaseWakeLockAsync(IBinder lock, int flags); in releaseWakeLockAsync() argument
91 oneway void updateWakeLockUidsAsync(IBinder lock, in int[] uids); in updateWakeLockUidsAsync() argument
/frameworks/native/services/surfaceflinger/Scheduler/
DDispSyncSource.cpp50 std::lock_guard lock(mMutex); in ~CallbackRepeater() local
55 std::lock_guard lock(mMutex); in start() local
68 std::lock_guard lock(mMutex); in stop() local
75 std::lock_guard lock(mMutex); in dump() local
88 std::lock_guard lock(mMutex); in callback() local
95 std::lock_guard lock(mMutex); in callback() local
142 std::lock_guard lock(mVsyncMutex); in setVSyncEnabled() local
154 std::lock_guard lock(mCallbackMutex); in setCallback() local
160 std::lock_guard lock(mVsyncMutex); in setDuration() local
176 std::lock_guard lock(mCallbackMutex); in onVsyncCallback() local
[all …]
DScheduler.cpp112 std::scoped_lock lock(mPolicyLock); in setRefreshRateConfigs() local
116 std::scoped_lock lock(mRefreshRateConfigsLock); in setRefreshRateConfigs() local
165 std::scoped_lock lock(mRefreshRateConfigsLock); in makeThrottleVsyncCallback() local
211 std::lock_guard<std::mutex> lock(mConnectionsLock); in createConnection() local
223 std::lock_guard<std::mutex> lock(mConnectionsLock); in createDisplayEventConnection() local
229 std::lock_guard<std::mutex> lock(mConnectionsLock); in getEventConnection() local
238 std::lock_guard<std::mutex> lock(mConnectionsLock); in onHotplugReceived() local
249 std::lock_guard<std::mutex> lock(mConnectionsLock); in onScreenAcquired() local
260 std::lock_guard<std::mutex> lock(mConnectionsLock); in onScreenReleased() local
278 std::lock_guard lock(mConnectionsLock); in onFrameRateOverridesChanged() local
[all …]
/frameworks/native/services/inputflinger/
DBlockingQueue.h46 std::unique_lock lock(mLock); in pop()
48 mHasElements.wait(lock, [this]() REQUIRES(mLock) { return !this->mQueue.empty(); }); in pop()
62 std::scoped_lock lock(mLock); in push()
73 std::scoped_lock lock(mLock); in erase()
82 std::scoped_lock lock(mLock); in clear()
92 std::scoped_lock lock(mLock); in size()
/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>>...30